harness-builder
Skill0 starsChanged 9 days agoMITView on GitHub
Build a self-improving agent harness for any project. Triggers - build agent harness, make agent reliable, self-improving agent, harness for project, add contract and checks to agent, stop agent saying done when not done.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- MahmudurRahman36/claude-skillstheir own version, first seen Nov 29, 2026
- YSAA1/harness-workflowtheir own version, first seen Oct 30, 2026
- li-xisheng/claude-skillstheir own version, first seen Sep 8, 2026
- duniecdawid/ultra-claudetheir own version, first seen Jul 16, 2026
- JohnnySun/skillstheir own version, first seen Jul 12, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- YSAA1/harness-workflow★ 3same name
- JohnnySun/skills★ 2same name
- li-xisheng/claude-skills★ 2same name
- duniecdawid/ultra-claude★ 0same name
- MahmudurRahman36/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- templates/AGENTS.mdAGENTS.md
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 7 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Ask the user only for:
- Very specific: line 14
Read package.json, Makefile, pyproject.toml, Cargo.toml, go.mod, CI config.
- Very specific: line 40
Do one step at a time. Verify each before the next.
- Very specific: line 42
Write harness/contract.md from templates/contract.md.
- Very specific: line 44
If AGENTS.md exists, strip line 1 (# AGENTS.md) from templates/AGENTS.md and append the ## Harness section (never overwrite it).
- Distinctive: line 46
Keep AGENTS.md under 60 lines (if appending exceeds 60 lines, move detailed existing rules into linked docs).
- Distinctive: line 52
Write the tool list into the contract.
- Very specific: line 53
Write harness/PROGRESS.md from templates/PROGRESS.md.
- Very specific: line 54
Write harness/checks.sh from templates/checks.sh.
- Distinctive: line 56
Run it on the untouched repo.
- Distinctive: line 57
If red, stop and ask the user.
- Very specific: line 58
Write harness/walls.json from templates/walls.json.
- Very specific: line 61
Add harness/traces/ and harness/status.json to .gitignore, and log any unconfirmed runner fields in harness/README-unverified.md.
- Very specific: line 63
Run Self-improvement setup below, log any unconfirmed hook/SDK fields in harness/README-unverified.md, and confirm every UNVERIFIED item …
- Very specific: line 78
Start from templates/PROPOSALS.md.
- Very specific: line 84
Do not edit harness/walls.json.
- Distinctive: line 85
Do not edit a gate to pass it.
- Distinctive: line 86
Stop at the retry cap or budget.
- Very specific: line 88
Commit after each completed unit.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Intake
- Ask the user only for:
- Project path.
- Task.
- Runner: Claude Code | Agent SDK | Managed Agents | other (follow the shared contract in
references/runners.md). - Risk: read-only | branch writes | prod.
- For
read-onlytasks, only.claude/settings.json(read-only permissions) andharness/checks.share needed; use the full harness below forbranch writesandprod.
- For
- Infer everything else from the repo (default
<CONTACT>to the user if none is found; ask for Managed Agents<model id>only when using Managed Agents). - Read package.json, Makefile, pyproject.toml, Cargo.toml, go.mod, CI config.
- Detect test, typecheck, lint, build commands.
- Detect protected paths: migrations, infra, secrets, lockfiles, CI config.
Triage
- Skip if no failure history exists.
- Classify each failure from transcripts, logs, git history, bug reports.
| Symptom | Class | Fix file |
| Wrong task, scope creep | contract | harness/contract.md |
| Breaks project rules | map | AGENTS.md |
| Wrong or misread tool | tool | tool definitions |
| Forgets decisions | state | harness/PROGRESS.md |
| Says done when not | sensor | harness/checks.sh |
| Retries same fix | exit | contract budget and retry cap |
| Touches forbidden files | wall | harness/PROPOSALS.md (human applies to harness/walls.json) |
| Right tools, right info, still fails for a human too | model | no harness change |
- Triage test, in order, per failure:
- Could it see the info?
- Could it do the action?
- Could it tell it was wrong?
- Any "no" = harness bug. Fix the harness, not the prompt.
Build
Do one step at a time. Verify each before the next. Fill every setup <PLACEHOLDER> across all created files before the first run (note: unit <id>: <summary> is a runtime commit template; verify no setup placeholders remain before Step 9).
- Write harness/contract.md from templates/contract.md.
- Each task-specific done_when item names a test that fails before and passes after.
- If AGENTS.md exists, strip line 1 (
# AGENTS.md) from templates/AGENTS.md and append the## Harnesssection (never overwrite it). If it does not exist, create it from templates/AGENTS.md.- Link detailed docs next to the code they govern.
- Keep AGENTS.md under 60 lines (if appending exceeds 60 lines, move detailed existing rules into linked docs).
- Confirm Stop rules contain every rule under "Write these rules into AGENTS.md".
- Define tools.
- One job per tool.
- Cap output size.
- Exit nonzero with a message on failure.
- Write the tool list into the contract.
- Write harness/PROGRESS.md from templates/PROGRESS.md.
- Write harness/checks.sh from templates/checks.sh.
- Fill TEST_CMD, TYPECHECK_CMD, LINT_CMD, BUILD_CMD from detected commands.
- Run it on the untouched repo. It must run green.
- If red, stop and ask the user.
- Write harness/walls.json from templates/walls.json.
- Fill every key in walls.json.
- Copy and run the runner scripts from
templates/hooks/(Claude Code) ortemplates/sdk/(Agent SDK) perreferences/runners.md. - Add
harness/traces/andharness/status.jsonto.gitignore, and log any unconfirmed runner fields inharness/README-unverified.md.
- Set retry cap 2 and a time/token budget (default
30minutes,100000tokens) in bothharness/contract.mdandAGENTS.md. - Run Self-improvement setup below, log any unconfirmed hook/SDK fields in
harness/README-unverified.md, and confirm everyUNVERIFIEDitem before Step 9. - Dry run the agent on one trivial unit.
- Confirm a trace file appears in harness/traces/.
- Confirm checks.sh ran.
- Append a fake failure event to a new trace in harness/traces/. Start a run. Confirm the agent follows IMPROVE.md, adds one HARNESS-LOG.md row and leaves checks.sh green. Delete the fake trace, revert any drill harness edit/regression check, remove any drill rows in
HARNESS-LOG.md/PROPOSALS.md, resetharness/PROGRESS.mdandharness/status.json, and revert the trivial unit's code/commit afterwards.
Self-improvement setup
- harness/traces/
- One file per run:
<run_id>.jsonl. - One event per line. Match templates/trace-event.schema.json.
- One file per run:
- harness/HARNESS-LOG.md
- One row per harness change. Start from templates/HARNESS-LOG.md.
- harness/IMPROVE.md
- Copy templates/IMPROVE.md verbatim.
- harness/PROPOSALS.md
- Start from templates/PROPOSALS.md. Log every proposed walls.json change here.
- Runner hooks. Follow references/runners.md.
- Hook 1: append a trace event on every tool call.
- Hook 2: on stop, run harness/checks.sh and write
gate_result(plusfailure/escalateon fail/cap).
Write these rules into AGENTS.md
- Do not edit harness/walls.json. Propose changes in harness/PROPOSALS.md.
- Do not edit a gate to pass it.
- Stop at the retry cap or budget. Escalate.
- Irreversible actions require human approval: deploy, delete, migrate, send, publish, force-push.
- Commit after each completed unit. Message:
unit <id>: <summary>. - Record every decision, dead end, and blocker in harness/PROGRESS.md.
Report to user
Send one message containing:
- Files created.
- checks.sh result.
- Dry-run result.
- Unresolved UNVERIFIED items (if any).
- Open questions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

