Agent Harness
Compiles a goal into a verifiable task plan and enforces an execute–verify–retry–escalate loop through a state machine.
AutomationAdvanced★ 24,151⑂ 3,405AI score 8/10Last updated: Aug 9, 2026
What it does
Takes a single goal and compiles it into a verifiable task plan, then drives that plan through a durable, state-file-based loop until a legitimate close.
goal_compiler.py: turns a goal into plan.json; vague goals are refused with exit 3 plus forcing questions.loop_controller.py: managesinit → next → record → verify → close. Checks are run by the controller itself via subprocess, so the agent never gets to declare its own work verified.- Budgets are terminal: default 3 attempts per task and 12 loop iterations; exhaustion escalates to a human instead of faking success.
closeis refused (exit 4) while any task is unverified; only a human may waive.- State lives in
.agent-harness/state.json, so a fresh session can resume from plan + state alone.
Who it's for
- Anyone tired of agents claiming "done" when nothing actually passes.
- Teams running long goals across multiple sessions who need reproducibility.
- Teams wrapping domain skill folders (engineering, marketing, finance…) into self-verifying loops.
- Engineers who want reward hacking (editing the gate to pass it) structurally blocked.
Examples
- Payments SLO design: compile "audit the payments service and design an SLO with an error budget" against the engineering manifest; each task only closes when its check command exits 0.
- Marketing loop: build a harness from the marketing domain manifest to run research → copy → checklist verification, escalating to a named reviewer after 3 failed attempts.
- CI manifest check: regenerate manifests with
harness_manifest_builder.py --no-timestampand fail CI on any diff, keeping harnesses in sync as skills change.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .gemini/skills/agent-harness folder from the GitHub repo alirezarezvani/claude-skills into my ~/.claude/skills/agent-harness/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/alirezarezvani/claude-skills.git && mkdir -p ~/.claude/skills && cp -r claude-skills/.gemini/skills/agent-harness ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and cd into your working directory.
- Clone the repo:
git clone https://github.com/alirezarezvani/claude-skills.git - Copy the skill into your Claude skills folder:
mkdir -p ~/.claude/skills && cp -r claude-skills/.gemini/skills/agent-harness ~/.claude/skills/ - Confirm Python 3 is available:
python3 --version(required by the scripts). - From the skill folder, run
python3 scripts/goal_compiler.py --sampleandpython3 scripts/loop_controller.py --sample; both should exit 0. - Restart Claude Code and try a trigger phrase such as "run this goal through the engineering harness".
- Test in a scratch repo first:
verifyshell-executes check commands, so only run it on plan/state files you orgoal_compiler.pygenerated.
View source on GitHub ↗License: MIT