decompose
Break a task into ordered subtasks with dependencies
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Break a task into ordered subtasks with dependencies
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Process issues sequentially: /dev per issue in isolated sub-agent โ CI wait โ merge โ next
E2E development: investigate โ dig โ decompose โ implement โ test โ review โ PR
Investigate codebase for an issue in a forked context (context isolation)
Clarify ambiguities in plans with structured questions and auto-decide rules
Audit codebase for tech debt, code quality, and architecture issues โ then create GitHub Issues
Create a pull request for the current branch using the project's PR template
| name | decompose |
| description | Break a task into ordered subtasks with dependencies |
| user-invocable | true |
| allowed-tools | ["ToolSearch"] |
Break down a development task into small, executable subtasks with clear dependencies.
You need these before decomposing:
Each task must include:
Read CLAUDE.md to understand the project's architecture layers, then split by layer from inner to outer.
General pattern (adapt to project):
1. Core types โ data classes, interfaces, enums
2. Business logic โ use cases, services, domain rules
3. Infrastructure โ repositories, API clients, DB
4. Presentation โ UI components, view models, controllers
5. Tests โ unit tests, integration tests
6. Cross-cutting โ lint, formatting, CI checks
For KMP projects:
1. commonMain API โ shared types, interfaces
2. expect/actual โ platform abstractions
3. androidMain โ Android-specific implementation
4. iosMain โ iOS-specific implementation
5. Tests โ commonTest, platform tests
6. Sample apps โ androidApp, iosApp
7. Cross-cutting โ detekt, explicitApi
For web projects:
1. Types/schemas โ shared types, API contracts
2. Backend logic โ API handlers, services
3. Frontend logic โ state management, hooks
4. UI components โ views, pages
5. Tests โ unit, E2E
6. Cross-cutting โ lint, build
Set dependencies on tasks that require earlier ones:
Use TaskCreate for each subtask:
subject: "Implement {What} in {Where}"
description: |
**What**: {description}
**Where**: {file path(s)}
**How**: {implementation approach}
**Why**: {reason}
**Verify**: {verification step}
activeForm: "Implementing {What}"
After creating all tasks, show the full task list with dependencies:
| # | Layer | Description | Blocked By |
|---|-------|-------------|------------|
| 1 | Core | Define FooData data class | โ |
| 2 | Logic | Implement FooService | #1 |
| 3 | Infra | Add FooRepository | #2 |
| 4 | UI | Add FooScreen component | #2, #3 |
| 5 | Test | Unit tests for FooService | #2 |
| 6 | Cross | Lint + format check | #3, #4 |
Ask user to confirm before starting implementation.
After generating the full task list, use Codex to validate the decomposition.
ToolSearch("select:mcp__codex__codex")
mcp__codex__codex(
prompt: "Validate this task decomposition for correctness and completeness:
## Task List
{full task table with dependencies}
## Project Architecture
{architecture layers from CLAUDE.md}
## Validation Checklist
1. **Layer ordering**: Are tasks ordered inner-to-outer (core โ logic โ infra โ presentation โ tests โ cross-cutting)?
2. **Missing tasks**: Are there any steps that should exist between tasks? Any gaps?
3. **Dependency correctness**: Are all dependency edges correct? Any missing or unnecessary dependencies?
4. **Parallelization**: Which tasks could safely run in parallel (no shared state, no dependency)?
5. **Risk assessment**: Which tasks are highest-risk and might need extra verification?
Output: validated task list with any corrections, plus a list of parallelizable task groups."
)
If Codex suggests corrections:
If ToolSearch fails to find Codex or the call errors: