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/ahonn/dotfiles/nix-darwinnpx skills add ahonn/dotfiles --skill nix-darwingit clone --depth 1 https://github.com/ahonn/dotfilesWrote 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/ahonn/dotfiles/nix-darwin)<a href="https://agentmods.dev/skills/ahonn/dotfiles/nix-darwin"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/nix-darwin.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.00067 | $0.01116 |
| Opus 5 | $0.00034 | $0.00558 |
| Sonnet 5 | $0.00013 | $0.00223 |
| Haiku 4.5 | $0.00007 | $0.00112 |
Grade B, and why
nix-darwin scanned grade B with 1 finding 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 yesterday.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#workstation How it starts
The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
nix-darwin Configuration
Architecture
Three-layer system: darwin modules (system) → home-manager (user) → homebrew (GUI apps).
flake.nix # Thin orchestration layer
├── hosts/workstation/ # Unstable packages, full toolchain
│ ├── default.nix → modules/darwin/
│ ├── home.nix → modules/home-manager/base.nix + program modules
│ └── homebrew.nix → modules/homebrew/base.nix + host casks
└── hosts/homelab/ # Stable packages (macOS 13), minimal
├── default.nix → modules/darwin/
├── darwin.nix # Host-specific overrides (mkForce)
├── home.nix → modules/home-manager/base.nix + neovim-stable
└── homebrew.nix
For full dependency flow and module layers, see references/architecture.md.
Core Conventions
Program Toggle Pattern
Every program module follows this structure (see templates/program-module.nix):
options.my.{program}.enable = mkEnableOption "description";
config = mkIf cfg.enable { /* config */ };
Enable in host's home.nix:
my.neovim.enable = true;
Adding a New Program
- Create
modules/home-manager/programs/{name}.nixusing template - Import it in the host's
home.nix - Set
my.{name}.enable = true - If it needs a GUI cask, add to
hosts/{host}/homebrew.nix
Configuration Management
| Method | When to Use | Example |
|---|---|---|
mkOutOfStoreSymlink |
Config that changes without rebuild | nvim, aerospace |
builtins.readFile |
Config loaded into nix store | zed-editor |
| Inline nix | Simple, nix-native config | ghostty, starship |
Naming Conventions
- Nix files:
kebab-case.nix - Module options:
my.{program}.enable - Dotfile symlinks:
{name}.symlinkinsymlink/ - Hosts:
kebab-case - Commits: conventional (
feat(neovim):,fix(darwin):)
Essential Commands
See references/commands.md for full list.
# Apply configuration
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#workstation
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#homelab
# Validate without applying
nix flake check
# Update inputs
nix flake update
What ships with it
5 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.
- yesterday First seen · 116 lines · 67 tokens per session scan B a42e5b11c955
nix-darwin is a skill published in the GitHub repository ahonn/dotfiles (62 stars, last pushed 5d ago), licensed MIT. It adds 67 tokens to every session and 1,116 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
coding
Principles for writing and designing code, covering API and abstraction design, naming, comment discipline, and standards of evidence for claims about code behavior. Use whenever the task is to write or modify code, design an API or software architecture, or review code.
benchling-integration
Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.
astropy
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
esm
Comprehensive toolkit for EvolutionaryScale protein language models including ESM3 (generative multimodal design across sequence, structure, and function) and ESM C (efficient embeddings). Use for protein sequence/structure/function tasks, inverse folding, embeddings, variant design, and ESMFold2 structure prediction…
ralph-loop
Ralph Wiggum 迭代开发循环。三阶段工作流(需求→规划→构建),每阶段有 code review + 测试 gate。 触发词:ralph loop、迭代开发、interview me、plan system、build system。.
mcp-notion-usage-guide
MCP Notion工具使用指南,包含常见问题解决方案和最佳实践。使用当: (1) 访问Notion数据库view URL出现"URL type view not currently supported"错误, (2) 需要获取数据库schema和表结构信息, (3) 查询数据库中的条目内容, (4) 创建页面时MULTISELECT字段值不存在导致失败, (5) 需要更新数据库schema添加新选项, (6) 开发需要集成Notion数据的自动化工作流, (7) querydatasources/query-database-view返回Business Plan要求错误, (8) 需要在无Business…