nix-expert

nix-expert is a skill for Claude Code from rikdc/ai-skills. It costs 169 tokens per session (3,713 once invoked), scanned A, original, MPL-2.0.

Reference guidance for working with Nix, a tool that describes software and system setups as code, including NixOS and home-manager.

In plain words
What is it for?
Use it to review or write Nix expressions, package software, manage flake inputs, debug evaluation failures, configure home-manager, or harden NixOS.
Why use it?
It helps explain or diagnose unfamiliar configuration, packaging, build, dependency, and secret-management problems in Nix projects.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is additions = final: _prev: import ../pkgs { pkgs = final; };.

Part of the nix-skills plugin — 1 skill shipped together

Good fit Use it to review or write Nix expressions, package software, manage flake inputs, debug evaluation failures, configure home-manager, or harden NixOS.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rikdc/ai-skills
agentmods
npx agentmods add skills/rikdc/ai-skills/nix-expert

Made for: Claude Code.

Or install nix-skills, the plugin that ships this one along with the rest of its 1 skill.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/rikdc/ai-skills/nix-expert/github.svg)](https://agentmods.dev/skills/rikdc/ai-skills/nix-expert)
Your own site
<a href="https://agentmods.dev/skills/rikdc/ai-skills/nix-expert"><img src="https://agentmods.dev/badge/skills/rikdc/ai-skills/nix-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nix-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/rikdc/ai-skills/nix-expert"><img src="https://agentmods.dev/badge/skills/rikdc/ai-skills/nix-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,713 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.
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.00169 $0.03713
Opus 5 $0.00084 $0.01857
Sonnet 5 $0.00034 $0.00743
Haiku 4.5 $0.00017 $0.00371

Measured 12d ago against content hash 311ff483e07e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

nix-expert 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 12d 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.

plugins/nix-skills/skills/nix-expert/SKILL.md · 501 lines

How it starts

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

Nix Expert

Advisory guidance on Nix, NixOS, and home-manager. This skill answers questions, explains patterns, and reviews Nix code.

Scope

Use this skill for:

  • Explaining or reviewing Nix expressions and module definitions
  • Authoring derivations and overlays
  • Flake input management and lockfile hygiene
  • Debugging build and evaluation failures
  • home-manager configuration
  • Secrets management patterns
  • NixOS security hardening

When the task is to author or change .nix files for a specific host, check whether the target repository ships its own config-generation skill and prefer it — it will know that flake's layout, secrets backend, and conventions, which this skill deliberately does not assume. Failing that, read the existing tree before writing anything, and conform to what is already there.

Routing

Read the matching reference file rather than answering from this file when the request is specific. Each one is a task-oriented procedure, not passive background:

Topic Trigger Reference
Build "build nix package", "nixos-rebuild build", "compile nix" references/Build.md
Debug "debug nix", "nix error", "evaluation error", "infinite recursion" references/Debug.md
Develop "development shell", "nix develop", "devShell", "direnv" references/Develop.md
Deploy "deploy nixos", "nixos-rebuild switch", "remote deployment" references/Deploy.md
Package "create package", "derivation", "buildGoModule", "package app" references/Package.md
Flakes "create flake", "flake.lock", "update inputs", "flake outputs" references/Flakes.md
Secrets "manage secrets", "agenix", "encrypt secrets", "age encryption" references/Secrets.md
Security "harden nixos", "apparmor", "firewall", "security hardening" references/Security.md
Troubleshoot "hash mismatch", "nix failing", "common errors" references/Troubleshoot.md

Read the full file on GitHub · 501 lines

Files

What ships with it

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

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. 12d ago First seen · 501 lines · 169 tokens per session scan A 311ff483e07e

Subscribe to this mod's changes

nix-expert is a skill published in the GitHub repository rikdc/ai-skills (2 stars, last pushed 6d ago), licensed MPL-2.0. It adds 169 tokens to every session and 3,713 once invoked, about $0.0008 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-31.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

google-ads-audit

Google Ads account audit and business context setup. Use for account-health audits and business-context setup. Trigger on "audit my ads", "ads audit", "set up my ads", "onboard", "account overview", "how's my account", "ads health check", "what should I fix in my ads", or when the user is new to NotFair and hasn't run…

nowork-studio/notfair-plugin · 86 tokens

review

5-pass structured code review — correctness, security, performance, readability, consistency.

SethGammon/Citadel · 17 tokens

alive:system-upgrade

Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.

alivecontext/alive · 57 tokens

extract-resume

Parse a resume's uploaded PDF into structured JSON (basics, experience, projects, skills, education) and save it to the editor.

suxrobGM/jobpilot · 32 tokens

ensure-pipelines-host

Ensures the tenant has a usable Power Platform Pipelines host environment before any pipeline operation runs. Detects host state via the same resolution order as the Power Apps UI (org-db setting → BAP env metadata → default-custom-host setting); if any existing host (Platform or Custom) is found, uses it. If no host…

microsoft/power-platform-skills · 222 tokens