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 skills add dryvist/claude-code-plugins --skill nix-tool-policygit clone --depth 1 https://github.com/dryvist/claude-code-pluginsWrote 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/dryvist/claude-code-plugins/nix-tool-policy)<a href="https://agentmods.dev/skills/dryvist/claude-code-plugins/nix-tool-policy"><img src="https://agentmods.dev/badge/skills/dryvist/claude-code-plugins/nix-tool-policy.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.1 | $0.00063 | $0.00824 |
| Opus 5 | $0.00032 | $0.00412 |
| Sonnet 5 | $0.00013 | $0.00165 |
| Haiku 4.5 | $0.00006 | $0.00082 |
Grade A, and why
nix-tool-policy 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 3d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Nix Tool Policy
Rule: Never Install Tools That Nix Dev Shells Provide
Scope: All repositories with flake.nix + .envrc (Nix dev shell pattern)
Prohibited Actions
pipx install <tool>/pipx reinstall <tool>— pipx virtualenvs reference Nix store Python; breaks after GCpip install <tool>/pip3 install <tool>— same problem, also pollutes global Pythonuv pip install <tool>— same Nix store Python problemuv run <tool>— generally unnecessary in Nix dev shells; prefer bare commands from the dev shell PATH. Last-resort package runner (with confirmation) only when the dev shell does not provide the tool.brew install <tool>for tools already in the dev shell — creates version conflicts
What To Do Instead
-
Tools are on PATH: When a repo has
flake.nix+.envrc, all project tools are provided by the Nix dev shell. Run them as bare commands. -
If a tool is not found: Use
direnv exec . <command>to run within the dev shell environment. This works even when direnv shell hooks haven't fired. -
If direnv exec fails: Use
nix develop --command <command>as a fallback. This is slower but always works. -
If the tool truly isn't in the flake: Prefer adding the tool to
flake.nixso it becomes part of the dev shell. For one-off usage, run it vianix shell -p <tool>rather than installing with pipx/pip/uv. -
Never install globally: Do not respond to a missing tool by installing it system-wide with pipx/pip/uv/brew; use the dev shell or a temporary Nix invocation, and update
flake.nixwhen the tool is needed long term.
Nix-Specific Alternatives
| Task | Use This | Not This |
|---|---|---|
| Config generation | Nix functions (lib.mkIf, lib.generators.*) |
Shell/Python generator |
| Nix data processing | builtins.fromJSON, builtins.readFile, lib.strings.* |
Python wrapper |
Nix Script Patterns
When a Nix script IS needed (committed artifact):
- Use
writeShellApplicationwithruntimeInputs, reference via${./<relative-path>} - For inline Nix wrappers: one-liner
execpatterns inwriteShellScriptBinare acceptable
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.
- 3d ago First seen · 66 lines · 63 tokens per session scan A 4580ffeb2a8b
nix-tool-policy is a skill published in the GitHub repository dryvist/claude-code-plugins (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 63 tokens to every session and 824 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-09-04.
Other skills, from other repositories
android-development
Android development with Kotlin, Jetpack Compose, and modern Android architecture. Use when building Android apps, implementing Material Design, or following Android best practices.
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
authentication-patterns
OAuth 2.0, JWT, SSO, MFA, NextAuth/Clerk/Supabase Auth implementation patterns.
email-systems
Transactional email (Resend, SendGrid, SES), templates (React Email, MJML), deliverability (SPF/DKIM/DMARC), and inboxing best practices. Use when building email infrastructure, designing templates, or troubleshooting deliverability.
customer-persona-builder
Data-driven customer persona development combining market research, user behavior analysis, and segmentation frameworks. Use when creating buyer personas, ideal customer profiles (ICPs), or user archetypes.
devops-cloud
DevOps, cloud infrastructure, and platform engineering. Use when working with AWS, GCP, Azure, Kubernetes, Terraform, CI/CD pipelines, or infrastructure as code.