nix-agent-init

nix-agent-init is a skill for Claude Code, Codex from JEFF7712/nix-agent. It costs 81 tokens per session (2,054 once invoked), scanned A, original, MIT.

A setup skill for unfamiliar NixOS or Home Manager configuration repositories. NixOS is a Linux system managed through configuration files, and Home Manager manages a user’s environment the same way.

In plain words
What is it for?
Use it on first contact with a Nix configuration repository to inspect its flake, generate `AGENT_MAP.md`, `CLAUDE.md` and `AGENTS.md`, and create `.mcp.json` entries for the required servers.
Why use it?
It creates a concise map of the repository from facts observed by `nix-agent`, so an agent can understand where things are without relying on guesses or generic Nix advice. It also prepares the repository for agent use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it on first contact with a Nix configuration repository to inspect its flake, generate AGENT_MAP.md, CLAUDE.md and AGENTS.md, and create .mcp.json entries for the required servers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeff7712/nix-agent/nix-agent-init
Install

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.

Any agent
npx skills add JEFF7712/nix-agent --skill nix-agent-init
Clone the repo
git clone --depth 1 https://github.com/JEFF7712/nix-agent

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for nix-agent-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeff7712/nix-agent/nix-agent-init.svg)](https://agentmods.dev/skills/jeff7712/nix-agent/nix-agent-init)
Your own site
<a href="https://agentmods.dev/skills/jeff7712/nix-agent/nix-agent-init"><img src="https://agentmods.dev/badge/skills/jeff7712/nix-agent/nix-agent-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,054 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 88
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02054
Opus 5 $0.00041 $0.01027
Sonnet 5 $0.00016 $0.00411
Haiku 4.5 $0.00008 $0.00205

Measured 8d ago against content hash 509c4ce1dc33, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

nix-agent-init 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.

skills/nix-agent-init/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nix Agent Init

Overview

Make a NixOS/Home Manager config repo agent-ready in one pass. Run nix-agent inspect-flake once, then generate three artifacts, each derived from the returned facts and the files you actually read:

  • AGENT_MAP.md: task-routing table plus search shortcuts.
  • CLAUDE.md (+ AGENTS.md): a one-screen repo brief.
  • .mcp.json: wires nix-agent and mcp-nixos.

Everything you write must trace back to an observed fact. A sparse repo gets a short map; a rich repo gets a longer one. Never pad with generic NixOS advice, aspirational structure, or rules the facts do not support. If a fact is null or "unknown", say so or omit the row. Do not invent.

You do not run nix flake show yourself: nix-agent inspect-flake does. You do read the repo's own files (module dirs, flake.nix) with your native tools to name real files in the tables.

Step 1: Inspect

Run nix-agent inspect-flake (via Bash); it prints the fact bundle as JSON. With no argument it auto-resolves the target; if the user named a repo, pass the path: nix-agent inspect-flake /path/to/repo.

The returned facts drive every decision below:

  • flake_dir: absolute repo path. Pin .mcp.json to this.
  • hosts: nixosConfiguration names. null means flake show failed.
  • home_configurations: standalone HM outputs.
  • hm_integration: "integrated", "standalone", "none", or "unknown".
  • module_dirs: dirs where module files actually live.
  • auto_import: "import-tree", "none", or "unknown".
  • formatter: "treefmt", "nixfmt", a passthrough name, or "none".
  • lint_tools: subset of ["deadnix", "statix"] on PATH.
  • has_justfile, has_ci: booleans.
  • mcp_json: "present" or "absent".

If hosts is null (flake show failed), note in CLAUDE.md which facts are unavailable and read note / first_error, then continue with the file-level facts only (module_dirs, auto_import, has_justfile, mcp_json). Do not stall.

Read the module_dirs with your native tools so the routing table names real files (hosts/laptop.nix, modules/nixos/desktop.nix), not placeholders. If module_dirs is empty, the table stays generic and short; that is correct, not a gap to fill.

Read the full file on GitHub · 200 lines

Changes

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.

  1. 8d ago First seen · 200 lines · 81 tokens per session scan A 509c4ce1dc33

Subscribe to this mod's changes

nix-agent-init is a skill published in the GitHub repository JEFF7712/nix-agent (16 stars, last pushed 16d ago), licensed MIT. It adds 81 tokens to every session and 2,054 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

scanner-pmcc

Scan stocks for Poor Man's Covered Call (PMCC) suitability. Analyzes LEAPS and short call options for delta, liquidity, spread, IV, yield, trend direction, and earnings proximity. Use when user asks about PMCC candidates, diagonal spreads, or LEAPS strategies.

staskh/trading_skills · 63 tokens

ib-trailing-stop

Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 49 tokens

ib-trades-history

Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 59 tokens

fundamentals

Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings, revenue, profit, balance sheet, income statement, or company fundamentals.

staskh/trading_skills · 42 tokens

ib-collar

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 30 tokens

ib-portfolio-action-report

Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 49 tokens