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.
- 01GitHub stars
- 298.5K
- 02Installs
- New
- 03Files scanned
- 1
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 9961d5f1df4dd67d… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
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:
- Action space quality
- Observation quality
- Recovery quality
- Context budget quality
Action Space Design
- Use stable, explicit tool names.
- Keep inputs schema-first and narrow.
- Return deterministic output shapes.
- 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|errorsummary: one-line resultnext_actions: actionable follow-upsartifacts: file paths / IDs
Error Recovery Contract
For every error path, include:
- root cause hint
- safe retry instruction
- explicit stop condition
Context Budgeting
- Keep system prompt minimal and invariant.
- Move large guidance into skills loaded on demand.
- Prefer references to files over inlining long documents.
- 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
Verify The Work Product
Define a narrow completion check before the worker starts. Keep queue selection, session hosting, action selection, and result validation separate so different tools and models can share the same contract.
ECC's opt-in verified work-item flow
registers a deterministic artifact check and records failed and successful
attempts. Start with the harness-adapter-documentation/v1 validator for adapter
matrix documentation. Repair the artifact after a failed check, then verify it
again. A manual done status is not evidence that a validator passed.
From an ECC checkout, set ECC_SESSION_ID to an existing session ID in the same
state database, then use a new work-item ID:
node scripts/work-items.js upsert adapter-docs --title 'Check adapter matrix' \
--repo-root "$PWD" --verify harness-adapter-documentation/v1 \
--artifact docs/architecture/harness-adapter-compliance.md
node scripts/work-items.js claim adapter-docs --owner docs-worker --as agent --session-id "$ECC_SESSION_ID"
node scripts/work-items.js verify adapter-docs --json
Compact models can eventually choose or repair tool calls through these same interfaces; the current flow does not train models or automate those repairs.
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.
Files
1- SKILL.md
6d79c5a0803.4 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from affaan-m/everything-claude-code8
Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard n
Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent ap
Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.
Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.
Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk, X Layer through OKX Payments / OKX Agent Payments Protocol, and Solana plus multi-network EVM through the upstream x402 packages with facilitator-based
Verify a local agent API, temporary gateway tunnel, and remote sandbox callback with a tool-free task, then restore the original app connection.
Security hardening guidance for AI agent frameworks that process untrusted content, invoke tools, write workspace files, manage runtime identifiers, or handle credentials. Use when building or reviewing an agent runtime, autonomous worker, tool gateway, memory service, or multi-tenant agent deployme
Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.
Related tooling skillsscan passed
Onboarding entrypoint for agents-cli in Agent Platform. It should be used when the user wants to "create a new agent", "develop an agent", "build an agent using ADK", "run the agent locally", "debug agent code", "test an agent", "evaluate an agent", "deploy an agent", "publish an agent", "monitor an
Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.
Web performance regression detection. Use for: web performance benchmark, check page speed. (gstack)
Produces the morning production report: output against plan by line, cell and product; OEE with availability, performance and quality shown separately; the downtime log ranked both by minutes and by frequency; scrap and downtime priced in dollars; week-over-week movers; and the exceptions needing a
Use this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring `doca_argp_init` → register params → `doca_argp_start` → `doca_argp_destroy` in order; picking a parameter type from the full public enum (`DOCA_ARGP_TYPE_STRIN
Automate browser interactions, test web pages and work with Playwright tests.