nixos-config: Skill for Claude Code

.claude/skills/user/SKILL.md

user is a skill for Claude Code from MCB-SMART-BOY/nixos-config. It costs 42 tokens per session (1,079 once invoked), scanned A, original, Apache-2.0.

A procedure for adding and configuring users in a NixOS setup. It organises each user’s software profiles, personal configuration files, and scripts in separate directories.

In plain words
What is it for?
It helps add administrators or regular users, copy an existing setup, change packages or dotfiles, manage scripts, validate the configuration, and apply it.
Why use it?
It reduces the manual work of creating user folders, selecting shared profiles, synchronising configuration, and rebuilding the system.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/user.svg)](https://agentmods.dev/skills/mcb-smart-boy/nixos-config/user)
Your own site
<a href="https://agentmods.dev/skills/mcb-smart-boy/nixos-config/user"><img src="https://agentmods.dev/badge/skills/mcb-smart-boy/nixos-config/user.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00042 $0.01079
Opus 5 $0.00021 $0.00540
Sonnet 5 $0.00008 $0.00216
Haiku 4.5 $0.00004 $0.00108

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

Security

Grade A, and why

user scanned grade A with 0 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 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/user/SKILL.md · 88 lines

How it starts

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

User

架构

NixOS 系统账户与 Home Manager 用户配置分属两个项目:

/home/admin/nixos-config/
  modules/users.nix             ← 系统账户、组和管理员权限
  machines/<machine>/local.nix  ← mcb.users / mcb.adminUsers
/home/admin/mcbctl/
  profiles/                     ← 16 个共享 profile 模块
  home/                         ← 单用户 Home Manager 入口、配置与脚本

添加用户

先在 NixOS 项目注册系统账户,再独立激活 mcbctl 的 Home Manager 配置:

cd /home/admin/nixos-config
./run.sh add-user alice --admin
./run.sh deploy --host nixos

cd /home/admin/mcbctl
nix flake check

在调用方 flake 中显式暴露 Alice 的 Home Manager target;Linux target 的 homeModules.linux 会由 helper 自动组合,Niri 由 desktopEnvironment = "niri" 触发;NixOS integration 与宿主应用能力仍通过 extraModules 显式提供:

homeConfigurations."alice@x86_64-linux" =
  inputs.mcbctl.lib.mkHomeConfiguration {
    system = "x86_64-linux";
    username = "alice";
    homeDirectory = "/home/alice";
    desktopEnvironment = "niri";
    extraModules = [
      inputs.mcbctl.homeModules.nixos
      {
        mcb.desktop.providers.kazumi = true;
        mcb.desktop.providers.steam = true;
      }
    ];
  };
nix run /home/admin/mcbctl#home-manager -- \
  switch --flake /path/to/caller-flake#alice@x86_64-linux

admin 当前主机可直接使用 mcbctl 的完整 target:

cd /home/admin/mcbctl
nix run .#home-manager -- switch -b hm-backup --flake .#admin@nixos

该 target 只适用于当前 x86_64-linux NixOS 工作站,显式组合 Niri、NixOS integration、16 个 profile 和 Kazumi/Steam/WeMeet/Clash Verge capability;首次接管已有用户文件时保留 -b hm-backup,接管完成后可省略。portable admin@x86_64-linux target 仍只组合 portable core。nixos-configrun.sh add-user 只更新 machines/<machine>/local.nix 中的系统账户;它不创建 Home Manager 文件。mcbctl 不自动发现系统用户或机器;其他用户须通过 lib.mkHomeConfiguration { system; username; homeDirectory; desktopEnvironment ? null; extraModules ? [ ]; } 显式提供身份、平台层和宿主 capability。

修改现有用户

改什么
系统账户与权限 /home/admin/nixos-config/modules/users.nix + machines/<machine>/local.nix
软件选择 /home/admin/mcbctl/home/packages.nix + /home/admin/mcbctl/profiles/
dotfiles /home/admin/mcbctl/home/config/
Git 身份 调用方通过 extraModules 显式传入 /home/admin/mcbctl/home/local.nix(gitignored、仅非敏感覆盖)
Shell 配置 /home/admin/mcbctl/home/shell.nix
Niri 配置 /home/admin/mcbctl/home/config/niri/
用户脚本 /home/admin/mcbctl/home/scripts/<name> + scripts.nix

Read the full file on GitHub · 88 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. 3d ago Changed · +20 lines scan B → A ff2e0ba2916a
  2. 8d ago First seen · 68 lines · 42 tokens per session scan B 215556d0a16c

Subscribe to this mod's changes

user 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 42 tokens to every session and 1,079 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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