supernovae-st/nika
Intent as Code | the workflow language for AI. One file, 4 verbs, one Rust binary. Local-first, any model, AGPL-3.0. 🦋
ARCHETYPE
Automator
Hooks on every lifecycle event: format, lint, notify, log.
CONTEXT TAX · EVERY TURN
up to ~5.1k tokens
Claude Code loads MCP tools on demand, so the real cost is usually lower.
Moderate · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details
Quality 35/100 Guardrails v2
Copy this rig
# review before running: this installs third-party code $ claude mcp add nika -- nika mcp $ npx degit supernovae-st/nika/.claude ./rig-nika # 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 nika -- nika mcp $ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-authoring .claude/skills/nika-authoring $ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-debugging .claude/skills/nika-debugging $ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-migration .claude/skills/nika-migration $ npx degit supernovae-st/nika/.agents/plugins/nika/skills/nika-operating .claude/skills/nika-operating $ npx degit supernovae-st/nika/.claude/skills/crate-admit .claude/skills/crate-admit $ npx degit supernovae-st/nika/.claude/skills/gate-check .claude/skills/gate-check
$ curl -fsSL --create-dirs -o .claude/agents/review-swarm.md https://raw.githubusercontent.com/supernovae-st/nika/main/.claude/agents/review-swarm.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": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'git push[[:space:]]+.*(--force(-with-lease)?|-f)\\b'; then echo '❌ FORBIDDEN: git push --force (incl --force-with-lease). Would destroy "
},
{
"type": "command",
"command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\\|\\|[[:space:]]*)git add[[:space:]]+(-A|\\.|\\*)'; then echo '❌ FORBIDDEN: git add -A/./*. Stage explicit"
},
{
"type": "command",
"command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'cargo test[[:space:]]+--test\\b'; then echo '❌ FORBIDDEN: cargo test --test triggers macOS Keychain popup. Use --lib only (feedback_no_k"
},
{
"type": "command",
"command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'git[[:space:]]+(checkout|switch)[[:space:]]+main\\b'; then echo '❌ FORBIDDEN: main is read-only. Use `git show brouillon:path` instead.'"
},
{
"type": "command",
"command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE '(git commit|git push).*--no-verify'; then echo '❌ FORBIDDEN: --no-verify bypasses hooks. Fix the underlying issue.' >&2; exit 2; fi"
},
{
"type": "command",
"command": "INPUT=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.command // empty' 2>/dev/null); if echo \"$INPUT\" | grep -qE 'cargo[[:space:]]+(yank|publish)\\b' && ! echo \"$INPUT\" | grep -qE '(--dry-run|--undo)\\b'; then echo '🛑 IRREVERSIBLE: cargo yank/publish "
}
]
},
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "FILE=$(echo \"$CLAUDE_TOOL_INPUT\" | jq -r '.file_path // empty' 2>/dev/null); if echo \"$FILE\" | grep -qE '/\\.git/'; then echo '❌ FORBIDDEN: editing inside .git/ directory.' >&2; exit 2; fi"
}
]
}
]
}
} MCP servers (1)
| server | source | est. tokens |
|---|---|---|
| nika | binary | 2.5k |
Skills (6)
Subagents (1)
| review-swarm | Review a crate independently from three perspectives for ADR-003 admission Gate 11. |
Hooks (15)
| event | matcher | runs |
|---|---|---|
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'git push[[:space:]]+.*(--force(-with-lease)?|-f)\b'; then echo '❌ FORBIDDEN: git push --force (incl --force-with-lease). Would destroy |
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git add[[:space:]]+(-A|\.|\*)'; then echo '❌ FORBIDDEN: git add -A/./*. Stage explicit |
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'cargo test[[:space:]]+--test\b'; then echo '❌ FORBIDDEN: cargo test --test triggers macOS Keychain popup. Use --lib only (feedback_no_k |
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'git[[:space:]]+(checkout|switch)[[:space:]]+main\b'; then echo '❌ FORBIDDEN: main is read-only. Use `git show brouillon:path` instead.' |
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE '(git commit|git push).*--no-verify'; then echo '❌ FORBIDDEN: --no-verify bypasses hooks. Fix the underlying issue.' >&2; exit 2; fi |
| PreToolUse | Bash | INPUT=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$INPUT" | grep -qE 'cargo[[:space:]]+(yank|publish)\b' && ! echo "$INPUT" | grep -qE '(--dry-run|--undo)\b'; then echo '🛑 IRREVERSIBLE: cargo yank/publish |
| PreToolUse | Edit|Write | FILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if echo "$FILE" | grep -qE '/\.git/'; then echo '❌ FORBIDDEN: editing inside .git/ directory.' >&2; exit 2; fi |
| PostToolUse | Bash | CMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git commit\b' && git log -1 --format=%B 2>/dev/null | grep -qi 'Co-Authored-By: Claude'; t |
| PostToolUse | Bash | CMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git commit\b' && git log -1 --format=%B 2>/dev/null | grep -qE 'admit to workspace'; then |
| PostToolUse | Bash | CMD=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command // empty' 2>/dev/null); if echo "$CMD" | grep -qE '(^|&&[[:space:]]*|;[[:space:]]*|\|\|[[:space:]]*)git push\b' && ! echo "$CMD" | grep -qE '(^|[[:space:]])(--force|-f)([[:space:]]|$)'; then |
| PostToolUse | Write|Edit | FILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if [ -n "$FILE" ] && echo "$FILE" | grep -q '\.rs$' && [ -f "$FILE" ]; then LOC=$(wc -l < "$FILE" 2>/dev/null || echo 0); if [ "$LOC" -gt 1500 ]; then echo "⚠️ WAR |
| PostToolUse | Write|Edit | FILE=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.file_path // empty' 2>/dev/null); if [ -n "$FILE" ] && echo "$FILE" | grep -qE '(MEMORY|SEQUENCE)\.md$'; then REPO=$(git rev-parse --show-toplevel 2>/dev/null || echo '.'); LOG="$REPO/.nika/state-c |
| SessionStart | * | cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null && HEAD=$(git log -1 --format=%h 2>/dev/null || echo ?); BRANCH=$(git branch --show-current 2>/dev/null || echo ?); CRATES=$(ls crates/*/Cargo.toml 2>/dev/null | wc -l | tr -d ' '); echo "💎 Nika Dia |
| SessionStart | * | cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null && RECORDED=$(grep -m1 -E '^\| HEAD ' .claude/CLAUDE.md 2>/dev/null | sed -E 's/^\| HEAD +\| *//; s/ *\|$//'); echo "🩺 Hygiene is not run at session start: run bash scripts/hygiene/check-all.sh when |
| Stop | * | echo '🦋 Session end. Hand off the exact HEAD and the checks actually run; this hook runs none.' |
Slash commands (4)
/admit/diamond-gates/diamond-health/legacy-lookup
Similar rigs
nika-open/nika-plugins
One Add teaches your agent Nika: skills, commands, hooks, an MCP oracle.
Pragmatist 4.0k tok · · Q0
supernovae-st/nika-plugins
One Add teaches your agent Nika: skills, commands, hooks, an MCP oracle.
Pragmatist 4.0k tok · · Q0
nuncaeslupus/doc-control
Deterministic tool for AI agents to edit Word documents: every change a tracked change the writer can reject.
Skill Collector 4.1k tok · · Q18
nuncaeslupus/literary-critic
Lets an LLM index, analyse and advise on a whole novel manuscript like a professional editor, across drafts.
Skill Collector 5.5k tok · · Q18