
Agent Harness Construction
Tune tool schemas, observations, and recovery paths so your coding agent completes multi-step tasks more reliably.
Overview
Agent Harness Construction is an agent skill most often used in Build (also Ship, Operate) that designs action spaces, observations, and recovery so agents converge on completion.
Install
npx skills add https://github.com/affaan-m/everything-claude-code --skill agent-harness-constructionWhat is this skill?
- Four quality levers: action space, observations, recovery, and context budget
- Granularity rules: micro-tools for deploy/migrations, medium for edit loops, macro only when round-trips dominate
- Structured tool responses with status, summary, next_actions, and artifacts
- Error recovery contract: root-cause hint, safe retry, explicit stop condition
- Context budgeting: minimal system prompt, skills on demand, compact at phase boundaries
- Four core harness quality dimensions: action space, observation, recovery, context budget
Adoption & trust: 4.8k installs on skills.sh; 210k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent has tools and a system prompt, but it still wanders, misreads outputs, or loops on errors because the harness—not the model—is underspecified.
Who is it for?
Indie builders designing or refactoring custom agent toolkits, MCP bundles, or internal coding agents before scaling automations.
Skip if: One-shot chat without persistent tools, or teams that only need a single prebuilt integration with no custom harness.
When should I use this skill?
Improving how an agent plans, calls tools, recovers from errors, and converges on completion.
What do I get? / Deliverables
You leave with explicit tool granularity, observation shapes, and recovery contracts that make plans and tool calls predictable—ready to implement in your agent config or skill stack.
- Action-space and observation contract for your tool suite
- Error recovery and stop-condition checklist per tool
- Context-budget plan (system vs on-demand skills)
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Harness design is where solo builders define how the agent acts—canonical shelf is agent-tooling during product build. Action-space, observation contracts, and context budgeting are core agent-runtime design work, not one-off app features.
Where it fits
Split deploy and migration into micro-tools with narrow schemas before wiring your MCP server.
Standardize every integration response with status, summary, next_actions, and artifact paths.
Add explicit stop conditions on permission-sensitive tool errors instead of blind retries.
Compact context at phase boundaries after a planning burst rather than at arbitrary token limits.
How it compares
Design discipline for tool-and-observation contracts—not a drop-in MCP server or a generic brainstorming ritual.
Common Questions / FAQ
Who is agent-harness-construction for?
Solo builders and small teams authoring agent skills, MCP tool sets, or harness configs who want fewer failed multi-step runs.
When should I use agent-harness-construction?
In Build when defining tools; in Ship when hardening deploy/migration micro-tools and error paths; in Operate when compaction and recovery at phase boundaries matter.
Is agent-harness-construction safe to install?
It is procedural documentation with no runtime permissions by itself; review the Security Audits panel on this Prism page before trusting the parent repo bundle.
SKILL.md
READMESKILL.md - Agent Harness Construction
# Agent Harness Construction Use this skill when you are improving how an agent plans, calls tools, recovers from errors, and converges on completion. ## Core Model Agent output quality is constrained by: 1. Action space quality 2. Observation quality 3. Recovery quality 4. Context budget quality ## Action Space Design 1. Use stable, explicit tool names. 2. Keep inputs schema-first and narrow. 3. Return deterministic output shapes. 4. Avoid catch-all tools unless isolation is impossible. ## Granularity Rules - Use micro-tools for high-risk operations (deploy, migration, permissions). - Use medium tools for common edit/read/search loops. - Use macro-tools only when round-trip overhead is the dominant cost. ## Observation Design Every tool response should include: - `status`: success|warning|error - `summary`: one-line result - `next_actions`: actionable follow-ups - `artifacts`: file paths / IDs ## Error Recovery Contract For every error path, include: - root cause hint - safe retry instruction - explicit stop condition ## Context Budgeting 1. Keep system prompt minimal and invariant. 2. Move large guidance into skills loaded on demand. 3. Prefer references to files over inlining long documents. 4. Compact at phase boundaries, not arbitrary token thresholds. ## Architecture Pattern Guidance - ReAct: best for exploratory tasks with uncertain path. - Function-calling: best for structured deterministic flows. - Hybrid (recommended): ReAct planning + typed tool execution. ## Benchmarking Track: - completion rate - retries per task - pass@1 and pass@3 - cost per successful task ## Anti-Patterns - Too many tools with overlapping semantics. - Opaque tool output with no recovery hints. - Error-only output without next steps. - Context overloading with irrelevant references.