nixos-config: Skill for Claude Code

.claude/skills/run-nixos-config/SKILL.md

run-nixos-config is a skill for Claude Code from MCB-SMART-BOY/nixos-config. It costs 41 tokens per session (906 once invoked), scanned B, original, Apache-2.0.

A procedure for checking, building, and deploying a NixOS configuration, including formatting and static checks. Deployment means applying the declared configuration to a NixOS machine.

In plain words
What is it for?
It helps validate Nix files and shell scripts, run flake checks, evaluate machines, build system targets, preview build work, and deploy named machines.
Why use it?
It helps distinguish basic configuration checks from a complete system build and identifies prerequisites before deployment.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is MCB-SMART-BOY/nixos-config's own configuration. It tells Claude Code how to work on nixos-config itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nixos-config configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/admin/mcbctl.

Reuse

Borrowing it

Nothing to install: this file belongs to MCB-SMART-BOY/nixos-config. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MCB-SMART-BOY/nixos-config/solo/.claude/skills/run-nixos-config/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/MCB-SMART-BOY/nixos-config

Made for: Claude Code.

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 run-nixos-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/run-nixos-config/github.svg)](https://agentmods.dev/skills/mcb-smart-boy/nixos-config/run-nixos-config)
Your own site
<a href="https://agentmods.dev/skills/mcb-smart-boy/nixos-config/run-nixos-config"><img src="https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/run-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.

agentmods 80×15 button for run-nixos-config

Your own site · 80×15
<a href="https://agentmods.dev/skills/mcb-smart-boy/nixos-config/run-nixos-config"><img src="https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/run-nixos-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 906 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00041 $0.00906
Opus 5 $0.00020 $0.00453
Sonnet 5 $0.00008 $0.00181
Haiku 4.5 $0.00004 $0.00091

Measured 6d ago against content hash 4d73bae5beae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

run-nixos-config scanned grade B with 1 finding 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (validate.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

sudo nixos-rebuild switch --flake /etc/nixos#nixos
.claude/skills/run-nixos-config/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run: NixOS Config

Paths relative to repo root.

Validate(任意装有 Nix 的 x86_64 Linux)

.claude/skills/run-nixos-config/validate.sh                          # NixOS 系统检查
.claude/skills/run-nixos-config/validate.sh --check statix            # 单项检查
.claude/skills/run-nixos-config/validate.sh --check nixos-eval        # Flake 聚合检查
.claude/skills/run-nixos-config/validate.sh --quick                   # 仅格式检查

本仓库 validator 只检查 NixOS 系统 flake。独立 Home Manager 项目在 /home/admin/mcbctl 中执行 nix flake check,该检查包含 portable home-manager-eval/home-manager-build 与 x86_64 Linux admin@nixos 的 targeted eval。

本仓库检查依次运行 nix-fmt、statix、deadnix、shell-syntax、Bats 和 nix flake checknix flake check 求值 NixOS 输出与系统 checks;nixos-eval 开始前会检查每个可部署的 machines/<machine>/hardware-configuration.nix 已存在;ci(仅求值)和 _template 不参与硬件检查。

硬件配置由仓库直接跟踪并导入,因此完整求值只依赖当前 checkout,不要求宿主是 NixOS,也不读取 /etc/nixos 中私有的 local.nixhardware-gpu.nix

构建证明边界

  • mcbctl portable 输出命名为 homeConfigurations."<user>@<system>";当前工作站另有显式 homeConfigurations."admin@nixos",用于完整 NixOS 用户模块的求值、activation package 构建和实际用户激活
  • mcbctl 的 home-manager-eval 只证明用户模块图可求值;home-manager-build 只证明 activation package 可构建
  • nix flake check 会求值 NixOS 系统输出,但不会实现完整系统 closure
  • 只构建 Home Manager 包或单个派生只能证明该目标;不得表述为“完整系统构建通过”
  • 完整系统构建使用 nix build --no-link .#nixosConfigurations.<machine>.config.system.build.toplevelnixos-rebuild build
  • Home Manager activation 成功也不证明系统用户、权限组、Portal、PipeWire、Niri、Noctalia、Flatpak、代理、Podman/KVM 或驱动运行正常;这些由 NixOS 构建和运行时 smoke 证明
  • 构建异常缓慢时先运行同一目标的 nix build --dry-run;它会显示待构建派生、下载路径和体积。需要实时日志时加 -L

Deploy(仅 NixOS)

当前机器的可执行部署命令:

./run.sh deploy --host nixos
sudo nixos-rebuild switch --flake /etc/nixos#nixos

其他可部署输出使用 /etc/nixos#<machine>ci 仅供求值,不能部署。

Dev shell

nix --extra-experimental-features 'nix-command flakes' develop

注意事项

  • nixfmt ≥ 1.3.0:裸 stdin 已废弃,驱动脚本会构建 flake formatter 并直接调用 nixfmt --check
  • 新文件:Nix 的 Git flake 只看到已跟踪文件;任何新增模块、脚本或机器文件都必须先 git add
  • 私有覆盖local.nixhardware-gpu.nix 保持 gitignored、可选,不是仓库求值前提

Read the full file on GitHub · 57 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago Changed · +5 lines 4d73bae5beae
  2. 11d ago First seen · 52 lines · 41 tokens per session scan B 7060754558ec

Subscribe to this mod's changes

run-nixos-config is a skill published in the GitHub repository MCB-SMART-BOY/nixos-config (10 stars, last pushed 6d ago), licensed Apache-2.0. It adds 41 tokens to every session and 906 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens