← Discover MCPs and Agents
C
AgentAI & MLGitHub

Clade

Turn Claude Code and Codex from chat assistants into autonomous coding systems

Links

README

From the repo.

English | 中文

Clade

PyPI PRs Welcome good first issue

Clade

A provider-neutral delivery control plane for coding agents.

Clade turns agent work into reviewable delivery: resolved execution identity, immutable evidence, calibrated verification, correction learning, and truthful Git history. It ships native Claude Code and Codex surfaces plus an MCP bridge for other clients.

Use the full Claude Code framework, the native Codex plugin, or the provider-neutral MCP bridge. The optional Orchestrator adds a provider/model registry, evidence and eval control plane, verifier-aware routing, delivery state, and multi-project fleet truth.

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.

Table of Contents

  1. Install
  2. MCP Server
  3. The Trust Loop
  4. What It Does
  5. Self-Learning Mechanisms
  6. Skills
  7. Supported Languages
  8. Documentation
  9. Dotfile Sync
  10. Architecture
  11. OpenClaw Integration
  12. Contributing
  13. License

Install

Claude Code — Full Framework

git clone https://github.com/shenxingy/clade.git
cd clade && ./install.sh

Installs skills, hooks, agents, scripts, and safety guardian. Start a new Claude Code session to activate.

The same run also wires the other runtimes it detects: a managed policy block in ~/.codex/AGENTS.md (Codex), bridge agents/hooks for Kimi Code (~/.kimi-code/), and the vendor-neutral ground rules from configs/AGENTS.md at ~/.agents/AGENTS.md and ~/.kimi-code/AGENTS.md — the same don't-block policy text for every AGENTS.md-aware runtime. See docs/codex.md for the per-vendor contract.

Requires: jq. Platform: Linux, macOS, and Windows via Git Bash (native CMD/PowerShell without bash is out of scope).

Codex — Native Plugin

codex plugin marketplace add shenxingy/Clade
codex plugin add clade@clade

Start a new Codex thread, then invoke a workflow naturally or explicitly with the plugin-qualified names $clade:review, $clade:verify, $clade:investigate, $clade:green, and the other bundled skills. Open /hooks once to review and trust Clade's session-context and command-safety hooks.

Run $clade:codex-usage setup minimal for a compact native footer. $clade:codex-usage defaults to the equally compact project(branch)-9% (6d) pace view; icon and detail styles are optional. It never reads or exposes Codex credentials.

The native plugin runs directly in Codex and does not require Claude Code. It currently ships 27 provider-native core workflows; Claude-specific overnight orchestration remains in the full framework. See Native Codex Support.

MCP Server Only

If you want Clade tools in another MCP client:

pip install --upgrade clade-mcp

The Codex execution runtime arrived in 0.2.0 and keeps Claude as the backwards-compatible default; the package is now at 0.3.1. See MCP Server below for configuration and the MCP package guide for all runtime and sandbox options.

MCP Server — Use Skills in Any AI Editor

The MCP package exposes 34 bundled Clade skills, plus compatible user-installed skills, as callable tools via the Model Context Protocol. It can execute them with either Claude or Codex.

Claude Desktop or another client using Claude as its runtime:

{
  "mcpServers": {
    "clade": { "command": "uvx", "args": ["clade-mcp"] }
  }
}

Cursor / Windsurf:

{
  "mcpServers": {
    "clade": {
      "command": "clade-mcp",
      "env": { "CLADE_RUNTIME": "codex" }
    }
  }
}

CLADE_RUNTIME accepts claude (the backwards-compatible default), codex, or auto. Prefer the native Codex plugin inside Codex itself; adding the MCP server there would duplicate skills and spawn nested agent sessions. The same applies inside the full Claude Code framework, where Clade skills are already native.

The Trust Loop

Clade keeps six concerns separate so a green-looking run cannot silently change runtime, account, history, or evidence semantics:

LayerContract
Execution identityAgent runtime, native connection, inference provider, wire protocol, and opaque model are resolved independently
EvidenceEvery attempt can carry append-only task, timing, Git SHA, test, oracle, cost, artifact, and delivery evidence with digest-linked revisions
Verifier calibrationCheap→strong routing is default-off and requires deterministic verifier evidence; observational reports never mutate policy
Correction learningExplicit corrections pair rejected work with human context and create reviewable eval candidates; no automatic ground-truth path
DeliveryExact reviewed SHA, live PR topology, CI, and repository policy determine merge semantics; squash is never the universal default
Fleet truthProvider catalogs, task state, usage, evidence health, and delivery status remain provenance- and freshness-aware across projects

Evidence and oracle approval are gates and audit material, not authorization to publish or merge. Repository policy and explicit authority still control external side effects.

What It Does

WhenWhat firesEffect
Session opens in a git reposession-context.shLoads git context, handoff state, correction rules, model guidance
Session opens in a git repocommit-archeology.shMines git log for recurring fix patterns (wiring/deploy/compat gaps, Claude-overridden) — injects top 4
Claude runs a bash commandpre-tool-guardian.shBlocks dangerous ops: migrations, rm -rf, force push, DROP TABLE
Claude edits codepost-edit-check.shAsync type-check (tsc, pyright, cargo check, go vet, etc.)
You correct Claudecorrection-detector.shLogs correction, prompts Claude to save a reusable rule
Claude marks task doneverify-task-completed.shAdaptive quality gate: compile + lint, build + test in strict mode

See How It Works for the hook reference. 32 hooks ship; the guide documents the ones you are likely to tune — ls configs/hooks/ is the complete list.

Self-Learning Mechanisms

Three mechanisms keep Clade aligned with reality:

  • Commit Lessons (reactive) — commit-archeology.sh mines git log for recurring fix patterns (wiring-gap, deploy-gap, compat-gap, claude-overridden) and injects the top 4 at every session start.
  • Doc Align (preventive) — doc-align.py declares shared facts in docs/facts.json (auto-derived from filesystem); checks/auto-fixes drift across every *.md. A PostToolUse hook flags drift the moment you edit a doc, so stale counts never reach commit.
  • Correction Pairing (human-grounded) — explicit corrections pair rejected work with the replacement context. Orchestrator corrections enter quarantine as eval candidates; only explicit human review can promote corpus truth.

Commit Lessons and Doc Align run locally in the full Claude distribution and silently no-op in repos that have not opted in. Correction evidence never turns an inferred revert or async signal into an automatic rule.

See Self-Learning Mechanisms for full details, detectors, schemas, and tunable env vars.

Skills (144)

Core Workflow

SkillWhat it does
/commitCreate repository-adaptive checkpoint commits; publish when authorized
/syncCheck off completed TODOs, append session summary to PROGRESS.md
/reviewWalks every VERIFY.md checkpoint, fixing failures in-session until all pass
/greenRuns the repo's real CI gates locally and drives them green — never weakens a gate

Autonomous Operation

SkillWhat it does
/startAutonomous session launcher — morning brief, overnight runs, cross-project patrol
/loop GOALGoal-driven improvement loop — supervisor plans, workers execute in parallel
/iloop TASKIn-session iterative loop — Stop hook re-prompts until done (no background workers)
/batch-tasksExecute TODO steps via unattended sessions (serial or parallel)
/orchestrateDecompose goals into tasks for worker execution
/handoffSave session state for context relay between agents
/pickupResume from previous handoff — zero-friction restart
/worktreeCreate git worktrees for parallel sessions
/pokeHeartbeat after esc — 3-line status, auto-continues if still progressing
/statusSession dashboard — background agents, loops, worktrees, unpushed commits
/goExecute the recommendation from your most recent A/B/C option set

Code Quality

SkillWhat it does
/review-pr NAI code review on a PR diff — Critical / Warning / Suggestion
/merge-pr NMerge an exact reviewed PR with topology- and history-aware semantics, then clean up
/investigateRoot cause analysis — no fix without confirmed hypothesis
/incident DESCIncident response — diagnose, postmortem, follow-up tasks
/csoSecurity audit (OWASP + STRIDE)
/artifactOne report page a PhD, a PM and an engineer can read at a glance — section spine per page type (why the numbers, what was done, next step), publication-quality figures, both themes, linted by artifact-lint.py before it is published
/landscapeWhole-system report — every part, surface, owner, gap, and abandoned attempt, as a published artifact (the /artifact architecture spine at whole-system scale)
/mapGenerate ARCHITECTURE.md with a Mermaid module graph (tree only, no git history)

Research & Planning

SkillWhat it does
/research TOPICDeep web research, synthesize to docs/research/
/model-researchLatest Claude model data + auto-update configs
/next"What's next?" — fast 1-shot recommendation (default); /next deep for multi-round interview
/briefMorning briefing — overnight commits, costs, next steps
/retroEngineering retrospective from git history
/frontend-designCreate production-grade frontend interfaces

System

SkillWhat it does
/auditClean up correction rules — promote, deduplicate, remove stale
/document-releasePost-ship doc sync (README, CHANGELOG, CLAUDE.md)
/pipelineHealth check for background pipelines
/providerSwitch LLM provider
sltToggle statusline quota pace indicator

Content families

Blog & Content (30) · SEO (25) · Paid Ads (23) · Email (6) — per-skill tables live in When to Use What, which also carries the per-skill usage guidance for the core workflow commands above.

Supported Languages

Detected per project, with hooks and agents adapting to what they find: TypeScript/JavaScript, Python, Rust, Go, Swift, Kotlin/Java, LaTeX. The per-language checker and test-runner table lives in How It Works. A check whose tool is not installed skips silently rather than failing the run.

Documentation

GuideContents
Native Codex SupportPlugin installation, native skills/hooks, MCP runtime selection, compatibility boundaries
MCP Packageclade-mcp 0.3.1 installation, runtime selection, sandbox and skill catalog
0.2.0 Release NotesNative Codex support, MCP changes, upgrade steps, and validation results
ChangelogRelease history and upgrade notes
Maximize ThroughputSkip permissions, batch tasks, parallel worktrees, terminal + voice
Orchestrator Web UIChat-to-plan, worker dashboard, settings, iteration loop
Overnight OperationTask queue, parallel sessions, context relay, safety
How It WorksHooks, agents, skills internals, correction learning, model selection
ConfigurationSettings, thresholds, adding custom hooks/agents/skills
When to Use WhatWhich skill to reach for, per situation — core workflow commands in depth, content families by table
Who to Learn FromVetted watch-list of the agentic-coding frontier — people, repos, bot behavior, reviewed quarterly

Dotfile Sync

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 backend

Fully automatic once configured. See Configuration for details.

Architecture

Claude CLI layer (configs/ → installed to ~/.claude/): Full skill, hook, script, and agent framework.

Codex plugin (plugins/clade/): Generated provider-native core skills plus Codex lifecycle hooks. Distributed through .agents/plugins/marketplace.json.

Orchestrator (orchestrator/): Optional evidence, evaluation, delivery, and fleet control plane. It resolves native runtime connections without copying credentials, watches workers, calibrates verifier-aware routing, records immutable attempt evidence, and exposes exact delivery state. Native CLI/plugin surfaces work independently.

Web UI (orchestrator/web/): Read-only observation window. Task queue, worker status, cost dashboard, settings. No production logic — all executes via CLI.

OpenClaw Integration

Monitor and control overnight loops from your phone via OpenClaw.

SkillTriggerEffect
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.

Contributing

Contributions welcome — code, docs, issue triage, bug reports. See CONTRIBUTING.md.

Known Limitations

  1. Loop on non-code tasks (research/docs) fails silently — workers produce no diff, loop reports failure
  2. Workers inherit parent env — project-specific env vars leak into worker shells; sanitize before overnight runs
  3. Context budget is per-session — multi-day runs may exhaust context; use /handoff + /pickup

License

MIT

Collected info

  • ★ 9 stars
  • ⎇ 6 forks
  • Language: Python
  • Source updated: 9/25/2026