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. Use when defining or revising an agent's tool set, action space, or observation format.

NewUpdated Sep 9, 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

76/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

95

Quality

72

Clarity

78

Completeness

65

Summary

This skill provides structured guidance for designing and optimizing AI agent action spaces, tool definitions, and observation formatting. It teaches principles for defining stable tools, granular operations, deterministic output shapes, and error recovery contracts to improve agent completion rates and reduce retry loops.

Detected Capabilities

conceptual guidancearchitectural pattern recommendationanti-pattern documentation

Trigger Keywords

Phrases that agents use to match this skill to user intent.

design agent toolstool definition optimizationagent action spaceerror recovery strategyobservation formattingreduce agent retriestool granularity planningagent completion rate

Use Cases

  • Redesigning an agent's tool set to reduce ambiguity and overlapping semantics
  • Optimizing tool granularity for high-risk operations like deployments and migrations
  • Defining observation schemas with status, summary, next_actions, and artifacts fields
  • Implementing error recovery strategies with explicit root cause hints and retry instructions
  • Context budget planning to keep system prompts minimal and load guidance on demand
  • Choosing between ReAct, function-calling, and hybrid planning architectures based on task structure

Quality Notes

  • Core model is well-articulated with four clear constraints (action space, observation, recovery, context)
  • Practical granularity rules provide actionable guidance for tool design (micro/medium/macro)
  • Error recovery contract is comprehensive and includes root cause hints, retry instructions, and stop conditions
  • Observation design specifies required schema fields (status, summary, next_actions, artifacts) making it concrete
  • Anti-patterns section explicitly identifies common pitfalls (overlapping tool semantics, opaque output, context overloading)
  • Benchmarking section provides measurable metrics (completion rate, retries, pass@1/3, cost) but lacks guidance on *how* to instrument agents
  • Architecture pattern guidance (ReAct vs function-calling vs hybrid) is brief but appropriately scoped
  • Skill is read-only conceptual guidance with no executable code or external dependencies — very low operational risk
  • No examples, code snippets, or concrete templates provided — guidance is principled but abstract
Model: claude-haiku-4-5-20251001Analyzed: Sep 9, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v2.0

    Contract changed: description

    ✦ AIClarifies activation contract: skill now explicitly applies to tool set definition and revision, not just design and optimization.

    triggering2026-09-09

    LATEST
  2. v1.2

    Content updated

    ✦ AINo behavioral changes detected.

    2026-07-14

    View This Version
  3. v1.1

    Content updated

    ✦ AIAdds LICENSE file.

    2026-04-20

    View This Version
  4. v1.0

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

    2026-03-16

    View This VersionInitial version

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

Command Palette

Search for a command to run...