一键导入
agent-harness-init
Initialize agent-harness model routing for Codex. Writes Codex-only config under .codex or ~/.codex using inherit or explicit per-role routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initialize agent-harness model routing for Codex. Writes Codex-only config under .codex or ~/.codex using inherit or explicit per-role routing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Autonomous multi-agent sprint: Planner decomposes spec → Generators implement in parallel via a Claude Code dynamic workflow (Agent-tool fallback when workflows are unavailable) → Evaluator verifies against acceptance criteria → iterates up to 3 times. Use when spec requires 3+ distinct tasks or multi-step implementation across files or domains. Do NOT use for: single-file edits, quick bug fixes, or tasks completable in one context window.
Plan, execute, and review multi-agent harnesses using the Planner-Generator-Evaluator pattern (Anthropic Engineering, 2026-04-04). Use when a task exceeds one context window, benefits from parallel subagents, needs Playwright MCP browser-level verification, or requires sprint-contract negotiation between Generator and Evaluator. Also use when routing work across Fable 5/Opus (orchestration/eval) / Sonnet (generation) / Haiku (collection), deciding inline-vs-subagent-vs-workflow, designing context reset vs compaction handoffs, or reviewing whether a knowledge unit belongs in a hook, skill, rule, reference, or prompt. Do NOT use for: single-file edits, simple Q&A, or work that /sprint already templates end-to-end.
Use when a user wants a Codex-ready plan for an agent-harness sprint before implementation. Produces a decision-complete Planner/Generator/Evaluator sprint plan without editing application code.
Use when a user asks Codex to run an agent-harness sprint with Planner, Generator, and Evaluator phases. Delegates parallel work only when task ownership is explicit and disjoint.
| name | agent-harness-init |
| description | Initialize agent-harness model routing for Codex. Writes Codex-only config under .codex or ~/.codex using inherit or explicit per-role routing. |
| argument-hint | [--project | --user | --show] |
Configure Codex-only model routing for agent-harness.
This skill is the Codex equivalent of Claude Code's /agent-harness:init.
Codex does not provide a namespaced slash command for this plugin, so users call
this skill as agent-harness-init or $agent-harness:agent-harness-init.
This skill should feel like a short first-run setup flow, not a schema dump.
--show or explicitly asked for them.This project only or All projectsQuick recommended setup, Follow current session for everything, or Custom setup1 + 1 or This project only + Custom setup..gitignore, exact target paths, and resolved JSON until preview or
until the user asks for technical details.Quick recommended setup as the user-facing label for balanced.Follow current session for everything as the user-facing label for all-inherit.Custom setup, ask by work type first, then map to internal roles:
Planning and review -> planner and evaluatorCoding -> generator.code and generator.writeResearch / simple tasks -> generator.research and generator.collect../../references/codex-config-schema.md - Codex config schema and lookup orderRead these files in order:
./.codex/agent-harness.local.json~/.codex/agent-harness.jsonIf either file exists:
{"mode": "inherit"}.--showIf the user passed --show, print the resolved config and stop without writing.
If the user passed --project, target ./.codex/agent-harness.local.json.
If the user passed --user, target ~/.codex/agent-harness.json.
If no target flag is present, ask the user which target to write:
This project only - project configAll projects - user configIn the first prompt, prefer these plain-language labels instead of file paths. Only mention the exact path after the user chooses or when previewing.
Recommend project config when the user is inside a repository and wants the setting to apply only there. Recommend user config when they want the same behavior across repositories.
Ask which preset to use:
Quick recommended setup (balanced)Follow current session for everything (all-inherit)Custom setup (custom)When this step is combined with Step 2 for a first-run user, prefer a short setup prompt like:
I can help set up agent-harness model routing so planning, review, coding, and
simple research tasks can use different models automatically.
First choose the scope:
1. This project only (recommended)
2. All projects
Then choose the setup style:
1. Quick recommended setup
2. Follow current session for everything
3. Custom setup
Reply with: `1 + 1`
all-inheritWrite the built-in default:
{
"version": 2,
"host": "codex",
"models": {
"planner": { "mode": "inherit" },
"evaluator": { "mode": "inherit" },
"generator": {
"code": { "mode": "inherit" },
"write": { "mode": "inherit" },
"research": { "mode": "inherit" },
"collect": { "mode": "inherit" }
}
}
}
balancedWrite this preset:
{
"version": 2,
"host": "codex",
"models": {
"planner": {
"mode": "explicit",
"model": "gpt-5.5",
"reasoning_effort": "high"
},
"evaluator": {
"mode": "explicit",
"model": "gpt-5.4",
"reasoning_effort": "medium"
},
"generator": {
"code": {
"mode": "explicit",
"model": "gpt-5.4",
"reasoning_effort": "high"
},
"write": {
"mode": "explicit",
"model": "gpt-5.4",
"reasoning_effort": "medium"
},
"research": {
"mode": "explicit",
"model": "gpt-5.4-mini",
"reasoning_effort": "low"
},
"collect": {
"mode": "explicit",
"model": "gpt-5.4-mini",
"reasoning_effort": "low"
}
}
}
}
customDo not start by asking for all six internal roles. Start with work types:
Planning and reviewCodingResearch / simple tasksAsk the user for each work type:
inherit or explicitexplicit, ask for modelexplicit, ask for reasoning_effortDefault mapping:
Planning and review -> planner and evaluatorCoding -> generator.code and generator.writeResearch / simple tasks -> generator.research and generator.collectIf the user wants finer control, then ask whether they want to split either of these pairs into separate role settings.
Prefer a concrete reply template such as:
Planning and review: gpt-5.5 high
Coding: gpt-5.4 high
Research / simple tasks: gpt-5.4-mini high
If the user answers in natural language, map it into the role structure above without forcing them to restate it in internal terminology.
Accepted reasoning_effort values are:
lowmediumhighxhighUsers may leave reasoning_effort empty only if they want to override the
model while keeping the current session reasoning level.
Do not translate Claude model names such as opus, sonnet, or haiku into
this file. Use Codex model ids such as gpt-5.5, gpt-5.4, or
gpt-5.4-mini.
Show:
Roles in inherit mode use the current Codex session model and reasoning. Roles in explicit mode pass model and optional reasoning overrides.At this stage, it is appropriate to introduce:
.codex/*.local.json ignore rules when relevantAsk for confirmation before writing.
Create the parent directory if needed, then write the pretty-printed JSON with 2-space indentation.
After writing, tell the user:
Config written. Codex sprints will use per-role inherit or explicit routing for Planner, Evaluator, and Generator subagents.
.claude/agent-harness*.json from this skill.~/.claude/agent-harness.json; that file belongs to Claude Code.~/.codex/agent-harness.json, request
approval instead of choosing another location silently..codex/*.local.json, mention that the user may want to add an ignore rule..gitignore advice in the first reply
unless the user explicitly asked for technical details.