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.5 | $0.00014 | $0.00272 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (30 stars, last pushed 4d ago), licensed MIT. It adds 35 tokens to every session and 679 once invoked, about $0.0001 per session on Opus 5.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.
recover-nixos-config compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| recover-nixos-configKihara777/NixKits | Skill | 30 | 4d ago | MIT | A | 35 | Claude Code, Codex |
| whyalyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 89 | Claude Code, Codex |
| technical-writingalyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 52 | Claude Code |
| howalyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 64 | Claude Code, Codex |
| teachalyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 60 | Claude Code, Codex |
| unslopalyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 14 | Claude Code, Codex |
| quality-codealyraffauf/hoenn | Skill | 235 | 2mo ago | GPL-3.0 | A | 43 | Claude Code, Codex |