用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Cogni-AI-OU/cogni-ai-agent-skills --skill direnv命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | direnv |
| description | How to maintain credentials and authenticate using direnv without exposing secrets to the output. |
| license | MIT |
Guidance for using direnv to securely maintain credentials and load environment variables without exposing them in agent outputs.
.env.example to .env if .env does not exist and needs configuration.direnv allow <path-to-env-dir> to approve the environment variables.eval "$(direnv export bash)" to inject the variables into the current session.direnv allow with eval "$(direnv export bash)" to ensure the agent's shell session properly loads the variables, as standard direnv shell hooks may not be active..env.~/.bashrc or ~/.profile instead).--env-file.direnv allow but forgetting to run eval "$(direnv export bash)", meaning the variables never actually load into the agent's current shell session..env but failing to ensure .env is listed in the project's .gitignore.direnv variables to persist if the agent changes directories (cd ..), which naturally unloads them.To authenticate when API keys are missing (e.g., loading from ../../):
direnv allow ../../
eval "$(direnv export bash)"
Example usage for maintaining credentials and running commands from a subdirectory:
cp ../../.env.example ../../.env
# Edit ../../.env and set real values using file editing tools
direnv allow ../../
eval "$(direnv export bash)"
source or cat .env files.direnv allow without immediately running eval "$(direnv export bash)" within the same execution context.