Install
$ agentstack add skill-cogni-ai-ou-cogni-ai-agent-skills-direnv ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Skill: direnv
Guidance for using direnv to securely maintain credentials and load environment variables without exposing them in agent outputs.
Core Process
- Setup Environment: Copy
.env.exampleto.envif.envdoes not exist and needs configuration. - Authorize Directory: Run
direnv allowto approve the environment variables. - Export Variables: Run
eval "$(direnv export bash)"to inject the variables into the current session.
Core Principles
- Security Focus: Never print, echo, or expose API keys and secrets in the terminal output.
- Session Persistence: Always follow
direnv allowwitheval "$(direnv export bash)"to ensure the agent's shell session properly loads the variables, as standard direnv shell hooks may not be active.
When to Use
- When you need to automatically load environment variables upon entering a specific project directory.
- To safely manage API keys and secrets in local development without committing them to version control.
- When an agent needs to execute commands that depend on project-specific credentials stored in
.env.
When Not to Use
- In production CI/CD pipelines where secrets are securely injected by the runner environment (like GitHub Actions secrets).
- For managing global, system-wide environment variables (use
~/.bashrcor~/.profileinstead). - When running commands in isolated, ephemeral Docker containers where environment variables are passed via
--env-file.
Common Pitfalls
- Forgetting to Eval: Running
direnv allowbut forgetting to runeval "$(direnv export bash)", meaning the variables never actually load into the agent's current shell session. - Committing Secrets: Adding sensitive keys to
.envbut failing to ensure.envis listed in the project's.gitignore. - Assuming Global State: Expecting
direnvvariables to persist if the agent changes directories (cd ..), which naturally unloads them.
Commands / Usage Patterns
To authenticate when API keys are missing (e.g., loading from ../../):
direnv allow ../../
eval "$(direnv export bash)"
Full Workflow Example
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)"
What to Avoid
- Do not manually
sourceorcat.envfiles. - Do not run
direnv allowwithout immediately runningeval "$(direnv export bash)"within the same execution context.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Cogni-AI-OU
- Source: Cogni-AI-OU/cogni-ai-agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.