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 Kihara777/NixKits --skill recover-nixos-configgit clone --depth 1 https://github.com/Kihara777/NixKitsWrote 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/kihara777/nixkits/recover-nixos-config)<a href="https://agentmods.dev/skills/kihara777/nixkits/recover-nixos-config"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/recover-nixos-config/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.
<a href="https://agentmods.dev/skills/kihara777/nixkits/recover-nixos-config"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/recover-nixos-config.svg" alt="Reviewed on agentmods" width="80" 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.00035 | $0.00679 |
| Opus 5 | $0.00017 | $0.00340 |
| Sonnet 5 | $0.00007 | $0.00136 |
| Haiku 4.5 | $0.00003 | $0.00068 |
Grade A, and why
recover-nixos-config 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.
What it actually says
恢复误删的 /etc/nixos 文件
当 /etc/nixos 下的文件被误删,但 NixOS 系统此前已从该配置成功构建过,
则 flake 源码(包括 flake.nix、flake.lock 及所有本地模块)仍保留在 Nix store 中。
任何构建文件 — flake.nix、flake.lock、boot.nix、system.nix、home.nix 等 — 均可恢复。
第 1 步:在 Nix store 中定位 flake 源码
Nix store 中保留了每次成功执行 nixos-rebuild 的 flake 源码快照。
按主机名搜索:
grep -rl '<HOSTNAME>' /nix/store/*-source/flake.nix 2>/dev/null
源码目录命名为 *-source,包含构建时 /etc/nixos 中的全部文件:
flake.nixflake.lock- 所有本地
.nix模块(boot.nix、home.nix、system.nix 等)
第 2 步:确认最新的 generation
在第 1 步的候选中找出最新 generation 的源码。最新的源码通常具有最大的
store path hash。如不确定,可将各候选的 flake.nix 与 /etc/nixos 中
尚存的文件对比 — 正确的源码会引用相同的本地模块
(如 ./boot.nix、./system.nix)。
列出所有历史 generation:
nixos-rebuild list-generations
与当前 generation 匹配的源码目录包含构建当前运行系统的配置。
第 3 步:验证内容
检查 flake.nix 的第一行以确认是正确的配置:
head -1 /nix/store/<hash>-source/flake.nix
列出源码中的所有文件:
ls /nix/store/<hash>-source/
第 4 步:恢复已删除的文件
将需要的文件复制回 /etc/nixos/。仅恢复丢失的文件:
cp /nix/store/<hash>-source/<filename> /etc/nixos/<filename>
示例 — 仅恢复 flake.nix:
cp /nix/store/<hash>-source/flake.nix /etc/nixos/flake.nix
恢复多个文件:
cp /nix/store/<hash>-source/flake.nix /etc/nixos/flake.nix
cp /nix/store/<hash>-source/flake.lock /etc/nixos/flake.lock
cp /nix/store/<hash>-source/home.nix /etc/nixos/home.nix
第 5 步:验证
nix flake check /etc/nixos
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.
- 12d ago First seen · 82 lines · 35 tokens per session scan A 830b15329776
recover-nixos-config is a skill published in the GitHub repository Kihara777/NixKits (25 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 679 once invoked, about $0.0002 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.
Other skills, from other repositories
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics…
technical-writing
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for /technical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.
teach
Explain a body of work plainly so a person actually understands it. Runs the how and why skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.
unslop
Cut AI tells from any writing. Must always apply.
how
Use for "how does X work", code walkthroughs before changing something, and placement / ownership / layering questions ("where should this live", "which package owns this", "is this the right layer"). Explains subsystem architecture, runtime flow, onboarding mental models. Can critique architecture. Use why for…
quality-code
Standards for writing or modifying handwritten source code. Use when implementing code changes or reviewing handwritten code. Do not use for browsing, explanation, diagnosis without implementation, generated code, or vendored code.