agentsclimarketplace

Agent harness design

Skill yeaight7/agent-powerups/plugins/agentic-systems/skills/agent-harness-design

Use when designing tool definitions for a new agent or subagent, an agent shows high retry rates, ambiguous tool invocations, or silent failures, or an existing agent harness needs a quality review.From its SKILL.md

Install
npx -y skills add yeaight7/agent-powerups --skill agent-harness-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.3 KB, 916 tokens by cl100k_base, as published. Nobody here has run it

Agent Harness Design

Use when designing or improving how an agent invokes tools, handles errors, and decides when to stop.

When to Use

  • Designing tool definitions for a new agent or subagent
  • Observing high retry rates or ambiguous tool invocations
  • Agent is failing silently or completing without verifying outcomes
  • Reviewing an existing agent harness for quality issues

Tool Design Rules

Naming

  • Use explicit, stable names: read_file, run_tests, apply_patch
  • No generic names: do_action, execute, handle
  • One tool per distinct operation; do not overload parameters to compensate

Schema

Keep tool inputs narrow:

  • Required fields only; no optional fields that change behavior
  • Use enums for mode/type values — never free-text strings that require parsing
  • Validate at the boundary; reject malformed input with a clear error, not a fallback
{
  "name": "run_tests",
  "parameters": {
    "path": { "type": "string", "description": "Path to test file or directory" },
    "filter": { "type": "string", "description": "Optional test name filter" }
  }
}

Output Shape

Every tool response must include:

  • status: "success" | "warning" | "error"
  • summary: one-line result (human-readable)
  • next_actions: list of follow-up steps the agent should consider
  • artifacts: file paths or IDs produced (empty list if none)

Catch-All Tools

Avoid run_bash / shell_exec style catch-all tools unless:

  • The task is genuinely open-ended and the toolset cannot be pre-defined
  • You explicitly document the risk and add an allowlist or preflight check

If you must use a catch-all, add a PreToolUse validation hook for dangerous patterns.

Error Path Rules

Every tool must define what happens on failure:

CaseRequired response
Invalid inputReject immediately with status: "error" and exact field name
Transient failureInclude retry_after hint and idempotency note
Non-recoverableState stop: true and describe the manual resolution step

Do not return partial success with no indication that something failed.

Retry and Stop Conditions

Define retry limits in the harness, not inside tool implementations:

max_retries: 2
stop_conditions:
  - tool returns status: "error" with stop: true
  - same tool called with identical inputs twice in a row
  - completion signal received

Never retry indefinitely. Declare a hard ceiling.

Context Budget

  • Keep system prompt fixed and minimal — it is loaded on every turn
  • Put large reference material (schemas, docs) in skills loaded on demand
  • Compact at phase boundaries (after research, after planning, after debugging)
  • Do not pass growing tool-call history to subagents; summarize into a context bundle

Granularity Guide

Risk levelTool granularity
High (deploy, migrate, permissions)Micro — one action, one confirmation
Medium (edit, read, search)Standard — composite is fine
Low (format, report, list)Macro — batch operations acceptable

Benchmarks to Track

  • Completion rate (task finished without escalation)
  • Retries per task
  • Pass@1 rate (completed on first attempt)
  • Cost per successful task

Anti-Patterns

  • Overlapping tool semantics (agent cannot choose between them)
  • Tool returns only on error — no output on success
  • No explicit stop condition — agent loops indefinitely
  • Context overload — every tool call inlines full file contents

Verification

  • Every tool has an explicit, stable name and exactly one distinct operation
  • Schemas use required fields and enums — no free-text mode strings, no behavior-changing optionals
  • Every tool response carries status, summary, next_actions, and artifacts
  • Every tool defines its invalid-input, transient-failure, and non-recoverable paths
  • Retry ceiling and stop conditions are declared in the harness, not inside tools
  • Any catch-all tool is documented with its risk and guarded by an allowlist or preflight check

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most context ai engineering skills give in 916 tokens

Counted across 1,328 of the 2,349 authors here whose files we hold, read 2026-09-06

  • Dispatch a fresh subagent for each taskin 76 of 1328, across 59 files
  • Perform spec compliance review before code quality reviewin 44 of 1328, across 34 files
  • Dispatch a final code reviewer after all tasksin 38 of 1328, across 26 files
  • Answer subagent questions before allowing implementationin 36 of 1328, across 26 files
  • Use the least powerful model capable of the taskin 33 of 1328, across 26 files
  • Create a TodoWrite list for all tasksin 32 of 1328, across 22 files
  • Perform a task review after each implementationin 31 of 1328, across 24 files
  • Extract all tasks and context from the planin 29 of 1328, across 20 files
  • Provide full task text to subagentsin 28 of 1328, across 20 files
  • Use git worktrees for isolated workspacesin 25 of 1328, across 20 files
  • Specify the model explicitly when dispatching a subagentin 23 of 1328, across 18 files
  • Execute all tasks from the plan without stoppingin 21 of 1328, across 16 files

Said here and by no other author read

  • limit tool inputs to required fields only
  • use enums for mode or type values
  • define failure paths for every tool
  • declare retry limits in the harness
  • summarize tool history into context bundles
  • use micro granularity for high risk actions

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.