Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/aaronsb/claude-code-config/direnvnpx skills add aaronsb/claude-code-config --skill direnvgit clone --depth 1 https://github.com/aaronsb/claude-code-configWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aaronsb/claude-code-config/direnv)<a href="https://agentmods.dev/skills/aaronsb/claude-code-config/direnv"><img src="https://agentmods.dev/badge/skills/aaronsb/claude-code-config/direnv.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.01117 |
| Opus 5 | $0.00032 | $0.00558 |
| Sonnet 5 | $0.00013 | $0.00223 |
| Haiku 4.5 | $0.00006 | $0.00112 |
Grade A, and why
direnv scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
direnv — Per-Project Claude Code Environments
Set up .envrc files so Claude Code automatically loads the right API keys, provider, model, and feature flags when you cd into a project directory.
Prerequisites
Check that direnv is installed and hooked into the shell:
which direnv && direnv version
# If missing: suggest installation for their platform
Check the shell hook is active:
grep -q 'direnv' ~/.zshrc ~/.bashrc 2>/dev/null && echo "hook found" || echo "hook missing"
If the hook is missing, add it:
- zsh:
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc - bash:
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
Creating a .envrc
Ask the user which scenario they need, then generate the .envrc:
Direct API Key (personal/hobby)
# .envrc
export ANTHROPIC_API_KEY="sk-ant-..."
AWS Bedrock
# .envrc
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_PROFILE=my-bedrock-profile
export AWS_REGION=us-east-1
# Optional: override model
# export ANTHROPIC_MODEL="us.anthropic.claude-sonnet-4-20250514-v1:0"
Google Vertex AI
# .envrc
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=us-east5
export ANTHROPIC_VERTEX_PROJECT_ID=my-project-id
Microsoft Azure Foundry
# .envrc
export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_BASE_URL="https://my-resource.services.ai.azure.com/api"
export ANTHROPIC_FOUNDRY_API_KEY="..."
Feature Flags / Tuning
# .envrc — append to any of the above
export ANTHROPIC_MODEL="claude-opus-4-6"
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
export CLAUDE_CODE_EFFORT_LEVEL=high
export CLAUDE_CODE_AUTOCOMPACT_PCT_OVERRIDE=99
Security Checklist
After creating the .envrc:
- Allow it:
direnv allow(required after every edit) - Gitignore it: Verify
.envrcis in.gitignore— it may contain secrets
grep -q '.envrc' .gitignore 2>/dev/null || echo '.envrc' >> .gitignore
- Never commit API keys — if the project is shared, use
direnv allowlocally and keep.envrcout of version control.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 142 lines · 64 tokens per session scan A fe330844727d
direnv is a skill published in the GitHub repository aaronsb/claude-code-config (18 stars, last pushed 5mo ago), licensed MIT. It adds 64 tokens to every session and 1,117 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
achieving-cmmc-level-2-compliance
Prepare a defense-contractor environment for CMMC Level 2 certification: scope CUI and FCI, implement the 110 NIST SP 800-171 Rev 2 security requirements across 14 families, compute the SPRS score with the DoD Assessment Methodology, manage a compliant POA&M, and ready the organization for a C3PAO assessment. Use when…
task-planning-arch
计算任务 gap 并产出下一步可执行子任务 List[TaskSpec];gap 已闭返回空数组。对齐 arch 场景(架构师名册/技术栈概览/双视角分析)确定式分解——按根目标交付物集合 + donechildren 查表(参照 task-planning storage 特例,非自由 LLM 分解)。.
task-search
在框架预查的候选 bot 集里决出执行者(who)与协作方式(how),返回 4 态 SearchResult(HITSINGLE/HITGROUP/HITMULTIBOTS/MISS)。对齐案例剧本确定式映射。.
escalation-governance
Assess whether to escalate models. Use when evaluating reasoning depth.
agt-policy-authoring
Create and validate a minimal AGT Copilot CLI policy tailored to the repository being inspected.
workflow
工作流引擎核心命令。管理工作流生命周期(创建、确认、拒绝、跳过、重试、提交、恢复),以及在人工节点等待时通过 workflowchoice 工具解读用户自然语言意图。.