nixos-config: Skill for Claude Code

.claude/skills/update/SKILL.md

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

A procedure for updating Nix package sources and the tools that manage a NixOS system. NixOS is a Linux distribution whose system configuration is described as code.

In plain words
What is it for?
It helps update flake inputs such as nixpkgs and home-manager, check the lock file, evaluate the configuration, build it, deploy it, and roll back the lock file.
Why use it?
It helps apply dependency updates while checking for renamed options, broken overlays, package changes, and compatibility problems.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/nixos-config.

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/update/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 update

README.md
[![agentmods](https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/update.svg)](https://agentmods.dev/skills/mcb-smart-boy/nixos-config/update)
Your own site
<a href="https://agentmods.dev/skills/mcb-smart-boy/nixos-config/update"><img src="https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/update.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 576 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.00040 $0.00576
Opus 5 $0.00020 $0.00288
Sonnet 5 $0.00008 $0.00115
Haiku 4.5 $0.00004 $0.00058

Measured 3d ago against content hash 26b53f43bc92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

update 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 3d 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.

sudo nixos-rebuild switch --flake /etc/nixos#<machine>
.claude/skills/update/SKILL.md · 67 lines

What it actually says

Update

流程

# 1. 准备:按项目查看输入
cd /home/admin/nixos-config
git status
nix flake metadata --json | jq '.locks.nodes.nixpkgs.locked'

cd /home/admin/mcbctl
git status
nix flake metadata --json | jq '{nixpkgs: .locks.nodes.nixpkgs.locked, home-manager: .locks.nodes."home-manager".locked, nixvim: .locks.nodes.nixvim.locked}'

# 2. 更新对应项目
nix flake update --flake /etc/nixos
# 或单 input: nix flake lock --update-input nixpkgs --flake /etc/nixos
nix flake update --flake /home/admin/mcbctl

# 3. 检查 diff
git -C /home/admin/nixos-config diff flake.lock
git -C /home/admin/mcbctl diff flake.lock

# 4. Eval 验证
cd /home/admin/nixos-config
nix flake check
cd /home/admin/mcbctl
nix flake check

# 5. 构建验证
cd /home/admin/nixos-config
nixos-rebuild build --flake /etc/nixos#<machine>

# 6. 应用
sudo nixos-rebuild switch --flake /etc/nixos#<machine>

# 7. 提交
git add flake.lock
git commit -m "chore: update flake lock"

兼容性问题处理

症状 处理
attribute 'xxx' missing 搜索 nixpkgs 替代品;更新引用
option 'xxx' renamed to 'yyy' 按警告更新选项名
覆盖层失效 检查上游是否修复 → 移除/调整覆盖
弹性包解析断裂 modules/lib.nixresolvePkg 替代手动 tryEval

回滚

git checkout HEAD~1 -- flake.lock
sudo nixos-rebuild switch --flake /etc/nixos#<machine>

安全策略

更新时机:定期维护、需要新版本包功能、安全修复 不更新时机:系统刚稳定、正在做其他重构、nixpkgs-unstable 大面积 breaking change

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. 3d ago Changed · +11 lines · +1 tokens per session 26b53f43bc92
  2. 8d ago First seen · 56 lines · 39 tokens per session scan B 59bc458216b0

Subscribe to this mod's changes

update is a skill published in the GitHub repository MCB-SMART-BOY/nixos-config (10 stars, last pushed 3d ago), licensed Apache-2.0. It adds 40 tokens to every session and 576 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens