nix-expert

nix-expert is a skill for Claude Code from rikdc/ai-skills. It costs 230 tokens per session (3,910 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 230 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,910 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00230 $0.03910
Opus 5.5 $0.00092 $0.01564
Sonnet 5.5 $0.00046 $0.00782
Haiku 4.5 $0.00023 $0.00391

Measured 1mo ago against content hash 65118c4ffcfd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nix-expert scanned grade A 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 1mo 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

An untracked `chmod 600 secrets.env` is not a fix: it is still plaintext,

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

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. 1mo ago Changed · +61 tokens per session 65118c4ffcfd
  2. 3mo 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 1mo ago), licensed MPL-2.0. It adds 230 tokens to every session and 3,910 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

nix-expert compared with skills from other repositories

nix-expert next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nix-expertrikdc/ai-skillsSkill21mo agoMPL-2.0A230Claude Code
reviewSethGammon/CitadelSkill9437d agoMITA17Claude Code
wenlan-handoffwenlan-app/wenlanSkill502todayApache-2.0A46Claude Code, Codex
system-upgradealivecontext/aliveSkill13215d agoMITA55Claude Code
read-literaturefirecrawl/firecrawl-claude-pluginSkill276yesterdayMITA101Claude Code
pr-reviewnitinjain999/platform-skillsSkill743d agoApache-2.0A81Claude Code
apex-skillifytonone-ai/tononeSkill85yesterdayMITA41Claude Code