▲ a toolkit for the Claude Code CLI

THE SKILLHARNESS

Prompt-powered /skills that carry a change from brainstorm to ship — with a risk/trust harness deciding how careful to be at every step.

The one principle everything turns on:
Ceremony scales with risk. Human interruption scales with ambiguity.

read the concept
15
skills
3
risk lanes
8
hard gates
11
hooks
cat HARNESS.md

Two layers: the engine and the harness

The engine answers “how do I build this?” The harness answers “how careful should I be, and who needs to approve?” They're independent — and that's the whole trick.

⚙ The engine — skills

lives in  skills/ · agents/

Invocable /skills that actually do the work. Each has hard gates and a defined handoff to the next.

  • brainstorm · research · plan
  • build · review · ship
  • chained — no skipping steps

🛡 The harness — risk/trust

lives in  feature-intake · hooks/ · rules/

A thin control layer that decides — before the engine runs — how much process a change needs and when to ask a human.

  • classify lane + confidence
  • route to the right path
  • corroborate the claim at commit

Two independent dials

🎚

RISK

↓ decides

how much proof & process — planning, reviews, evidence, rollback — a change carries.

🙋

AMBIGUITY

↓ decides

whether a human is asked — never to classify risk, only to confirm intent or authorize a dangerous boundary.

So a high-risk-but-clear change runs autonomously through heavy proof. A tiny-but-unclear change stops to ask. Risk ≠ interruption.

/feature-intake

Try the classifier

/feature-intake runs first on every change request — a 10-flag risk checklist + hard gates assign a lane, a confidence score decides whether a human is needed. Pick a request and watch it route.

// click a request to classify it
feature-intake — classify & route
// awaiting input… select a request on the left ◂
the lane picks the path

Three risk lanes

The lane decides how much of the workflow actually runs. Skipping a step the lane requires is a hard gate violation.

tiny// typo · copy · narrow one-file edit
plan? none human gate? none safety net machine hooks
request direct Edit brainstorm plan review ship

Full auto. No planning, no human confirmation — the machine gates (ruff-on-edit, commit-quality-gate, risk-corroboration) are the safety net.

normal// a clear feature, in-place, < 1 day
plan? yes human gate? only if low-confidence / ambiguous review two-stage per task
request xia2 writing-plans subagent-driven-development ship

Auto with proof gates. Clear work proceeds with a notify-and-proceed notice instead of blocking; per-task spec→quality review stays always-on.

high-risk// auth · migration · external provider · high-blast
plan? yes — full chain human gate? on ambiguity or a hard gate extra recorded rollback
request brainstorming xia2 writing-plans worktree build ship

Auto-plan, gated-execute. The full chain runs; a hard gate discovered mid-task escalates regardless of the original lane.

grep -i 'hard gate' rules/

The hard gates

These categories always force high-risk and can only be lowered by a human narrowing scope. The agent can't classify a risky change as "tiny" and slip it through — a hook corroborates the diff against the declared lane at commit time.

⛔ auth
login, sessions, token handling
⛔ authorization
permission & access checks
⛔ data-loss / migration
schema change, drop, destructive op
⛔ audit / security
logging, secrets, security-sensitive
⛔ external provider
broker, AI provider, webhook behavior
⛔ public contract
API route/method, response envelope, client-visible behavior
⛔ weakening validation
removing / loosening a guard or check
⛔ high-blast file
settings.json, hooks/*, skill engines

These eight are detectablerisk-corroboration.sh scans the diff for them. Three more are judgment gates that no regex can catch, so an agent or human must call them: remove-functionality · session-scope · replace-service.

A hard gate hit and not yet narrowed by a human → write a block to specs/<slug>/ESCALATIONS.md and stop. It's deny-on-no-response: with no recorded decision, the work stays blocked.

the full chain

brainstorm ship

Each step hands off to the next. /feature-intake runs first and decides how many of these steps apply — the high-risk lane runs them all; tiny drops straight to a direct edit.

/feature-intakeruns first
Classify the request — 10-flag risk checklist + hard gates → a lane, plus a confidence score.
specs/<slug>/SUMMARY.md (Lane / Confidence / route)
/brainstorminghigh-risk lane
Explore intent, requirements & design through dialogue — before any code.
specs/<slug>/design.md
/xia2research
Investigate what already exists — locally, upstream on GitHub, and in version-matched docs — before building.
specs/<slug>/research-brief.md
/writing-plansplan
Turn the design into XML tasks grouped into waves (parallel-safe, each with a <verify> command).
specs/<slug>/PLAN.md
/visual-plannerauto
A deterministic script renders the plan to a self-contained HTML for visual review, then opens it.
specs/<slug>/PLAN.html
/using-git-worktreesisolate
Create an isolated worktree + branch so feature work never touches the main workspace.
worktree + branch
/subagent-driven-developmentbuild
Execute the plan task-by-task — a fresh subagent per task, two-stage review (spec compliance → code quality), then delegates the two whole-diff review passes below.
implemented + reviewed tasks
/correctness-reviewreview
Adversarial runtime-bug hunt over the whole diff — find → score (0–100 per finding, threshold 80) → classify → fix-loop. Invokable standalone on any diff.
fixes or escalations
/intent-reviewfinal pass
The last gate before shipping. Compares the diff against the original request — deliberately blind to PLAN.md, so a plan that drifted from what you asked for can't launder the drift.
intent verdict or escalation
/compoundlearn
Crystallize any non-obvious bug fix, pattern, or decision into discoverable knowledge.
docs/solutions/<category>/<slug>.md
/finishing-a-development-branchship
PR description, review checklist, merge.
🚀 shipped
ls skills/

The skill library

Each skill is a Markdown prompt program with a defined scope, hard gates, and a handoff. Click one to expand.

cat settings.json | jq .hooks

Rules enforced by code, not hope

What can be mechanized is a hook — convention is the residue, not the rule. Hooks fire on Claude Code lifecycle events. wired = registered & firing · dormant = on disk, not registered.

hooktriggeractionstatus
check-untracked-py.shPreToolUse · gitBlock commit/push if untracked .py files exist● wired
commit-quality-gate.shPreToolUse · git commitSecrets scan + debug-artifact check + targeted pytest● wired
risk-corroboration.shPreToolUse · git commitBlock if staged diff trips a hard gate but declared lane is below high-risk● wired
branch-guard.shPreToolUse · git commitWarn when committing on main● wired
branch-isolation-guard.shPreToolUse · Edit/WriteBlock a code edit when implementation is underway on a shared branch with no isolated worktree● wired
ruff-on-edit.shPostToolUse · Edit/Writeruff --fix + ruff format on edited .py● wired
blast-radius-check.shPostToolUse · Edit/WriteWarn when an edit touches a file outside the active plan's file set● wired
render-plan-on-write.shPostToolUse · Edit/WriteAuto-render specs/<slug>/PLAN.mdPLAN.html on save (deterministic, no LLM)● wired
scope-gate.shUserPromptSubmitWarn on implementation intent with no plan referenced (lane-aware)● wired
session-knowledge.shSessionStartLoad the knowledge base (INDEX + critical patterns) into session context; never blocks● wired
state-breadcrumb.shSessionEndAppend a dated session breadcrumb to specs/STATE.md for cross-session resumption; never blocks● wired
auto-test-on-change.shPostToolUse · Edit/WriteRun the project's tests when a test file is touched — runner detected per ecosystem (pytest / vitest / jest / go test)○ dormant
protected-path-guard.shPreToolUse · Edit/WriteBlock a write to a high-blast file unless a break-glass reason is pre-registered. Dormant by design — wiring it is itself a hard-gate change○ dormant
the supporting cast

A graph that knows the code, a memory that compounds

Two systems make the skills smarter over time — a structural knowledge graph for navigation, and a knowledge base that turns every solved problem into reusable context.

code-review-graph · MCP

A persistent, incremental knowledge graph — Tree-sitter parses the codebase into structural nodes & edges. Skills query it before Grep/Glob: it's faster, cheaper in tokens, and gives structure that file-scanning can't.

  • detect_changes — risk-scored review of a diff
  • get_impact_radius — blast radius of a change
  • query_graph — callers · callees · imports · tests
  • semantic_search_nodes — find by name or keyword

/compound + docs/solutions

After a session with a non-obvious fix, pattern, or decision, /compound mines the transcript and writes a discoverable doc. Four track types: bug · knowledge · decision · failure (a tried-and-abandoned approach, so it's never repeated).

  • front-matter: module · tags · severity · applicable_when
  • critical-patterns.md — read at planning time
  • every bug doc requires a ## Regression Test
  • read back by /brainstorming & /xia2

There's also context7 (a user-level MCP server) for fetching version-matched library docs on demand — so skills answer from current docs, not stale training data.

get started

Drop it into your repo

Skills are loaded by the Claude Code CLI. Add the harness to an existing project with one line.

01 · Install into an existing project

Clones the harness, copies it in, and builds .claude/. Needs git + jq. Existing files are backed up first.

# one-liner — adds skills, agents, hooks & rules
curl -fsSL "https://raw.githubusercontent.com/minhtran3124/agent-harness/main/scripts/install-harness.sh?$(date +%s)" | bash -s -- --yes

02 · Wire the knowledge graph (MCP)

The repo wires code-review-graph via uvx — no manual pip install. You just need uv.

curl -LsSf https://astral.sh/uv/install.sh | sh   # installs uv + uvx
uvx code-review-graph serve                        # exactly what mcp.json invokes

03 · Or develop on the harness itself

Root dirs are the source of truth; Claude Code loads a derived, gitignored .claude/. Rebuild it, then restart Claude Code.

bash scripts/deploy-harness.sh   # idempotent: installs, then updates

04 · Use it

In any change request, the harness starts with intake — then routes you down the right path.

/feature-intake   # classify → lane + confidence → route