nixos-modern-cli

nixos-modern-cli is a skill for Claude Code, Codex from Kihara777/NixKits. It costs 68 tokens per session (2,707 once invoked), scanned B, original, MIT.

A set of working instructions for NixOS, a Linux system managed from declared configuration files rather than traditional package commands.

In plain words
What is it for?
Checking available Nix tools, installing temporary software, applying NixOS configuration changes, rebuilding the system, and cleaning up old system generations.
Why use it?
It helps avoid using familiar Linux commands that do not fit NixOS, and guides the agent toward the system’s current command-line tools and maintenance process.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Checking available Nix tools, installing temporary software, applying NixOS configuration changes, rebuilding the system, and cleaning up old system generations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kihara777/nixkits/nixos-modern-cli
Install

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.

Any agent
npx skills add Kihara777/NixKits --skill nixos-modern-cli
Clone the repo
git clone --depth 1 https://github.com/Kihara777/NixKits

Made for: Claude Code, Codex.

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 nixos-modern-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/kihara777/nixkits/nixos-modern-cli/github.svg)](https://agentmods.dev/skills/kihara777/nixkits/nixos-modern-cli)
Your own site
<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.

agentmods 80×15 button for nixos-modern-cli

Your own site · 80×15
<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>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,707 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00068 $0.02707
Opus 5.5 $0.00027 $0.01083
Sonnet 5.5 $0.00014 $0.00541
Haiku 4.5 $0.00007 $0.00271

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

Security

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
skills/nixos-modern-cli/SKILL.md · 264 lines

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"
'

Read the full file on GitHub · 264 lines

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. 2mo ago Changed · +54 lines · +25 tokens per session e5e8d2eaea8e
  2. 3mo ago First seen · 210 lines · 43 tokens per session scan B 8815eda94858

Subscribe to this mod's changes

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.

Related

nixos-modern-cli compared with skills from other repositories

nixos-modern-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nixos-modern-cliKihara777/NixKitsSkill304d agoMITB68Claude Code, Codex
whyalyraffauf/hoennSkill2352mo agoGPL-3.0A89Claude Code, Codex
technical-writingalyraffauf/hoennSkill2352mo agoGPL-3.0A52Claude Code
howalyraffauf/hoennSkill2352mo agoGPL-3.0A64Claude Code, Codex
teachalyraffauf/hoennSkill2352mo agoGPL-3.0A60Claude Code, Codex
unslopalyraffauf/hoennSkill2352mo agoGPL-3.0A14Claude Code, Codex
quality-codealyraffauf/hoennSkill2352mo agoGPL-3.0A43Claude Code, Codex