English | δΈζ
Autonomous coding, evolved.
29 skills, 14 hooks, 5 agents, a safety guardian, and a correction learning loop β all working together so Claude codes better, catches its own mistakes, and can run unattended overnight while you sleep.
If this saves you time, a star helps others find it. Something broken? Open an issue.
Blog post: Building Clade β motivation, design decisions, and lessons learned.
- Install
- MCP Server
- What It Does
- Skills
- Hooks
- Supported Languages
- Documentation
- Repo Structure
- Contributing
- License
git clone https://github.com/shenxingy/clade.git
cd clade && ./install.shInstalls skills, hooks, agents, scripts, and safety guardian. Start a new Claude Code session to activate.
Requires:
jq. Platform: Linux and macOS.
If you just want the skills in Cursor, Windsurf, Claude Desktop, or any MCP client:
pip install clade-mcpSee MCP Server below for configuration.
The MCP server exposes all 29 Clade skills as callable tools via the Model Context Protocol. Works with any MCP-compatible client.
Claude Desktop / Claude Code:
{
"mcpServers": {
"clade": { "command": "uvx", "args": ["clade-mcp"] }
}
}Cursor / Windsurf:
{
"mcpServers": {
"clade": { "command": "clade-mcp" }
}
}Prerequisite: Claude Code CLI must be installed β skills execute via
claude -p.
| When | What fires | Effect |
|---|---|---|
| Session opens in a git repo | session-context.sh |
Loads git context, handoff state, correction rules, model guidance |
| Claude runs a bash command | pre-tool-guardian.sh |
Blocks dangerous ops: migrations, rm -rf, force push, DROP TABLE |
| Claude edits code | post-edit-check.sh |
Async type-check (tsc, pyright, cargo check, go vet, etc.) |
| You correct Claude | correction-detector.sh |
Logs correction, prompts Claude to save a reusable rule |
| Claude marks task done | verify-task-completed.sh |
Adaptive quality gate: compile + lint, build + test in strict mode |
See How It Works for the full hook reference (14 hooks).
| Skill | What it does |
|---|---|
/commit |
Split changes into logical commits by module, push by default |
/sync |
Check off completed TODOs, append session summary to PROGRESS.md |
/review |
8-phase coverage review β finds AND fixes issues, loops until clean |
/verify |
Verify project behavior anchors (compile, test, lint) |
| Skill | What it does |
|---|---|
/start |
Autonomous session launcher β morning brief, overnight runs, cross-project patrol |
/loop GOAL |
Goal-driven improvement loop β supervisor plans, workers execute in parallel |
/batch-tasks |
Execute TODO steps via unattended sessions (serial or parallel) |
/orchestrate |
Decompose goals into tasks for worker execution |
/handoff |
Save session state for context relay between agents |
/pickup |
Resume from previous handoff β zero-friction restart |
/worktree |
Create git worktrees for parallel sessions |
| Skill | What it does |
|---|---|
/review-pr N |
AI code review on a PR diff β Critical / Warning / Suggestion |
/merge-pr N |
Squash-merge PR and clean up branch |
/investigate |
Root cause analysis β no fix without confirmed hypothesis |
/incident DESC |
Incident response β diagnose, postmortem, follow-up tasks |
/cso |
Security audit (OWASP + STRIDE) |
/map |
Generate ARCHITECTURE.md with module graph + file ownership |
| Skill | What it does |
|---|---|
/research TOPIC |
Deep web research, synthesize to docs/research/ |
/model-research |
Latest Claude model data + auto-update configs |
/next |
Multi-angle priority session β surface best next move |
/brief |
Morning briefing β overnight commits, costs, next steps |
/retro |
Engineering retrospective from git history |
/frontend-design |
Create production-grade frontend interfaces |
| Skill | What it does |
|---|---|
/audit |
Clean up correction rules β promote, deduplicate, remove stale |
/document-release |
Post-ship doc sync (README, CHANGELOG, CLAUDE.md) |
/pipeline |
Health check for background pipelines |
/provider |
Switch LLM provider |
slt |
Toggle statusline quota pace indicator |
See When to Use What for detailed usage guidance.
Auto-detected β hooks and agents adapt to your project:
| Language | Edit check | Type checker | Test runner |
|---|---|---|---|
| TypeScript / JavaScript | tsc (monorepo-aware) | tsc | jest / vitest |
| Python | pyright / mypy | pyright / mypy | pytest |
| Rust | cargo check | cargo check | cargo test |
| Go | go vet | go vet | go test |
| Swift / iOS | swift build | swift build | swift test |
| Kotlin / Android / Java | gradlew | gradlew | gradle test |
| LaTeX | chktex | chktex | β |
All checks are opt-in by detection β if the tool isn't installed, the hook silently skips.
| Guide | Contents |
|---|---|
| Maximize Throughput | Skip permissions, batch tasks, parallel worktrees, terminal + voice |
| Orchestrator Web UI | Chat-to-plan, worker dashboard, settings, iteration loop |
| Overnight Operation | Task queue, parallel sessions, context relay, safety |
| How It Works | Hooks, agents, skills internals, correction learning, model selection |
| Configuration | Settings, thresholds, adding custom hooks/agents/skills |
| When to Use What | Detailed usage guidance for every skill |
Keep ~/.claude/ in sync across machines β memory, corrections, skills, hooks, and scripts.
~/.claude/scripts/sync-setup.sh # auto-detect NFS or GitHub
~/.claude/scripts/sync-setup.sh --github # explicit GitHub backendFully automatic once configured. See Configuration for details.
clade/
βββ install.sh # One-command deployment
βββ uninstall.sh # Clean removal
βββ mcp-package/ # PyPI package (clade-mcp)
βββ orchestrator/ # FastAPI web UI + worker pool + task queue
β βββ server.py # App, routes, WebSocket
β βββ worker.py # WorkerPool, SwarmManager
β βββ task_queue.py # SQLite-backed task CRUD
β βββ mcp_server.py # MCP server (local dev version)
β βββ web/ # Single-page dashboard
βββ configs/
β βββ skills/ # 29 skill definitions (SKILL.md + prompt.md)
β βββ hooks/ # 14 event hooks + lib/
β βββ agents/ # 5 agent definitions
β βββ scripts/ # 30 shell + Python utilities
βββ adapters/openclaw/ # OpenClaw integration (mobile monitoring)
βββ templates/ # Settings, CLAUDE.md, corrections templates
βββ docs/ # Guides and research
Monitor and control overnight loops from your phone via OpenClaw.
| Skill | Trigger | Effect |
|---|---|---|
| clade-status | "how's the loop going" | Iteration progress, cost, commits |
| clade-control | "start a loop to fix tests" | Start/stop autonomous loops |
| clade-report | "what did it do overnight" | Session report, cost breakdown |
See adapters/openclaw/README.md for setup.
Contributions welcome β code, docs, issue triage, bug reports. See CONTRIBUTING.md.
- Loop on non-code tasks (research/docs) fails silently β workers produce no diff, loop reports failure
- Workers inherit parent env β project-specific env vars leak into worker shells; sanitize before overnight runs
- Context budget is per-session β multi-day runs may exhaust context; use
/handoff+/pickup
