agent-harness
できること
このスキルにより、エージェントは小さな検証済みのステップを踏んで目標に取り組み、作業が完了したかどうかをコントローラーが判断します。AIエージェントに、ただ完了したと主張させるのではなく、複数のステップからなる作業を確実に終わらせたい人を対象としています。
使う場面
- ✓複数のステップからなる目標をエージェントに与え、各ステップを検証させる必要があるとき。
- ✓エージェントが証拠なしにタスクの完了を主張し続けるとき。
- ✓長いタスクを、保存された状態から新しいセッションで再開する必要があるとき。
スキルのリンク
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-harness/skills/agent-harness/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当社の決済サービスを監査し、エラーバジェット付きのSLOを設計してください。完了と言う前に、各ステップが検証されていることを確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは目標を、チェック付きのタスク計画に分解し、一度に一つのタスクを実行します。コントローラーが各結果を検証します。再試行の回数には上限があり、予算を使い切った場合は、完了とせずにエスカレーションします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Agent Harness
You are a harness operator, not a hero. The loop — not your optimism — decides when work is done. Your job: compile the goal into tasks with checks, execute one task at a time, let the controller adjudicate verification, and stop when the state machine says stop.
The contract
GOAL → goal_compiler → PLAN → loop_controller: [execute → verify]* → CLOSE
↑______retry (≤ max_attempts, changed approach)
└── ESCALATE on exhausted budgets — never fake success
Three layers, all JSON: a committed per-domain manifest (what skills/tools/checks exist), a per-goal plan (which tasks, which verifications, what "done" means), and a per-run state file (the single source of truth; a fresh session resumes from it alone).
Quick start
# 0. Pick the domain manifest (20 committed under assets/harnesses/, e.g. engineering-team.json)
ls assets/harnesses/
# 1. Compile the goal (refuses vague goals with exit 3 + forcing questions)
python3 scripts/goal_compiler.py \
--goal "audit the payments service and design an SLO with an error budget" \
--manifest assets/harnesses/engineering.json --out plan.json
# 2. Initialize the loop state
python3 scripts/loop_controller.py init --plan plan.json --state .agent-harness/state.json
# 3. Drive the loop — repeat until directive is "close" or "escalate"
python3 scripts/loop_controller.py next --state .agent-harness/state.json
# → {"action": "execute", "task": "T1", ...}: open the task's skill (SKILL.md at
# skill_path), do the work with its tools, then:
python3 scripts/loop_controller.py record --state .agent-harness/state.json \
--task T1 --phase execute --exit-code 0
# → the controller runs the task's checks ITSELF (subprocess, timeout, evidence log):
python3 scripts/loop_controller.py verify --state .agent-harness/state.json --task T1 --cwd <repo-root>
# 4. Close — refused (exit 4) while any task is unverified and unwaived
python3 scripts/loop_controller.py close --state .agent-harness/state.json
Regenerate a manifest after skills change (diff-stable, CI-checkable):
python3 scripts/harness_manifest_builder.py --domain engineering-team \
--repo-root <repo-root> --out-dir assets/harnesses --no-timestamp
Hard rules
- Never adjudicate your own verification.
verifyruns the checks via subprocess; a passingrecord --phase verifywithout--evidenceis rejected (exit 6). You do not get to declare a task verified. - Never modify a gate you are judged by. Check commands come from the manifest/plan. Editing a check to make it pass is the reward-hacking failure mode (see references/verification_discipline.md) — same invariant as autoresearch-agent's locked evaluator.
- One task at a time, writes serialized. Parallelize reading and judging, never two tasks writing the same artifact (references/agentic_loop_canon.md).
- Retry means a changed approach. Same command + same input = same failure. The retry directive says so; honor it.
- Budgets are terminal states, not suggestions.
max_attempts_per_task→ escalated (exit 2);max_loop_iterations→ escalate (exit 5). Exhausted budgets are never reported as success — a human waives (close --waive T3 --reason "..."), you don't. - Fresh context beats long context. Every
nextdirective is executable by a new session reading only the plan + state files. Long-running goals: run each iteration as its own session against the durable state. - State lives in
.agent-harness/— never in.agenthub/,.autoresearch/, ordocs/TC/(those belong to sibling skills). - Plan and state files are a trust boundary.
verifyshell-executes each task's check command; only run the harness on plan/state files you orgoal_compiler.pyproduced, never on files from untrusted input (see references/verification_discipline.md).
Forcing questions (ask before compiling; one per turn, with a recommended answer)
| # | Question | Recommended answer | Why (canon) |
|---|---|---|---|
| 1 | What single observable outcome means DONE? | A named artifact + a command that exits 0 against it | Verifier's law: invest in verifiability first |
| 2 | Which domain harness applies? | The domain whose skills name the deliverable; |
よくある質問
タスクが何度も失敗したらどうなりますか?
コントローラーが再試行を制限してエスカレーションするので、エージェントが成功を装うことはありません。
新しいセッションで続きから再開できますか?
はい。状態ファイルに進捗が保存されるので、新しいセッションはそのファイルだけから再開できます。
曖昧な目標でも使えますか?
いいえ。目標コンパイラーは曖昧な目標を受け付けず、まず確認のための質問をします。
詳細
作者による元の説明
Use when an agent should drive a goal in one of this repo's domains to a verified close, before starting the work. Compiles the goal into a task plan with goal_compiler.py and runs it through loop_controller.py, which verifies each task, caps retries and escalates.
人気
- GitHubのスター
- 29k
- ランキング
- #9524
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-launcher-orchestrator
29kひとつの明確な目標から始めて、自分のアカウントでClaudeのマネージドエージェントを計画し、作成し、テストし、スケジュールするまでを段階的に支援します。
grade-iterate
29kマネージドエージェントの作業をルーブリックに照らして採点し、固定された回数だけ改善させることで、終わりなく繰り返さないようにします。
interview
29kAIエージェントのアイデアについてインタビューし、回答をもとに、何かを起動する前の構築計画にまとめます。
run-without-you
29kマネージドエージェントを、スケジュールまたはイベントの発生によってあなたがいなくても動くように設定します。起動の前にcronの時刻を確認します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。