Catalog
affaan-m/agent-harness-construction

affaan-m

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.

global
origin:ECC
New~484
v1.2Saved Jul 14, 2026

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.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

78/100

Grade

B

Good

Safety

95

Quality

72

Clarity

82

Completeness

68

Summary

A meta-skill that teaches AI agents how to design their own action spaces, tool definitions, and observation formats for optimal planning and recovery. It provides architectural patterns, granularity rules, and benchmarking guidance to help engineers build higher-quality agent harnesses rather than performing any direct agent operations itself.

Detected Capabilities

architectural guidancepattern documentationspecification writingdesign reviewno file writesno shell executionno network access

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

design agent toolsoptimize action spaceimprove agent completionreduce agent retriesagent architecture reviewtool schema designerror recovery patternscontext budgeting agents

Use Cases

  • Design tool schemas and action spaces for new AI agents
  • Optimize agent tool granularity (micro vs. macro tools) for specific tasks
  • Improve agent error recovery and observation formatting
  • Architect ReAct vs. function-calling vs. hybrid agent patterns
  • Debug and improve agent completion rates and retry behavior
  • Benchmark agent performance across multiple metrics
  • Refactor existing agent harnesses to reduce context overhead

Quality Notes

  • Clear structural organization with numbered sections and logical flow
  • Practical, actionable guidance grounded in agent design fundamentals
  • Includes concrete examples of good vs. bad patterns (anti-patterns section)
  • Well-defined output contract for tool responses (status, summary, next_actions, artifacts)
  • Missing concrete code examples that would illustrate each pattern
  • No example harness configurations or sample tool definitions to reference
  • Could benefit from worked examples showing ReAct vs. function-calling in practice
  • Anti-patterns section is helpful but could include more detail on why each is problematic
  • No discussion of trade-offs between context size and agent quality beyond brief mention
Model: claude-haiku-4-5-20251001Analyzed: Jul 14, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

v1.2

Content updated

2026-07-14

Latest
v1.1

Content updated

2026-04-20

v1.0

Seeded from github.com/affaan-m/everything-claude-code

2026-03-16

Use affaan-m/agent-harness-construction in your dev environment

Command Palette

Search for a command to run...