agent-harness-construction

agent-harness-construction is a skill for Claude Code, Codex from S3YED/appie-kit. It costs 25 tokens per session (418 once invoked), scanned A, a copy of agent-harness-construction, MIT.

Guidance for designing how an AI agent chooses actions, receives tool results, handles errors, and manages its available context.

In plain words
What is it for?
Use it to define tool inputs and outputs, format observations, design error recovery, choose tool sizes, and improve agent completion rates.
Why use it?
Poorly designed tools and unclear results can make an agent stop early, repeat mistakes, or fail to finish. These patterns make its work easier to direct and recover.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define tool inputs and outputs, format observations, design error recovery, choose tool sizes, and improve agent completion rates.

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

Made for: Claude Code, Codex.

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/s3yed/appie-kit/agent-harness-construction.svg)](https://agentmods.dev/skills/s3yed/appie-kit/agent-harness-construction)
Your own site
<a href="https://agentmods.dev/skills/s3yed/appie-kit/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/s3yed/appie-kit/agent-harness-construction.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 418 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 88% copy Near-identical to another mod 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.00025 $0.00418
Opus 5 $0.00013 $0.00209
Sonnet 5 $0.00005 $0.00084
Haiku 4.5 $0.00003 $0.00042

Measured 7d ago against content hash 8da8d0cd5ab9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 7d 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.

Origin

This is a copy

88% identical to agent-harness-construction — 26 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/agentic/agent-harness-construction/SKILL.md · 74 lines

What it actually says

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.
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. 7d ago First seen · 74 lines · 25 tokens per session scan A 8da8d0cd5ab9

Subscribe to this mod's changes

agent-harness-construction is a skill published in the GitHub repository S3YED/appie-kit (7 stars, last pushed 12d ago), licensed MIT. It adds 25 tokens to every session and 418 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to agent-harness-construction, differing in 26 lines, and is treated as a copy.

Related

Other skills, from other repositories

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

aws-patterns

Lambda best practices, S3 event patterns, SQS/SNS fanout, and DynamoDB access patterns for serverless AWS architectures.

vibeeval/vibecosystem · 31 tokens

review

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use…

stevesolun/ctx · 95 tokens

agents-md-protocol

Create or review an AGENTS.md file so coding agents get stable repo-local instructions: environment setup, testing, style, security boundaries, PR policy, and handoff rules. Use when a repo lacks durable agent guidance or when a custom harness needs a predictable context file.

stevesolun/ctx · 59 tokens

investment-memo-generator

Investment memo creation combining financial analysis, document generation, and structured templates. Use when creating investment memos, pitch decks, deal summaries, or investment committee materials.

travisjneuman/.claude · 37 tokens

impact-report-writer

Nonprofit/NGO impact report generation with data visualization suggestions, outcome metrics, narrative structure, and program data presentation. Use when writing impact reports, annual reports, or program evaluation summaries.

travisjneuman/.claude · 43 tokens