agent-harness-construction

Designs agent action spaces, tool schemas, and observation formats for higher task completion rates.

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill agent-harness-construction-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-harness-construction
Source: https://github.com/ibytechaos/claude/tree/main/plugins/everything-claude-code/skills/agent-harness-construction
Command: npx skills add https://github.com/ibytechaos/claude --skill agent-harness-construction-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often fail because of poorly designed tool interfaces, opaque outputs, and uncontrolled context growth. This Skill provides a structured methodology for designing agent harnesses—action spaces, tool definitions, observation formats, and error recovery contracts—so agents complete tasks more reliably. ## Core Features & Use Cases - Action Space Design: Rules for stable tool naming, schema-first narrow inputs, deterministic outputs, and granularity guidance (micro, medium, macro tools). - Observation & Recovery Contracts: Standard response shapes with status, summary, next_actions, and artifacts, plus error contracts with root cause hints, safe retries, and stop conditions. - Architecture & Benchmarking Guidance: Compares ReAct, function-calling, and hybrid patterns, and defines metrics like completion rate, retries per task, pass@1/pass@3, and cost per successful task. - Use Case: When building a coding agent whose tool calls frequently fail or loop, apply this Skill to restructure tool schemas, add recovery hints to every error path, and set up completion-rate benchmarks. ## Quick Start Ask the agent to review your current tool definitions and redesign the action space and error recovery contract using the agent harness construction guidelines.

Frequently Asked Questions about agent-harness-construction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design tool definitions for an AI agent?

Use stable, explicit tool names with schema-first narrow inputs and deterministic output shapes. Avoid catch-all tools unless isolation is impossible, and match granularity to risk: micro-tools for high-risk operations, medium tools for common loops.

What should an agent tool response include?

Every tool response should include a status field (success, warning, or error), a one-line summary, actionable next_actions, and artifacts such as file paths or IDs. This structure lets the agent plan its next step without guessing.

ReAct vs function-calling: which agent architecture should I use?

ReAct suits exploratory tasks with uncertain paths, while function-calling fits structured deterministic flows. A hybrid approach—ReAct planning with typed tool execution—is recommended for most production agents.

How do I handle agent tool errors and retries?

Every error path should include a root cause hint, a safe retry instruction, and an explicit stop condition. This prevents infinite retry loops and gives the agent enough context to recover or halt cleanly.

What metrics measure AI agent performance?

Track completion rate, retries per task, pass@1 and pass@3, and cost per successful task. These metrics reveal whether harness changes actually improve reliability rather than just shifting failure modes.

When should I avoid macro-tools in agent design?

Avoid macro-tools unless round-trip overhead is the dominant cost. High-risk operations like deploys, migrations, and permission changes should use micro-tools so each step can be validated and recovered independently.