From bach
Use when facing complex tasks that benefit from decomposition into focused subtasks delegated to specialist workers
npx claudepluginhub tslateman/claude-plugins --plugin bachThis skill uses the workspace's default tool permissions.
Decompose complex requests into focused subtasks and delegate each to a specialist worker subagent.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Performs token-optimized structural code search using tree-sitter AST parsing to discover symbols, outline files, and unfold code without reading full files.
Decompose complex requests into focused subtasks and delegate each to a specialist worker subagent.
Core principle: Manager plans and delegates. Workers execute. Manager synthesizes.
digraph when_to_use {
"Complex multi-part task?" [shape=diamond];
"Benefits from specialization?" [shape=diamond];
"Use orchestrating-work" [shape=box];
"Handle directly" [shape=box];
"Complex multi-part task?" -> "Benefits from specialization?" [label="yes"];
"Complex multi-part task?" -> "Handle directly" [label="no - simple"];
"Benefits from specialization?" -> "Use orchestrating-work" [label="yes"];
"Benefits from specialization?" -> "Handle directly" [label="no"];
}
Use when:
Don't use when:
Before delegating, decompose the request:
coder - Write, modify, debug coderesearcher - Investigate, analyze, recommendreviewer - Evaluate quality, find issuesFor each subtask, dispatch a worker using the Task tool:
Task tool (general-purpose):
description: "[Worker]: [brief task]"
prompt: [Use worker prompt template from ./workers/]
Worker prompt templates:
./workers/coder-prompt.md - Implementation tasks./workers/researcher-prompt.md - Investigation tasks./workers/reviewer-prompt.md - Quality review tasksAfter workers return:
User: "Create a rate limiter middleware for Express with sliding window"
--- PHASE 1: PLAN ---
Objectives:
1. Functional rate limiter middleware
2. Sliding window algorithm (not fixed window)
3. Configurable limits
4. Proper HTTP responses
Subtasks:
1. [researcher] Research sliding window algorithms for rate limiting
2. [coder] Implement the middleware based on research
3. [reviewer] Review implementation for edge cases and security
Execution: Sequential (2 depends on 1, 3 depends on 2)
Definition of Done:
- Middleware limits requests per IP
- Uses sliding window (not fixed)
- Configurable time window and max requests
- Returns 429 with Retry-After header
- Handles edge cases (no IP, concurrent requests)
--- PHASE 2: DELEGATE ---
[Dispatch researcher subagent with ./workers/researcher-prompt.md]
Researcher returns: Analysis of token bucket vs sliding window log vs sliding window counter...
[Dispatch coder subagent with ./workers/coder-prompt.md + researcher findings]
Coder returns: Implementation + tests
[Dispatch reviewer subagent with ./workers/reviewer-prompt.md]
Reviewer returns: Review with findings
--- PHASE 3: SYNTHESIZE ---
✓ Researcher provided algorithm recommendation
✓ Coder implemented with tests passing
✓ Reviewer approved (minor suggestions addressed)
✓ All Definition of Done criteria met
[Report to user with code artifact]
❌ Manager doing work: If you're writing code or researching, stop. Delegate. ❌ Vague subtasks: "Handle the backend" → Be specific about what to build ❌ Missing context: Worker asks questions → You didn't provide enough upfront ❌ Skipping review: Always have a reviewer check code ❌ Ignoring INCAPABLE: Worker said they can't → Reassign or rethink
Works well with:
Sequence:
lifecycle if task spans multiple phases with gatesorchestrating-work for single-pass decompositiontest-driven-development for code tasks