Task Decomposer Skill
Intelligently decomposes complex, multi-step user requests into ordered sub-tasks, assigns each to the most suitable built-in skill, resolves dependencies, and optionally orchestrates execution.
Usage
/task-decomposer <task description>
/task-decomposer --analyze <task description>
/task-decomposer --execute <task description>
/task-decomposer --status <decomposition-id>
Modes
Default / --analyze
Decomposes the task and returns a structured plan without executing anything. Useful for review before committing to execution.
--execute
Decomposes the task and executes each sub-task in dependency order. Sub-tasks with unmet dependencies are queued until predecessors complete.
--status
Returns the current progress of a previously decomposed task by its ID.
Skill Routing
The decomposer maps keywords in the task description to built-in skills:
| Keyword Pattern | Assigned Skill |
|---|---|
| test, spec, unit test | test-generator |
| page, component, scaffold, create | project-scaffold |
| database, schema, migration, table | db-migration |
| docs, document, readme, guide | doc-generator |
| review, inspect, quality | code-review |
| deploy, ci, cd, pipeline, docker | devops-automation |
| security, audit, vulnerability | security-audit |
| lint, format, eslint, prettier | lint-and-fix |
| performance, optimize, speed, memory | performance-optimizer |
| refactor, restructure, clean up | refactor |
| api, endpoint, rest, graphql | api-tester |
| explain, understand, walkthrough | explain-code |
| dependency, package, outdated | dependency-analyzer |
Dependency Resolution
Sub-tasks are automatically ordered based on logical dependencies:
- Scaffolding / creation tasks run first
- Database migrations before application code
- Implementation before testing
- Testing before code review
- Documentation can run in parallel with review
- Security audit and linting run last
Output Format
{
"id": "td-abc123",
"originalTask": "add user profile page with tests and docs",
"subTasks": [
{
"id": "st-1",
"skill": "project-scaffold",
"description": "Create Vue user profile page component",
"dependencies": [],
"status": "pending",
"estimatedEffort": "medium"
}
],
"totalEstimatedEffort": "high",
"executionOrder": ["st-1", "st-2", "st-3"]
}
Examples
Decompose a feature request:
/task-decomposer "build a settings page with form validation, unit tests, and API docs"
Analyze without executing:
/task-decomposer --analyze "refactor the auth module and run security audit"
Execute a full plan:
/task-decomposer --execute "create REST API endpoint, add tests, lint, and deploy"
Check progress:
/task-decomposer --status td-abc123