agent-harness-construction

agent-harness-construction is a skill for Claude Code from shennawardana23/skillme. It costs 95 tokens per session (1,839 once invoked), scanned A, original, Apache-2.0.

Guidance for designing the tools and function calls that an AI coding agent uses to interact with real systems. It covers tool names, input fields, returned results, errors, retries, and context limits.

In plain words
What is it for?
Use it when designing agent tools, narrowing their inputs, shaping tool output, writing error-recovery rules, or choosing an interaction loop.
Why use it?
Clear tool interfaces help an agent choose the right action, understand results, and recover from failures instead of guessing or repeating a bad call.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it when designing agent tools, narrowing their inputs, shaping tool output, writing error-recovery rules, or choosing an interaction loop.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/agent-harness-construction
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shennawardana23/skillme --skill agent-harness-construction
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-harness-construction

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/agent-harness-construction/github.svg)](https://agentmods.dev/skills/shennawardana23/skillme/agent-harness-construction)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/agent-harness-construction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-harness-construction

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/agent-harness-construction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,839 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.01839
Opus 5 $0.00048 $0.00920
Sonnet 5 $0.00019 $0.00368
Haiku 4.5 $0.00010 $0.00184

Measured 11d ago against content hash 59029f18503a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

agent-harness-construction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-harness-construction/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Harness Construction

The "harness" is everything between the model and the real system: tool schemas, the text the model sees back from a tool call, and the rules for when to retry versus stop. Agent quality is bounded by this interface as much as by the underlying model — a capable model given ambiguous tools or opaque errors will still loop, guess, or give up.

The four levers

  1. Action space — which tools exist, how they're named, how narrow their inputs are.
  2. Observation shape — what comes back from a tool call.
  3. Recovery contract — what the model is told to do when a call fails.
  4. Context budget — how much of the harness's own guidance and history the model has to hold in its context window at once.

Treat these as one design surface, not four independent decisions — a vague action space usually shows up downstream as a recovery problem ("the model called the wrong tool, got a cryptic error, and retried the same wrong call").

Action space design

  • Stable, explicit names. create_reservation, not handle_request. A name should tell the model when not to use it as much as when to.
  • Schema-first, narrow inputs. Prefer several small typed parameters over one free-text field the model has to format correctly from memory. Every extra way to phrase the same input is a way for the model to get it wrong.
  • Deterministic output shape. The same tool call against the same state should return the same shape every time — varying which fields are present based on a hidden internal state forces the model to guess.
  • Avoid catch-all tools (run_command, execute_sql) unless there is genuinely no way to scope the operation — a catch-all tool pushes all validation and safety judgment onto the model at call time, which is exactly the point where mistakes are hardest to catch.

Granularity

Match tool grain to risk and frequency, not to what's convenient to implement:

Grain Use for Example
Micro High-risk, hard-to-undo operations deploy_to_production, run_migration, grant_permission
Medium The common read/edit/search loop read_file, search_code, apply_patch
Macro Only when round-trip latency dominates cost run_full_test_suite

Read the full file on GitHub · 175 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 175 lines · 95 tokens per session scan A 59029f18503a

Subscribe to this mod's changes

agent-harness-construction is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 13d ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,839 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.