agent-harness

agent-harness is a skill for Claude Code from skillberry-ai/cap-evolve. It costs 140 tokens per session (2,852 once invoked), scanned A, original, Apache-2.0.

A control layer around an AI coding agent, covering its task loop, context, memory, tool errors, retries, checks, and delegated helper agents.

In plain words
What is it for?
Use it to adjust stopping rules, context trimming, cross-run lessons, retry handling, verification, sampling, and sub-agent delegation.
Why use it?
It helps investigate failures caused by how the agent runs rather than by its instructions or tools.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Good fit Use it to adjust stopping rules, context trimming, cross-run lessons, retry handling, verification, sampling, and sub-agent delegation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillberry-ai/cap-evolve/agent-harness
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 skillberry-ai/cap-evolve --skill agent-harness
Clone the repo
git clone --depth 1 https://github.com/skillberry-ai/cap-evolve

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-harness/github.svg)](https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-harness)
Your own site
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-harness"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-harness/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-harness"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,852 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.00140 $0.02852
Opus 5.5 $0.00056 $0.01141
Sonnet 5.5 $0.00028 $0.00570
Haiku 4.5 $0.00014 $0.00285

Measured 3d ago against content hash a116f91fa269, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-harness 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 3d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/_bootstrap.py, scripts/abstract.py, scripts/check.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/capabilities/agent-harness/SKILL.md · 191 lines

How it starts

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

Capability: agent harness

The harness is every piece of code and configuration that is not the model: the loop that calls it, what goes into its context, what it remembers between tasks, how tool errors come back, how many samples it draws, and whether it delegates. Changing only the harness, with the model fixed, moved a coding agent from 52.8% to 66.5% on Terminal Bench 2.0 (LangChain, 2026). This capability makes that layer the optimizable artifact.

Other capabilities own the neighbouring layers. What the agent is told belongs to system-prompt; what a tool does or how it is described belongs to tools or mcp-tool. Use this capability when the failure is in how the loop runs: the same instruction and the same tools would succeed under a different loop. Classify the failure clusters first (./guidance/diagnose/SKILL.md, when present).

The artifact

<capability_dir>/
  harness.json           settings the adapter wires into the agent (sections below)
  memory/lessons.jsonl   cross-run lessons, one JSON object per line
  hooks/*.py             harness code the adapter imports (compaction, checks, ...)
  harness_policy.json    optional: allowed edit kinds and the "wired" setting list

harness.json sections: loop, context, memory, tool_errors, sampling, subagents, and free-form custom. The known keys, types and ranges are in scripts/abstract.py (SCHEMA); validate() rejects a wrong type or an out-of-range value and warns on an unknown key.

A setting does something only if the adapter reads it. The adapter author lists the paths it wires in harness_policy.json ("wired": ["loop.*", "memory.*"]), and apply() refuses a set on any other path. If the policy still says "*", open the adapter and confirm the key is read before you spend a gate evaluation on it.

Pick the lever by trace symptom

Each row is one bounded edit. Ship every row the traces call for in one candidate, each one aimed at a named cluster. Depth and sources for each row: references/concepts.md.

Read the full file on GitHub · 191 lines

Files

What ships with it

8 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. 3d ago First seen · 191 lines · 140 tokens per session scan A a116f91fa269

Subscribe to this mod's changes

agent-harness is a skill published in the GitHub repository skillberry-ai/cap-evolve (71 stars, last pushed today), licensed Apache-2.0. It adds 140 tokens to every session and 2,852 once invoked, about $0.0006 per session on Opus 5.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-11-27.

Related

agent-harness compared with skills from other repositories

agent-harness next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-harnessskillberry-ai/cap-evolveSkill71todayApache-2.0A140Claude Code
wiki-ingestpaperclipai/paperclipSkill118kyesterdayMITA61Claude Code, Codex
agent-v3-memory-specialistruvnet/rufloSkill83ktodayMITA25Claude Code
hindsight-localvectorize-io/hindsightSkill64kyesterdayMITA32Claude Code, Codex
hindsight-coding-agentvectorize-io/hindsightSkill64kyesterdayMITA74Claude Code, Codex
memory-contextvectorize-io/hindsightSkill64kyesterdayMITA47Cursor
memory-retainvectorize-io/hindsightSkill64kyesterdayMITA46Cursor