Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

Agent Harness

Compiles a goal into a verifiable task plan and enforces an execute–verify–retry–escalate loop through a state machine.

AutomationAdvanced24,1513,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: manages init → 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.
  • close is 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

  1. 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.
  2. 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.
  3. CI manifest check: regenerate manifests with harness_manifest_builder.py --no-timestamp and fail CI on any diff, keeping harnesses in sync as skills change.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal and cd into your working directory.
  2. Clone the repo: git clone https://github.com/alirezarezvani/claude-skills.git
  3. Copy the skill into your Claude skills folder: mkdir -p ~/.claude/skills && cp -r claude-skills/.gemini/skills/agent-harness ~/.claude/skills/
  4. Confirm Python 3 is available: python3 --version (required by the scripts).
  5. From the skill folder, run python3 scripts/goal_compiler.py --sample and python3 scripts/loop_controller.py --sample; both should exit 0.
  6. Restart Claude Code and try a trigger phrase such as "run this goal through the engineering harness".
  7. Test in a scratch repo first: verify shell-executes check commands, so only run it on plan/state files you or goal_compiler.py generated.