Agent skill

NixOS Flake Rebuild

by Ruixi-rebirth in Ruixi-rebirth/flakes

Rebuilds a Flake-based NixOS system through a wrapper script that validates, formats, picks the host, runs the chosen rebuild mode and checks the result.

No licenceAuto-check: notesDevOps & Cloud

SKILL.md written in Chinese; this summary is our English description.

Install NixOS Flake Rebuild

skills CLI
$ npx skills add Ruixi-rebirth/flakes --skill nixos-rebuild -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Ruixi-rebirth/flakes nixos-rebuild --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Ruixi-rebirth/flakes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/nixos-rebuild .claude/skills/nixos-rebuild && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nixos-rebuild
GitHub stars
100
Token cost
~356 tokens
SKILL.md length
87 words
Files
3 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
None found

At a glance

Rebuilds a Flake-based NixOS system through a wrapper script that validates, formats, picks the host, runs the chosen rebuild mode and checks the result.

  • Works in 4 steps: 应用配置更改 (Switch) → 测试配置 (Test) → 下次启动时应用 (Boot) → …
  • Applying or testing a NixOS configuration change from a flake
  • SKILL.md covers 核心任务, 配置更新工作流 (脚本自动化流程), 故障排除 and 主机特定说明
  • Runs Shell scripts from its folder; calls nix

What it does

A wrapper script, `rebuild-wrapper.sh`, takes a mode and an optional host. Switch applies the change now and adds it to the bootloader, test applies it to the running system without the bootloader and suits risky changes, boot adds it to the bootloader for the next start, and dry-activate previews what would change. The script finds the available hosts from the flake, which resolves `nixosConfigurations` from `flake.nix` with host definitions under `hosts/`.

Each run validates with `nix flake check`, formats with `nix fmt`, selects the host by detecting the current one and prompting if it does not match, executes the chosen `nixos-rebuild` subcommand and verifies the resulting system. Failures point to `references/common-issues.md`, and the skill lists maintenance commands for removing old generations with `nix-collect-garbage -d`, optimizing the store and updating flake inputs. The SKILL.md is written in Chinese.

When your agent uses it

  • Applying or testing a NixOS configuration change from a flake
  • Rebuilding a specific host defined in the flake
  • Troubleshooting a failing nixos-rebuild

Example prompts

  • “Test my latest NixOS config change before adding it to the bootloader.”
  • “Do a dry activate for the laptop host and show what would change.”
  • “The rebuild failed, so check the common issues and suggest a fix.”

Requirements

  • A NixOS machine with Flakes enabled
  • A flake that defines nixosConfigurations

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 应用配置更改 (Switch)
  2. 测试配置 (Test)
  3. 下次启动时应用 (Boot)
  4. 干跑 (Dry Activate)

What it can do on your machine

Read from SKILL.md and the folder at commit ad88a12. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • nix

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

NixOS Flake Rebuild loads about 356 tokens when it runs, and up to ~777 if it reads all its reference files. Until then it costs about 23 tokens; SKILL.md has 87 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~356
With references · SKILL.md plus every file in references/, read only if the agent opens them
~777

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:62
    - **清理旧代(Generations)**:`sudo nix-collect-garbage -d`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 87 words (~356 tokens).

“本 Skill 为重建 NixOS 系统提供结构化工作流,特别针对基于 Flake 的配置进行了优化。”

— opening of SKILL.md by Ruixi-rebirth
name
nixos-rebuild

Read the full SKILL.md on GitHub

Files

SKILL.md and 2 other files (scripts, references) in .agents/skills/nixos-rebuild of Ruixi-rebirth/flakes.

  • SKILL.md
  • references/common-issues.md
  • scripts/rebuild-wrapper.sh

Open the folder on GitHubat commit ad88a12

Compare with similar skills

NixOS Flake Rebuild next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

NixOS Flake Rebuild compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
NixOS Flake Rebuild this skillRuixi-rebirth/flakes100—~356Automated safety check: NotesNone
Django Deployment Test Loophashgraph-online/awesome-codex-plugins1.3k—~851Automated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw36k6 repos~4.2kAutomated safety check: PassApache-2.0
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Terraform Skillantonbabenko/terraform-skill2.4k1 repos~5.1kAutomated safety check: PassApache-2.0
Review Docshashicorp/terraform-provider-aws11k—~1.3kAutomated safety check: PassMPL-2.0

Similar skills

  • Django Deployment Test Loop

    hashgraph-online/awesome-codex-plugins

    Make Django deployment changes test-driven across Docker, production settings, Gunicorn, WhiteNoise/static files, environment variables, Ansible/server setup, staging smoke tests, and release checks.

    1.3k GitHub stars~851 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    36k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Terraform Skill

    antonbabenko/terraform-skill

    A skill your agent uses when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift…

    2.4k GitHub starsUsed in 1 repo~5.1k tokens
    DevOps & CloudAuto-check passed
  • Review Docs

    hashicorp/terraform-provider-aws

    Official

    Review a Terraform AWS Provider PR's end-user documentation (website/docs//.markdown): whether docs are needed, description openings, argument/attribute style, section structure, tags wording, code…

    11k GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • AWS Cdk Development

    zxkane/aws-skills

    AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python.

    367 GitHub starsUsed in 2 repos~2.5k tokens
    DevOps & CloudAuto-check passed

More from Ruixi-rebirth/flakes

  • Nix Flake Updater

    Ruixi-rebirth/flakes

    Updates chosen or all Nix flake inputs, checks the result with nix flake check and a system rebuild, fixes warnings, then offers to commit.

    100 GitHub stars~469 tokensUpdated 20 days ago
    Auto-check passed
  • Nix Code Reviewer

    Ruixi-rebirth/flakes

    Reviews Nix expressions, NixOS modules and flake.nix files for style, naming, maintainability and extensibility, then runs nix fmt and nix flake check.

    100 GitHub stars~289 tokensUpdated 20 days ago
    Auto-check passed
  • NixOS Flake Analyzer

    Ruixi-rebirth/flakes

    Produces a quick structured report on a NixOS Flake repository, covering its hosts and Nix file count, by calling the flake-stats-mcp tool.

    100 GitHub stars~199 tokensUpdated 20 days ago
    Auto-check passed
  • Git Workflow

    Ruixi-rebirth/flakes

    标准化的代码暂存、提交(包含 GPG 签名)和推送流程。当需要使用约定式提交(Conventional Commits)并处理交互式 GPG 验证时使用。

    100 GitHub stars~383 tokensUpdated 20 days ago
    Auto-check passed

Categories

Questions about NixOS Flake Rebuild

What does NixOS Flake Rebuild do?

Rebuilds a Flake-based NixOS system through a wrapper script that validates, formats, picks the host, runs the chosen rebuild mode and checks the result. sh`, takes a mode and an optional host. Switch applies the change now and adds it to the bootloader, test applies it to the running system without the bootloader and suits risky changes, boot adds it to the bootloader for the next start, and dry-activate previews what would change.

When should I use NixOS Flake Rebuild?

NixOS Flake Rebuild fits situations like: applying or testing a NixOS configuration change from a flake; rebuilding a specific host defined in the flake; troubleshooting a failing nixos-rebuild.

How do I install NixOS Flake Rebuild in Claude Code?

Run `npx skills add Ruixi-rebirth/flakes --skill nixos-rebuild -a claude-code`. Or copy the skill folder (.agents/skills/nixos-rebuild in Ruixi-rebirth/flakes) into .claude/skills/nixos-rebuild in your project. Claude Code loads it when a task matches its description.

How do I install NixOS Flake Rebuild in Codex?

Run `npx skills add Ruixi-rebirth/flakes --skill nixos-rebuild -a codex`. Or copy the skill folder (.agents/skills/nixos-rebuild in Ruixi-rebirth/flakes) into .agents/skills/nixos-rebuild in your project. Codex loads it when a task matches its description.

Can I use NixOS Flake Rebuild in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Ruixi-rebirth/flakes --skill nixos-rebuild -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nixos-rebuild, .gemini/skills/nixos-rebuild, .github/skills/nixos-rebuild and .opencode/skills/nixos-rebuild in your project.

What does NixOS Flake Rebuild need to run?

Going by SKILL.md and its folder, NixOS Flake Rebuild needs a shell for the scripts in its folder and the command-line tools its instructions call (nix). Our summary lists: A NixOS machine with Flakes enabled; A flake that defines nixosConfigurations.

Does NixOS Flake Rebuild access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is NixOS Flake Rebuild safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does NixOS Flake Rebuild use?

No licence was found for NixOS Flake Rebuild or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does NixOS Flake Rebuild use?

About 356 tokens (SKILL.md is roughly 1.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 421 tokens, read only when the agent opens those files.

What are the alternatives to NixOS Flake Rebuild?

Skills that share tags, products or a category with NixOS Flake Rebuild: Django Deployment Test Loop (hashgraph-online/awesome-codex-plugins, 1.3k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Openclaw Live Updater (openclaw/openclaw, 392k stars) and Terraform Skill (antonbabenko/terraform-skill, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains NixOS Flake Rebuild?

Ruixi-rebirth (a GitHub user) maintains it in Ruixi-rebirth/flakes, which has 100 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 21, 2026.

Source: Ruixi-rebirth/flakes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.