setup-reactive
Set up the Clean Claude Reactive System in the current project. Configures hooks, shared state, and scripts for the multi-agent feedback loop
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up the Clean Claude Reactive System in the current project. Configures hooks, shared state, and scripts for the multi-agent feedback loop
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Craft something. Claude orchestrates, agents execute.
Start a Clean Claude agent with optional reactive links. Examples: /agent frontend-engineer, /agent frontend-engineer --link qa-engineer, /agent architect --link frontend-engineer,qa-engineer
Auto-repair with smart routing: test failures → Dev, type errors → Architect, spec gaps → PO. Routes each problem to the right expert.
Re-run stack detection and skill generation. Use when stack evolved or on first run.
Bootstrap a new frontend project with craft principles: React + Vite + TypeScript + Vitest + clean architecture
Add specialized craft skills to agents. Default craft principles always active. Everything MUST respect the craft philosophy.
| name | setup-reactive |
| description | Set up the Clean Claude Reactive System in the current project. Configures hooks, shared state, and scripts for the multi-agent feedback loop |
| user-invocable | false |
| context | conversation |
| allowed-tools | Read, Write, Bash, Glob |
You are setting up the Clean Claude Reactive System in the current project.
.clean-claude/ directory for shared agent statescripts/clean-claude/.claude/settings.jsondocs/features/ for output artifactsmkdir -p .clean-claude
cat > .clean-claude/state.json << 'EOF'
{
"workflow": null,
"feature": null,
"phase": "idle",
"retryCount": 0,
"maxRetries": 3,
"agents": {
"lastActive": null,
"history": []
},
"status": "ready"
}
EOF
touch .clean-claude/errors.jsonl
touch .clean-claude/events.jsonl
touch .clean-claude/learnings.jsonl
echo '{}' > .clean-claude/context.json
Create scripts/clean-claude/clean-claude-router.sh:
mkdir -p scripts/clean-claude
Then create the router script that handles agent communication and routing.
Add to .claude/settings.json:
{
"hooks": {
"SubagentStop": [
{
"matcher": "qa-engineer|frontend-engineer|architect|product-owner|devops-engineer",
"hooks": [
{
"type": "command",
"command": "./scripts/clean-claude/on-agent-stop.sh"
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./scripts/clean-claude/check-test-results.sh"
}
]
}
]
}
}
mkdir -p docs/features
Add runtime files that shouldn't be committed:
# Clean Claude runtime state
.clean-claude/state.json
.clean-claude/events.jsonl
.clean-claude/context.json
.clean-claude/trigger
Keep errors.jsonl and learnings.jsonl as they contain valuable history.
The reactive system is ready. Start with:
/reactive-loop
Or check system status:
./scripts/clean-claude/clean-claude-router.sh status
project/
├── .clean-claude/
│ ├── state.json # Current workflow state
│ ├── errors.jsonl # Error history (keep in git)
│ ├── events.jsonl # Event log
│ ├── learnings.jsonl # Patterns learned (keep in git)
│ └── context.json # Current feature context
├── .claude/
│ └── settings.json # Hooks configuration
├── scripts/
│ └── clean-claude/
│ ├── clean-claude-router.sh # Main routing logic
│ ├── on-agent-stop.sh # SubagentStop hook
│ └── check-test-results.sh # PostToolUse hook
└── docs/
└── features/ # Feature documentation output
After setup, verify with:
# Check state file
cat .clean-claude/state.json | jq '.'
# Check hooks are configured
cat .claude/settings.json | jq '.hooks'
# Check scripts are executable
ls -la scripts/clean-claude/
Setup complete when all checks pass.