/install agent-harness-doctor
Agent Harness Doctor
Based on Anthropic's "Effective Harnesses for Long-Running Agents" and ClawHub's agent-harness-architect, this skill automatically diagnoses and hardens your OpenClaw harness.
The 8 Dimensions
| Dimension | What it checks | Why it matters |
|---|---|---|
| Session Bridge | Is there a structured state file (agent-progress.json) that survives restarts? |
Without this, every session starts blank |
| Fixed Startup Sequence | Does the agent have a mandatory first N steps (read bridge, smoke test, etc.)? | Prevents skipping crucial initialization |
| Smoke Test | Does the agent verify environment (network, API keys, disk) before tasks? | Catches failures early |
| Atomic Checkpoint | After each task, does agent commit/save state? | Ensures progress isn't lost |
| Output Self-Verification | Before saying "done", does agent validate the result? | Prevents false completions |
| State File Format | Is state stored as JSON (not Markdown) to resist accidental edits? | Markdown is too easy for LLM to mangle |
| Multi-Agent Protocol | If multiple agents, is there clear message passing? | Avoids race conditions and confusion |
| Fallback Plan | Does agent have a Plan B if a dependency fails? | Increases robustness |
Usage
Run Diagnostic
tool("agent-harness-doctor", "harness_check", {"fix_apply": []})
Output includes:
{
"summary": {
"score": 6.5,
"grade": "B",
"weakest_dimension": "Session Bridge"
},
"dimensions": [
{
"id": "session_bridge",
"name": "Session Bridge",
"score": 2,
"max": 10,
"finding": "No agent-progress.json file found",
"recommendation": "Create agent-progress.json with lastSession, taskTracking, environmentStatus sections",
"p0": true
},
...
],
"plan": {
"P0": ["create_session_bridge", "fix_startup_sequence"],
"P1": ["add_smoke_test", "enable_atomic_checkpoint"],
"P2": ["output_verification_gate", "multi_agent_protocol"]
}
}
Auto-Apply P0 Fixes
tool("agent-harness-doctor", "harness_check", {"fix_apply": ["create_session_bridge", "fix_startup_sequence"]})
The tool will:
- Create
agent-progress.jsonin workspace root with template - Update
AGENTS.mdorCLAUDE.mdto include a fixed startup sequence section - Log changes made
Apply Single Fix
tool("agent-harness-doctor", "apply_fix", {"fix_id": "create_session_bridge"})
Fixes Implemented
create_session_bridge— generatesagent-progress.jsonwith schema v1.0fix_startup_sequence— inserts mandatory startup steps into AGENTS.md (if present)add_smoke_test— adds pre-task environment check (gateway status, API connectivity)enable_atomic_checkpoint— adds post-task commit templateoutput_verification_gate— injects self-check prompt into system instructionsstate_json_format— migrates existing state files from MD to JSONfallback_plan_template— adds fallback handling patterns to AGENTS.md
Integration with Memory Stack
If memory-stack-core is installed, harness doctor will:
- Check WAL and buffer health as part of "Session Bridge" score
- Recommend enabling WAL auto-capture if missing
- Verify buffer threshold is set appropriately
Pricing
$99 one-time. Includes:
- Unlimited diagnostics
- Auto-fix application
- Future dimension additions
Based on ClawHub's agent-harness-architect skill, extended with auto-fix capabilities.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-harness-doctor - After installation, invoke the skill by name or use
/agent-harness-doctor - Provide required inputs per the skill's parameter spec and get structured output
What is Agent Harness Doctor?
Automated audit and fix for OpenClaw agent harnesses. Scans your setup, scores on 8 dimensions (Session Bridge, Startup Sequence, Smoke Test, Atomic Checkpoi... It is an AI Agent Skill for Claude Code / OpenClaw, with 87 downloads so far.
How do I install Agent Harness Doctor?
Run "/install agent-harness-doctor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Harness Doctor free?
Yes, Agent Harness Doctor is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agent Harness Doctor support?
Agent Harness Doctor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Harness Doctor?
It is built and maintained by NeroAgent (@neroagent); the current version is v1.0.0.