nixos-modern-cli

nixos-modern-cli is a skill for Claude Code, Codex from Kihara777/NixKits. It costs 43 tokens per session (2,111 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 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,111 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.00043 $0.02111
Opus 5 $0.00022 $0.01056
Sonnet 5 $0.00009 $0.00422
Haiku 4.5 $0.00004 $0.00211

Measured 12d ago against content hash 8815eda94858, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 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.

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 权限和正确的系统维护流程。

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 · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 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
  • 没有 aptyumpacman — 使用 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 脚本依赖 grepsedtrheadtailpython3 等。 在 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 · 210 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. 12d 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 (25 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 2,111 once invoked, about $0.0002 per session on Opus 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

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…

alyraffauf/hoenn · 89 tokens

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.

alyraffauf/hoenn · 52 tokens

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

alyraffauf/hoenn · 60 tokens

unslop

Cut AI tells from any writing. Must always apply.

alyraffauf/hoenn · 14 tokens

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…

alyraffauf/hoenn · 64 tokens

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.

alyraffauf/hoenn · 43 tokens