Use when driving one or more tasks end to end from the local bare-repo root — a feature designed with the user first when its scope is open, or a ready list of tasks — ordering them, cutting a worktree per task, handing each to a subagent that runs new-feat, running prep-pr with every finding fixed rather than reported, and shepherding each pull request to a squash merge and worktree teardown. Not for a one-file change, and not outside the bare repo.
72
88%
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
Orchestrate $ARGUMENTS end to end. If it is empty, ask for the task or tasks first.
You are the orchestrator: you order the work and drive the loop, and you do not plan or write the implementation of any task — a subagent does that through new-feat. Your context is the scarce one; theirs is disposable.
Every task merged into main as its own squash-merged pull request, its worktree removed, and a closing summary: each PR (number and one line), anything deferred as a tracked follow-up, and any deploy-time or human action a subagent surfaced.
This skill creates worktrees, so it runs only in the local bare-repo setup:
git rev-parse --is-bare-repository 2>/dev/null # expect: true
[ -d /Users/ac/.work/osn.git ] && [ "$(uname)" = "Darwin" ] && echo OKAnywhere else — the remote environment, a container, or inside a worktree — stop and say: "orchestrate needs the local bare repo root so it can create worktrees — run it from /Users/ac/.work/osn.git, or use new-feat and prep-pr in place instead." There is no static equivalent of this run; the deliverable is merged pull requests.
Write ORCHESTRATE.md at the root of the bare repo — outside every worktree, so
no .gitignore governs it and no worktree can stage it, which is the point: one
file for a run that spans several branches. Rewrite it at every step
boundary — a task dispatched, a gate run, a commit made, a PR opened. A long run
gets compacted, and what survives a compaction is what was written down, not what
you were holding in context. Read it first after any compaction, before touching a
worktree. One block per task:
## task 3 — vendor enquiry weddingName
issue: xchromo/osn#812
worktree: /Users/ac/.work/osn.git/vendor-enquiry-name
branch: feat/vendor-enquiry-name (base origin/main)
pr: not opened
gates: check ok · lint ok · test:run NOT RUN · fmt:check NOT RUN
findings: plan 1 · brief 0 · worker 2
next: stress-plan finding #2 still open — the DoD names a command that runs nothingNOT RUN is a real value and usually the honest one: a gate whose result you
cannot name off this file has not been run, whatever anyone reported. findings:
counts where each finding came from — the plan's when the plan said to do the
wrong thing, the brief's when the instruction was right but under-specified, the
worker's when the brief was right and the code is not. It costs one line and it is
the only signal that says which stage to spend more on.
Classify the input before ordering anything.
weddingName to the vendor enquiries response", "wire astro check into the two cire frontends"). Go to Step 0.The design phase is interactive; the build loop is not. Do it with the user, synchronously, before any subagent exists:
superpowers:brainstorming turns the idea into an approved spec at docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md. It has a hard gate — no worktree, no plan, no implementation until the user approves — and a feature spanning independent subsystems comes out as sub-project specs, which become your phases.superpowers:writing-plans turns each approved spec into a task-by-task plan at docs/superpowers/plans/YYYY-MM-DD-<name>.md, one per phase. Note each plan's Global Constraints; they go into every dispatch.stress-plan skill on each phase's plan before dispatching that phase. A wrong assumption in a plan is copied faithfully by a good implementer and comes back as a clean diff doing the wrong thing; no downstream review catches it, because every downstream review checks the work against the plan rather than the plan against the repo. Every finding is closed — fixed in the plan or rejected in writing — before Step 2 cuts the worktree.Point every dispatch and every reviewer at the phase's plan file path and its Global Constraints. The plan is the single source of requirements; do not paste task detail into a dispatch.
For a feature with more phases than prose can hold, a .canvas beside the plan (obsidian:json-canvas — one node per phase, edges for dependencies, labelled with the files two phases both touch) lets the user check the ordering. Optional, and the plan file stays the source of truth.
Parse the input into discrete tasks and plan structure only:
State the ordered list and which tasks get their own branch in one short message, then start. Do not describe how any task will be built.
Collect orientation pointers for the subagent: the files in play, the pattern to copy from elsewhere in the repo, the schema and types involved, the footguns. Explore, grep, Read. This is context, not a design.
Hit the wiki before the source — its system pages already hold the contract, the finding history and the footguns. Use the three-tier ladder in CLAUDE.md §Searching the wiki, pulling one heading (get_note_outline, get_vault_file_partial) rather than a whole page. Hand the subagent wiki page paths, not pasted prose: it has its own context window. Include the pages the task will make stale — that is prep-pr's docs work list.
git -C /Users/ac/.work/osn.git fetch origin main
git -C /Users/ac/.work/osn.git worktree add /Users/ac/.work/osn.git/<dir> -b <prefix>/<dir> origin/main
(cd /Users/ac/.work/osn.git/<dir> && bun install) # a fresh worktree has no node_modules<prefix> is feat/, fix/, chore/, refactor/ or docs/; <dir> is the branch name without it. Skip only when the task genuinely continues an existing, unmerged branch. A task that stacks on an open PR's branch is cut from that branch and gets git config branch.<name>.gh-merge-base <parent> — wiki/conventions/stacked-prs.md.
Dispatch one general-purpose subagent that owns planning and implementation. Give it the task, the Step 1 pointers, the worktree path and branch, and these instructions.
The dispatch is a contract, not a description. A subagent inherits no conversation, so anything not in the text does not exist, and anything wrong in it gets followed to the letter. Every dispatch carries:
NEEDS INPUT, never a plausible
placeholder.bun test ./scripts/ collects no *.test.sh.test -e every path a dispatch names before sending it. A whole task has been
lost to a directory that did not exist, and that was the orchestrator's fault.
Then the instructions themselves:
new-feat skill and follow it — it routes to the right sub-skills. Plan the implementation itself; do not wait for a plan from you.CLAUDE.md, the product's wiki/apps/<product>-development.md), add the changeset, follow the observability rules, write tests — TDD where there is logic.obsidian:obsidian-markdown for the syntax. Say explicitly: the Obsidian MCP and the obsidian CLI both point at main's wiki/; they read, never write.NEEDS INPUT: <question> + options + recommendation rather than guess.Do not re-implement or second-guess its design. Its final message is a report to you, not to the user.
For a large phase — a plan with many independent tasks — tell the subagent to run superpowers:subagent-driven-development against the plan file instead of new-feat: a fresh implementer per task, a review per task, a review of the whole branch, all inside the one branch. Still one PR; prep-pr runs once at the end.
prep-pr, with findings fixedNo subagent's stated verification counts. Before reading a word of its report,
check the mechanical half yourself in its worktree: the commit exists and the tree
is clean (git -C <dir> status --porcelain, git log --oneline <base>..HEAD), no
conflict markers survived a rebase, no brief or scratch file was committed, every
JSON and TOML the branch touched still parses, and git -C <dir> diff --stat
shows it touched what it claimed. Each of those has caught a report that was wrong
— including one quoting a commit SHA it had invented. Then read the diff, then run
the gates.
Two rules for anything you dispatch into a worktree:
git checkout <ref> -- <path>, and putting it back discards
whatever you had uncommitted in that tree.Run the prep-pr skill on the branch. Its own steps validate the changeset, build and test, run review-tests, and run the performance and security reviews in parallel. This skill's contract is stronger: after the reviews, dispatch fix subagents to add the missing tests and fix every security and performance finding — Critical, High and Medium at minimum, Low and Info when cheap — then re-verify. A finding deliberately deferred is carried into the PR body as a tracked follow-up. Scale review depth to the change: a docs or config PR does not need three review agents; an auth, route or binding change does. Then the five-section PR body, push, and open the PR.
Delegate this to a PR-shepherd subagent — the slow CI polling should not sit in your context. It polls to a terminal state, merges, and removes the worktree:
gh pr ready <n> # if opened as a draft; then wait ~10 s before reading state
gh pr view <n> --json mergeStateStatus,statusCheckRollup,statemergeStateStatus: CLEAN → gh pr merge <n> --squash --delete-branch.DIRTY or BEHIND → rebase onto the latest origin/main, resolve conflicts (sibling PRs that merged first are usually additive — keep both sides; for changeset or version churn from the release workflow, take the regenerated state), re-run the touched package's tests, git push --force-with-lease, re-poll.MERGED, the shepherd runs git worktree remove --force <dir>, deletes the local branch, and reports back. Never leave a merged task's worktree behind.Between dependent tasks: git fetch origin main and fast-forward local main so the next worktree is cut from the updated tip. If a later task's branch already exists and now conflicts, rebase it before its Step 5.
Session limits, API errors and crashes all land the same way: the agent stops and the worktree holds a partial change nobody has verified. Do not re-dispatch into it blind — a second agent inherits half-finished edits it did not make and cannot tell them from the tree.
git -C <worktree> status --porcelain and git log --oneline <base>..HEAD.
Committed work is salvage; an uncommitted tree is a draft with no author.ORCHESTRATE.md: finish it yourself, re-dispatch with a brief
that names what is already done, or git restore and start the task over.ORCHESTRATE.md with next: filled in and pick up a task that touches no file
this one touches.Subagents cannot prompt the user; they surface NEEDS INPUT in their report. Then:
SendMessage to its id) or by dispatching the next step with the decision baked in.The full table, with the reason behind each, is references/gotchas.md. The ones that cost a run:
gh pr ready does not propagate at once; a still-draft PR shows BLOCKED with green checks. Wait, then read.bun audit --audit-level=high. An advisory in an installed package is a real stop; do not push with --no-verify to get past one — fix or override it in package.json and say so in the PR.wrangler.toml or an index.ts conflict. Merge in dependency order and rebase additively.[[d1_databases]], [[r2_buckets]] and [images] is mirrored into [env.production] and [env.dev]; verify with wrangler deploy --dry-run.A one-line or single-file change — edit it and open the PR directly. Outside the bare-repo root — new-feat then prep-pr in place.
5438649
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.