skills/orchestrate-subagents/SKILL.md
Activate orchestrator mode for complex multi-task work using subagents. Use when you need to coordinate multiple independent Task subagents to accomplish work while keeping the main context window clean.
npx skillsauth add shhac/skills orchestrate-subagentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are now operating as an orchestrator. Your role is to coordinate subagents to accomplish tasks while keeping your own context window clean.
Before spawning agents, determine a gitignored scratch directory for inter-agent communication files.
.gitignore.ai-cache/, .scratch/, tmp/, .tmp/).ai-cache/ and add it to .gitignore{scratch} in all agent prompts belowThese rules are non-negotiable and apply to all orchestrator and subagent actions:
.env contents, or private keys to scratch files, commit messages, or agent output files. If a subagent encounters secrets during analysis, it must reference them by name/location only (e.g., "the API key in .env"), never by value.git push, gt submit, or any command that sends commits to a remote without explicit user confirmation first. Commits to the local repo are fine; pushing is not..env*, *credentials*, *secret*, *.pem, *.key, id_rsa*, *.p12, *.pfx, or any file that appears to contain credentials. Use explicit git add <file> (never git add . or git add -A).{scratch}/ files when the orchestration session completes, whether it succeeds or fails. Do not leave inter-agent communication files on disk.{scratch}/ for inter-agent communication (never include secrets — see Safety Controls)git add <file>, never git add .){scratch}/{task}-output.mdgit add <file> (never git add . or git add -A). Verify no sensitive files are staged before committing.{scratch}/ files (not just .md) to prevent stale reads and avoid leaving sensitive data on disk. This step is mandatory even if earlier steps fail.{scratch}/ path)Agent A: "Write your findings to {scratch}/analysis-results.md"
Agent B: "Read {scratch}/analysis-results.md for context before proceeding"
git push or remote operations without user approval)User: "Refactor the authentication system and update all tests"
You (orchestrator):
tmp/ in .gitignore, uses that)tmp/refactor-changes.md)tmp/refactor-changes.md for context)development
Audit a codebase's module boundaries — enumerate modules, map their seams (import edges between modules), produce a layered topology diagram, and classify each module as narrow, hub-by-design, or accidental hub (with separate flags for cycles, layer violations, and uncertain import graphs). Outputs a diagram plus a flagged-for-review list; does not change code. Use when assessing whether abstractions live at the right boundaries, before/after a refactor to verify the boundaries improved, or when an unfamiliar codebase needs an architectural map. Not for intra-module refactoring (see improve-code-structure), bug hunting, or feature work.
testing
Investigate and solve problems using a team of specialist agents. Use when facing complex, multi-faceted problems that benefit from parallel research and structured implementation.
tools
Sync a forked repository with its upstream. Fetches both remotes, shows divergence, resets shared branches to upstream, re-merges local-only branches, cleans up branches already merged upstream, and pushes. Use when upstream has accepted PRs or moved ahead and you need to bring your fork in line.
data-ai
Manage stacked branches — rebase cascades, detect landed PRs, show stack status. Use when branches are stacked (B on A on main), trunk has advanced, a mid-stack branch changed, or a PR has landed and descendants need rebasing. Lightweight alternative to Graphite that infers the stack from git history.