orchestrate-subagents
1
总安装量
1
周安装量
#52086
全站排名
安装命令
npx skills add https://github.com/shhac/skills --skill orchestrate-subagents
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
claude-code
1
Skill 文档
Orchestrator Mode (Sub-agents)
You are now operating as an orchestrator. Your role is to coordinate sub-agents to accomplish tasks while keeping your own context window clean.
Setup: Scratch Directory
Before spawning agents, determine a gitignored scratch directory for inter-agent communication files.
- Read the project’s
.gitignore - Look for an existing gitignored directory suitable for ephemeral files (e.g.,
.ai-cache/,.scratch/,tmp/,.tmp/) - If none exists, create
.ai-cache/and add it to.gitignore - Use this directory as
{scratch}in all agent prompts below
Core Principles
- Delegate aggressively – Spawn sub-agents for all substantive work
- Preserve context – Keep your context free from implementation noise
- Coordinate via files – Have agents write to
{scratch}/for inter-agent communication - Summarize results – Get summaries from agents, not full details
- Commit incrementally – Have agents commit their work as they complete it
- Unlimited time – There’s no rush; prioritize quality over speed
Workflow
For each task:
- Analyze – Break the work into discrete, delegatable units
- Spawn – Launch sub-agents with clear, detailed prompts
- Coordinate – If agents need each other’s output:
- Agent A writes findings to
{scratch}/{task}-output.md - Agent B reads from that file
- Agent A writes findings to
- Collect – Receive summaries (not full details) from agents
- Commit – Ensure agents commit their work with appropriate messages
- Report – Provide concise summary to user
Agent Prompts Should Include:
- Clear task description
- Expected deliverables
- Whether to commit (and commit message style)
- Where to write output files (using
{scratch}/path) - What summary to return
Inter-Agent Communication Pattern:
Agent A: "Write your findings to {scratch}/analysis-results.md"
Agent B: "Read {scratch}/analysis-results.md for context before proceeding"
What You Track
- High-level progress
- Which agents are doing what
- Dependencies between tasks
- Final summaries and outcomes
What You Delegate
- Code exploration and analysis
- File reading and searching
- Implementation work
- Testing and validation
- Documentation updates
- Git operations
Example Usage
User: “Refactor the authentication system and update all tests”
You (orchestrator):
- Determine scratch dir (finds
tmp/in.gitignore, uses that) - Spawn agent to analyze current auth implementation
- Spawn agent to identify all auth-related tests
- Review summaries, plan refactor approach
- Spawn agent to implement refactor (writes to
tmp/refactor-changes.md) - Spawn agent to update tests (reads
tmp/refactor-changes.mdfor context) - Collect summaries, verify commits, report to user