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 nixos-modern-cligit 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/nixos-modern-cli)<a href="https://agentmods.dev/skills/kihara777/nixkits/nixos-modern-cli"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/nixos-modern-cli/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/nixos-modern-cli"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/nixos-modern-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00068 | $0.02707 |
| Opus 5.5 | $0.00027 | $0.01083 |
| Sonnet 5.5 | $0.00014 | $0.00541 |
| Haiku 4.5 | $0.00007 | $0.00271 |
Grade B, and why
nixos-modern-cli scanned grade B with 2 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 2mo 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 rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
description: 在 NixOS 系统上工作时使用。确保正确使用现代 Nix/NixOS CLI、完整的 shell 能力、sudo 权限和正确的系统维护流程;含 Nix store 路径陷阱与密钥/`path:` input 的仓库外组织方式。 Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
nix shell nixpkgs#git nixpkgs#ripgrep nixpkgs#curl How it starts
The opening of the file, as written. The whole thing — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NixOS 现代 CLI 指南
关键认知:NixOS 不是传统 Linux 发行版
NixOS 是一个声明式、不可变的 Linux 发行版。关键区别:
- 没有
/usr/bin、/usr/lib— 所有软件位于 Nix store(/nix/store) - 没有
apt、yum、pacman— 使用nix命令或编辑/etc/nixos/configuration.nix(或 flake) - 没有
/etc/default/grub、/etc/fstab— 这些由 NixOS 配置生成 - Shell PATH 默认不含常用工具 — 使用
nix shell nixpkgs#<pkg>获取临时工具 sudo正常工作,systemctl行为与预期一致- 必须用
nixos-rebuild应用配置变更
第一步:检查 CLI 能力
获取 shell 访问后,验证可用工具:
# 检查现代 nixos CLI(首选)
nixos --help 2>/dev/null && echo "nixos-cli available"
# 检查 nix-command(优于传统 nix-* 命令)
nix --help 2>/dev/null && echo "nix-command available"
现代命令 vs 传统命令
始终优先使用现代等位命令:
| 传统命令 | 现代命令(优先) |
|---|---|
nixos-rebuild switch |
nixos rebuild switch(有 nixos-cli 时)或 nixos-rebuild switch |
nix-env -iA |
nix profile install |
nix-shell |
nix shell |
nix-build |
nix build |
nix-collect-garbage |
nix store gc |
nix-store --optimise |
nix store optimise |
nix-channel --update |
使用 flake 则不需要 |
如果有 nixos-cli(软件包 nixos-cli):
nixos rebuild switch --flake /etc/nixos
nixos generation delete --all # 清理旧 generation
nixos store gc # 垃圾回收
nixos store optimise # 优化 store
如果只有 nix-command:
sudo nixos-rebuild switch --flake /etc/nixos
nix store gc
nix store optimise
Shell 环境
NixOS 的 shell 环境极简。需要系统 PATH 之外的命令时:
# 临时 shell,包含所需工具
nix shell nixpkgs#git nixpkgs#ripgrep nixpkgs#curl
# 或进入持久开发 shell
nix develop nixpkgs#<package>
运行需要 POSIX 工具的脚本
许多 shell 脚本依赖 grep、sed、tr、head、tail、python3 等。
在 NixOS 上这些默认不在 PATH 中。使用 nix shell 的 --command 标志在齐全的环境中运行脚本:
# 单条命令,附带所需包
nix shell nixpkgs#python3 nixpkgs#coreutils nixpkgs#gnused \
nixpkgs#gnugrep nixpkgs#bash --command \
bash -c 'python3 my_script.py arg1 arg2'
# 复杂多步流程
nix shell nixpkgs#python3 nixpkgs#coreutils nixpkgs#gnused \
nixpkgs#gnugrep nixpkgs#bash --command bash -c '
cd /path/to/project
python3 install.py 2>&1
ls -la output/
echo "done"
'
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.
- 2mo ago Changed · +54 lines · +25 tokens per session e5e8d2eaea8e
- 3mo ago First seen · 210 lines · 43 tokens per session scan B 8815eda94858
nixos-modern-cli is a skill published in the GitHub repository Kihara777/NixKits (30 stars, last pushed 4d ago), licensed MIT. It adds 68 tokens to every session and 2,707 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
nixos-modern-cli compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nixos-modern-cliKihara777/NixKits | Skill | 30 | 4d ago | MIT | B | 68 | 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 |