agent-harness-construction

agent-harness-construction is a skill for Claude Code, Codex from mturac/everything-openai-codex. It costs 46 tokens per session (793 once invoked), scanned A, original, MIT.

A set of design rules for building the parts around an AI agent, including planning, tool calls, observations, error recovery, and context management.

In plain words
What is it for?
Use it when designing agent tools and workflows, defining structured tool responses, handling retries, managing long instructions, or measuring completion rate and cost.
Why use it?
It helps agents recover from errors, choose tools predictably, return useful results, and finish tasks without wasting context.

Skill for Claude CodeCodex

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

Good fit Use it when designing agent tools and workflows, defining structured tool responses, handling retries, managing long instructions, or measuring completion rate and cost.

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

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/mturac/everything-openai-codex/agent-harness-construction/github.svg)](https://agentmods.dev/skills/mturac/everything-openai-codex/agent-harness-construction)
Your own site
<a href="https://agentmods.dev/skills/mturac/everything-openai-codex/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/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/mturac/everything-openai-codex/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/agent-harness-construction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 793 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00046 $0.00793
Opus 5 $0.00023 $0.00396
Sonnet 5 $0.00009 $0.00159
Haiku 4.5 $0.00005 $0.00079

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

docs/ja-JP/skills/agent-harness-construction/SKILL.md · 74 lines

What it actually says

エージェントハーネス構築

エージェントの計画、ツール呼び出し、エラーからの回復、完了への収束を改善する場合にこのスキルを使用します。

コアモデル

エージェントの出力品質は以下によって制約されます:

  1. アクション空間の品質
  2. 観測の品質
  3. 回復の品質
  4. コンテキストバジェットの品質

アクション空間の設計

  1. 安定した明示的なツール名を使用する。
  2. 入力スキーマファーストで絞り込んだものにする。
  3. 決定論的な出力形状を返す。
  4. 分離が不可能な場合を除き、キャッチオールツールは避ける。

粒度ルール

  • 高リスク操作(デプロイ、マイグレーション、権限)にはマイクロツールを使用する。
  • 一般的な編集・読み取り・検索ループには中規模ツールを使用する。
  • ラウンドトリップのオーバーヘッドが支配的なコストである場合のみマクロツールを使用する。

観測の設計

すべてのツールレスポンスに含めるべき内容:

  • status: success|warning|error
  • summary: 一行の結果
  • next_actions: 実行可能なフォローアップ
  • artifacts: ファイルパス / ID

エラー回復コントラクト

すべてのエラーパスに含めるべき内容:

  • 根本原因のヒント
  • 安全なリトライ指示
  • 明示的な停止条件

コンテキストバジェット管理

  1. システムプロンプトを最小限かつ不変に保つ。
  2. 大きなガイダンスはオンデマンドで読み込まれるスキルに移動する。
  3. 長いドキュメントをインラインで挿入するより、ファイルへの参照を優先する。
  4. 任意のトークン閾値ではなく、フェーズの境界でコンパクト化する。

アーキテクチャパターンガイダンス

  • ReAct: 不確実なパスを持つ探索的タスクに最適。
  • 関数呼び出し: 構造化された決定論的フローに最適。
  • ハイブリッド(推奨): ReAct 計画 + 型付きツール実行。

ベンチマーク

追跡すべき指標:

  • 完了率
  • タスクあたりのリトライ数
  • pass@1 および pass@3
  • 成功タスクあたりのコスト

アンチパターン

  • セマンティクスが重複するツールが多すぎる。
  • 回復ヒントのない不透明なツール出力。
  • 次のステップなしのエラーのみの出力。
  • 無関係な参照でコンテキストを過負荷にする。
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. 5d ago First seen · 74 lines · 46 tokens per session scan A 16838adcdf03

Subscribe to this mod's changes

agent-harness-construction is a skill published in the GitHub repository mturac/everything-openai-codex (89 stars, last pushed 15d ago), licensed MIT. It adds 46 tokens to every session and 793 once invoked, about $0.0002 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-09-03.