Turn the current Codex thread into a coordination thread that routes implementation work to durable reusable child threads in disposable worktrees with short-lived branches targeting main.
59
68%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./templates/plate-playground-template/.agents/skills/orchestrator/SKILL.mdUse this skill when the user wants the current thread to act as a chief-of-staff thread: route work, keep context, supervise child threads, arbitrate conflicts, and avoid doing implementation locally.
$orchestrator on: activate orchestration-only mode for this thread.$orchestrator off: return this thread to normal local execution.$orchestrator status: report mode, active child threads, checkout slots,
branches, ports, data strategies, blockers, and push state.Routing is automatic while orchestrator mode is on. Do not invent a manual routing command.
Worktrees alone are not orchestrator mode.
The parent may create worktrees, copy ignored environment files, install
dependencies, and serialize PR or merge work as setup. That is
direct-worktree coordination until durable child threads are created or reused
and implementation instructions are sent to them.
Before code-changing work starts under an orchestrator claim:
orchestrator mode: on in the active plan or status.A durable child thread id belongs to a visible Codex thread created or found through thread-management tools. A hidden sub-agent, worker id, nickname, or submission id is not a durable child thread id.
If the child thread is attached to the root project but assigned to a manual
sibling worktree, every apply_patch target must be absolute under the assigned
worktree. Bare relative patches may hit the root checkout. The parent prompt
must state this, and the child must audit after its first edit that the root
checkout was not modified. If work leaks into the root checkout, stop before
review, push, or PR; recreate or move the work into the assigned worktree and
remove only the accidental root changes.
If durable thread tools are unavailable, record
orchestrator blocked: durable thread tools unavailable and stop unless the
user explicitly allows a non-orchestrated fallback. Never execute locally and
still call the run orchestrated.
Do not use hidden workers, temporary sub-agents, or non-sidebar delegation tools for orchestrator child execution, status, review, or PR closeout. If one was started by mistake, pause it, park its work, record the workflow miss, and move the lane to a durable Codex child thread before review, push, PR, or the next implementation lane.
When orchestrator mode is on:
main and keep the root as scheduler.main, even when work is serial.main after repo-required checks and relevant proof
pass. Merge when repository policy and the hosting service allow it.Implementation work is any task expected to create, modify, review, or continue product code, tests, migrations, issue-linked docs, a runtime plan, a branch, or a PR.
Examples:
continue, fix CI, push, commit, that slot, or
that checkout when they refer to code-changing work.Not implementation work by default:
main.Choose the lightest honest mode:
parent-root: coordination, non-mutating triage, merge arbitration, and
parent-owned planning or agent guidance. It is not an implementation or PR
review checkout.single-worktree: serial implementation when packets have a true hard
conflict, such as the same migration, generated artifact, config contract,
security policy, records, or unmergeable file lines.same-checkout: non-mutating child coordination only. Never let two child
threads mutate the same checkout concurrently.worktree: every implementation packet and PR branch. Each worktree has a
unique short-lived branch based on main and a PR back to main.Nearby components, the same product area, or a few expected merge conflicts are not hard conflicts.
main Policymain is the default integration branch and PR target.main.origin main when it exists, integrate
origin/main using the repo's required strategy, rerun required checks and
proof, then push the short-lived branch.main when checks pass and repository policy allows it.main to the root checkout. Do not leave a
disposable scheduler worktree as the long-lived owner of main.<repo>-1, <repo>-2,
and <repo>-N unless repo instructions define another convention.codex/<surface>-<YYYYMMDD-HHMMSS> unless the user or repo names another
branch..git
and dependency directories. Never print secret values.git rev-parse --show-toplevel in the target and verify it resolves to the
assigned worktree before install, dispatch, or mutation.<CHECKOUT-OR-WORKSTREAM> <short task title>main base and PR target, port, data strategy, runtime
owner, conflict group, proof expectations, and push or tracker expectations.| Checkout / workstream | Child thread | Mode | Path | Branch | Port | Data | Conflict group | Status | Last update | Next |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |Use durable Codex thread tools only. Search for them by exact namespace-qualified name:
codex_app.list_projectscodex_app.create_threadcodex_app.list_threadscodex_app.read_threadcodex_app.send_message_to_threadcodex_app.set_thread_archivedCore routing needs project lookup, thread creation, thread listing, thread
reading, and message sending. Finished-child cleanup needs thread archiving. If
archiving is unavailable, record child archive blocked: tool unavailable and
keep the slot unavailable until closeout evidence is copied and the parent
explicitly accepts the stale visible thread.
Before creating a child, resolve the saved Codex project whose local path
exactly matches the root checkout. Do not use a parent directory, sibling
checkout, or nearest-prefix match. If the exact project is unavailable, report
orchestrator blocked: exact saved project unavailable.
Preserve the configured model and reasoning effort unless the user or repo instructions explicitly require overrides. Record any override and its rationale in the parent plan and child prompt.
If durable thread tools are unavailable, stop. Do not substitute hidden sub-agents, parallel workers, or temporary agents; their ids do not satisfy the durable child-thread gate.
Send a compact prompt when creating or reusing a child:
You are the child execution thread for `<checkout-or-workstream>`.
Run: <exact user request or skill>
Context from orchestrator:
- Sources, decisions, blockers, branch and push state.
- Workspace mode and absolute checkout path.
- Branch based on `main`; PR target `main`.
- Port, data strategy, runtime owner, and conflict group.
- Acceptance criteria, non-goals, required proof, review, push, and tracker expectations.
Rules:
- Follow the repo's AGENTS instructions and implementation skill.
- Use only the assigned checkout.
- If the thread project differs from the assigned worktree, use absolute paths for every edit and audit the root checkout after the first mutation.
- Verify required ignored environment files without printing values. When copying them, exclude `.git` and dependency directories, then prove `git rev-parse --show-toplevel` resolves to the assigned worktree.
- Install dependencies with the repo's required command only when needed and authorized for this lane.
- Respect the assigned runtime owner, port, and data strategy.
- Keep review and PR work inside this child/worktree lane.
- Report conflicts instead of widening scope.
- Reuse this thread for future work on this checkout/workstream.
- Before push, integrate current `origin/main`, rerun required proof, and never force push.
- Report checkout, branch, PR URL/state, data strategy, push state, tests, runtime proof, blockers, and next owner.On heartbeat or $orchestrator status:
do it here, local, or $orchestrator off, turn mode off
before executing locally.main.main or reports the exact blocker.babb3c2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.