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 YPares/rigup.nix --skill nix-module-systemgit clone --depth 1 https://github.com/YPares/rigup.nixWrote 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/ypares/rigup.nix/nix-module-system)<a href="https://agentmods.dev/skills/ypares/rigup.nix/nix-module-system"><img src="https://agentmods.dev/badge/skills/ypares/rigup.nix/nix-module-system.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.01165 |
| Opus 5 | $0.00000 | $0.00583 |
| Sonnet 5 | $0.00000 | $0.00233 |
| Haiku 4.5 | $0.00000 | $0.00117 |
Grade A, and why
nix-module-system 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 8d 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Nix Module System: Dark Corners
Practical knowledge about lib.evalModules that's hard to find in official docs.
Sources:
- nixpkgs/lib/modules.nix — implementation
- Module system docs — official chapter
- nix.dev deep dive — tutorial
- noogle.dev evalModules — function reference
Module Identity & Deduplication
When the same module is included multiple times (e.g., via imports from different places), evalModules deduplicates by identity:
Path-based modules: Deduplicated by path string
modules = [ ./foo.nix ./foo.nix ]; # Same path → evaluated once
Function/attrset modules: Deduplicated by key attribute
# Without key: each inclusion is separate (can cause "defined multiple times" errors)
modules = [ myModule myModule ]; # Evaluated twice!
# With key: deduplicated
myModule = {
key = "my-unique-module-id";
imports = [ actualModule ];
};
modules = [ myModule myModule ]; # Evaluated once
Use key when you wrap modules dynamically and need deduplication across import chains.
Module Arguments
_module.args vs specialArgs
Both inject arguments into module functions, but differ in timing:
evalModules {
specialArgs = { foo = "available during option declaration"; };
modules = [{
_module.args = { bar = "only available in config, not options"; };
}];
}
specialArgs |
_module.args |
|
|---|---|---|
Available in options = { ... } |
✓ | ✗ |
Available in config = { ... } |
✓ | ✓ |
Can reference config |
✗ | ✓ |
Rule of thumb: Use specialArgs for things needed to declare options (like lib), use _module.args for runtime values (like pkgs).
_module.check
Disable "unknown option" errors:
{ _module.check = false; }
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago First seen · 152 lines · 0 tokens per session scan A 00d83070c05f
nix-module-system is a skill published in the GitHub repository YPares/rigup.nix (88 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,165 tokens. 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
Summarize document text and identify its main claims, evidence, and unanswered questions.
jj-todo-workflow
Structured TODO commit workflow using JJ (Jujutsu). Use to plan tasks as empty commits with [task:] flags, track progress through status transitions, manage parallel task DAGs with dependency checking. Enforces completion discipline. Enables to divide work between Planners and Workers. Requires the working-with-jj…
package-npm-nix
Package npm/TypeScript/Bun CLI tools for Nix. Use when creating Nix derivations for JavaScript/TypeScript tools from npm registry or GitHub sources, handling pre-built packages or source builds with dependency management.
nushell-usage
Essential patterns, idioms, and gotchas for writing Nushell code. Use when writing Nushell scripts, functions, or working with Nushell's type system, pipelines, and data structures. Complements plugin development knowledge with practical usage patterns.
typst-writer
Write correct and idiomatic Typst code for document typesetting. Use when creating or editing Typst (.typ) files, working with Typst markup, or answering questions about Typst syntax and features. Focuses on avoiding common syntax confusion (arrays vs content blocks, proper function definitions, state management).
nushell-plugin-builder
Guide for creating Nushell plugins in Rust using nuplugin and nuprotocol crates. Use when users want to build custom Nushell commands, extend Nushell with new functionality, create data transformations, or integrate external tools/APIs into Nushell. Covers project setup, command implementation, streaming data, custom…