~ / rigs / heytcass / claudeos

heytcass/claudeos

A NixOS daily driver maintained by an AI agent: it heals failed units, names generations, and opens PRs to change itself.

↗ GitHub ★ 1 MIT updated today personal setup Claude Code
stack: Nix
share on X
ARCHETYPE
Orchestrator
A bench of specialised subagents. The main agent mostly delegates.
CONTEXT TAX · EVERY TURN
up to ~14.8k tokens
Claude Code loads MCP tools on demand, so the real cost is usually lower.
Heavy · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details
Quality 40/100 Guardrails v2

Copy this rig

# review before running: this installs third-party code
$ claude mcp add nixos -- mcp-nixos
$ claude mcp add system-health -- mcp-system-health
$ claude mcp add context7 -- nix shell 'nixpkgs#nodejs_22' -c npx -y @upstash/context7-mcp@latest
$ claude mcp add unifi -e UNIFI_<redacted> -e UNIFI_API_TYPE=YOUR_UNIFI_API_TYPE -e UNIFI_AUDIT_LOG_PATH=YOUR_UNIFI_AUDIT_LOG_PATH -e UNIFI_LOCAL_HOST=YOUR_UNIFI_LOCAL_HOST -e UNIFI_LOCAL_VERIFY_SSL=YOUR_UNIFI_LOCAL_VERIFY_SSL -- nix shell 'nixpkgs#uv' -c uvx unifi-mcp-server
$ npx degit heytcass/claudeos/.claude ./rig-claudeos  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

$ claude mcp add nixos -- mcp-nixos
$ claude mcp add system-health -- mcp-system-health
$ claude mcp add context7 -- nix shell 'nixpkgs#nodejs_22' -c npx -y @upstash/context7-mcp@latest
$ claude mcp add unifi -e UNIFI_<redacted> -e UNIFI_API_TYPE=YOUR_UNIFI_API_TYPE -e UNIFI_AUDIT_LOG_PATH=YOUR_UNIFI_AUDIT_LOG_PATH -e UNIFI_LOCAL_HOST=YOUR_UNIFI_LOCAL_HOST -e UNIFI_LOCAL_VERIFY_SSL=YOUR_UNIFI_LOCAL_VERIFY_SSL -- nix shell 'nixpkgs#uv' -c uvx unifi-mcp-server
$ npx degit heytcass/claudeos/.claude/skills/add-module .claude/skills/add-module
$ npx degit heytcass/claudeos/.claude/skills/brand-guidelines .claude/skills/brand-guidelines
$ npx degit heytcass/claudeos/.claude/skills/deploy .claude/skills/deploy
$ npx degit heytcass/claudeos/.claude/skills/qml-dial-in .claude/skills/qml-dial-in
$ curl -fsSL --create-dirs -o .claude/agents/builder.md https://raw.githubusercontent.com/heytcass/claudeos/main/.claude/agents/builder.md
$ curl -fsSL --create-dirs -o .claude/agents/deployer.md https://raw.githubusercontent.com/heytcass/claudeos/main/.claude/agents/deployer.md
$ curl -fsSL --create-dirs -o .claude/agents/doc-generator.md https://raw.githubusercontent.com/heytcass/claudeos/main/.claude/agents/doc-generator.md
$ curl -fsSL --create-dirs -o .claude/agents/module-creator.md https://raw.githubusercontent.com/heytcass/claudeos/main/.claude/agents/module-creator.md
$ curl -fsSL --create-dirs -o .claude/agents/validator.md https://raw.githubusercontent.com/heytcass/claudeos/main/.claude/agents/validator.md

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/shared-checkout-guard.sh"
          },
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-commit-gate.sh"
          }
        ]
      },
      {
        "matcher": "Edit|Write|NotebookEdit",
        "hooks": [
          {
            "type": "command",
            "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/shared-checkout-guard.sh"
          }
        ]
      }
    ]
  }
}

MCP servers (4)

serversourceest. tokens
mcp-nixos · "nixos" binary 2.5k
mcp-system-health · "system-health" binary 2.5k
nix · "context7" binary 2.5k
nix · "unifi"
env: UNIFI_API_KEY, UNIFI_API_TYPE, UNIFI_AUDIT_LOG_PATH, UNIFI_LOCAL_HOST, UNIFI_LOCAL_VERIFY_SSL
binary 2.5k

Skills (4)

Subagents (5)

builderTests NixOS builds before applying
deployerOrchestrates full deployment workflow to NixOS machines
doc-generatorKeeps documentation synchronized with code changes
module-creatorScaffolds new NixOS modules following conventions
validatorValidates NixOS configuration before deployment

Hooks (6)

eventmatcherruns
SessionStart*"$CLAUDE_PROJECT_DIR"/.claude/hooks/session-start.sh
PostToolUseEdit|Write"$CLAUDE_PROJECT_DIR"/.claude/hooks/post-edit-check.sh
PreToolUseBash"$CLAUDE_PROJECT_DIR"/.claude/hooks/shared-checkout-guard.sh
PreToolUseBash"$CLAUDE_PROJECT_DIR"/.claude/hooks/pre-commit-gate.sh
PreToolUseEdit|Write|NotebookEdit"$CLAUDE_PROJECT_DIR"/.claude/hooks/shared-checkout-guard.sh
Stop*"$CLAUDE_PROJECT_DIR"/.claude/hooks/land-nudge.sh

Permissions

deny (0)
—
ask (0)
—
allow (18)
Bash(nix flake *)
Bash(nix build *)
Bash(nix eval *)
Bash(nix fmt *)
Bash(git add *)
Bash(git commit *)
Bash(git push *)
Bash(git pull *)
Bash(git branch *)
Bash(git checkout *)
Bash(git rebase *)
Bash(git grep *)
Bash(gh pr *)
Bash(gh run *)
Bash(gh api *)
Bash(gh repo *)
Bash(gh search *)
WebSearch

Similar rigs

copied ✓