From claudekit
Dispatches subagents via Claude Code's Agent tool to parallelize 3+ independent tasks across different files/modules with verification commands. Activates on execution-ready plans or keywords like 'use subagents'.
npx claudepluginhub duthaho/claudekit --plugin claudekitThis skill uses the workspace's default tool permissions.
- A written plan exists with 3+ independent tasks
Provides patterns for subagent delegation and parallel execution using fan-out/fan-in, map-reduce, and isolation techniques. Use for independent subtasks, multi-area research, coordinated specialist work, or avoiding sequential delays.
Executes parallel subagents with Task tool and run_in_background for independent tasks like multi-file changes, dynamic spawning, or concurrent operations.
Dispatches subagents for multi-task code implementation using parallel execution for independent tasks and two-stage reviews for spec compliance and code quality. Triggers on plan.json tasks or user requests.
Share bugs, ideas, or general feedback.
Tasks are independent when they answer NO to all three questions:
| Question | If YES → Sequential |
|---|---|
| Does task B read files that task A writes? | Shared state |
| Does task B import modules that task A creates? | Dependency chain |
| Do both tasks modify the same file? | Merge conflict |
## Plan: User Order Feature
### Task 1 — Backend API (independent)
- Files: src/api/orders.py, tests/test_orders.py
- Verify: pytest tests/test_orders.py -v
### Task 2 — Frontend Component (independent)
- Files: src/components/order-form.tsx, src/components/order-form.test.tsx
- Verify: npm test -- --testPathPattern=order-form
### Task 3 — Database Migration (independent)
- Files: migrations/003_create_orders.sql, tests/test_orders_migration.py
- Verify: pytest tests/test_orders_migration.py -v
All three tasks touch different files, different test suites, no shared imports.
Each subagent prompt must be self-contained — the agent has no context from your conversation.
## Task
[One-sentence goal]
## Context
- Project: [framework, language, key conventions]
- Architecture: [relevant module structure]
- Related code: [existing patterns to follow — file paths]
## Files to Create/Modify
- [exact file paths]
## Constraints
- [validation rules, error format, naming conventions]
- [test-first: write failing test, then implement]
## Verification
- Run: [exact command]
- Expected: [what success looks like]
## Task
Implement POST /api/orders endpoint with Pydantic validation.
## Context
- Project: FastAPI + SQLAlchemy async + Pydantic v2
- Architecture: src/api/ for routes, src/models/ for SQLAlchemy, src/schemas/ for Pydantic
- Follow pattern in: src/api/users.py (dependency injection, error handling)
## Files to Create/Modify
- src/schemas/order.py (CreateOrderRequest, OrderResponse)
- src/api/orders.py (POST endpoint)
- tests/test_orders.py (test with httpx.AsyncClient)
## Constraints
- Use Depends(get_db) for database session injection
- Return 201 on success, RFC 9457 ProblemDetails on error
- Test-first: write failing test, verify red, implement, verify green
## Verification
- Run: pytest tests/test_orders.py -v
- Expected: all tests pass, no warnings
## Task
Implement OrdersModule with CRUD controller and Prisma service.
## Context
- Project: NestJS + Prisma + class-validator
- Architecture: src/<feature>/ modules with controller, service, dto/, entities/
- Follow pattern in: src/users/ (module structure, DTO validation, Prisma injection)
## Files to Create/Modify
- src/orders/orders.module.ts
- src/orders/orders.controller.ts
- src/orders/orders.service.ts
- src/orders/dto/create-order.dto.ts
- src/orders/orders.controller.spec.ts
## Constraints
- Use ValidationPipe with whitelist: true
- PartialType for UpdateOrderDto
- ProblemDetails error format via global exception filter
## Verification
- Run: npm test -- --testPathPattern=orders
- Expected: all tests pass
## Task
Build OrderForm component with validation and submission.
## Context
- Project: Next.js App Router + shadcn/ui + react-hook-form + Zod
- Architecture: src/components/ for shared, src/app/(routes)/ for pages
- Follow pattern in: src/components/user-form.tsx
## Files to Create/Modify
- src/components/order-form.tsx
- src/components/order-form.test.tsx
## Constraints
- Client component ('use client')
- Zod schema for validation, react-hook-form for state
- shadcn/ui Form, Input, Button components
- Test with Testing Library + vitest
## Verification
- Run: npx vitest run src/components/order-form.test.tsx
- Expected: all tests pass
Launch Agent 1: Backend task (background)
Launch Agent 2: Frontend task (background)
Launch Agent 3: Database task (background)
As each agent completes:
After all agents complete, run a review pass:
# Python
pytest -v --cov=src
# TypeScript
npm test && npm run build
# Full stack
pytest -v && npm test && npm run build
| Scenario | Action |
|---|---|
| Agent task fails verification | Retry once with error context in prompt |
| Agent produces wrong pattern | Fix manually, don't retry |
| 2+ failures on same task | Stop, investigate root cause |
| Merge conflict between agents | Tasks weren't truly independent — fix decomposition |
## Task (retry — previous attempt failed)
[Same task as before]
## Previous Error
[Exact error message/test failure output]
## What Went Wrong
[Your analysis of why it failed]
## Additional Context
[Any clarification the agent needs]
dispatching-parallel-agents — When to parallelize and how to manage concurrent workexecuting-plans — Sequential plan execution with review gatesusing-git-worktrees — Give each subagent an isolated workspacewriting-plans — Create plans with proper task decomposition for subagent execution