# Task Decomposer

> 智能任务分解器 - 将复杂需求自动拆分为有序子任务，分配到最合适的技能执行

- Skill: `chainlesschain/task-decomposer` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add chainlesschain/task-decomposer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/chainlesschain/task-decomposer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: chainlesschain (https://skillmd.com/u/chainlesschain)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/chainlesschain/task-decomposer

---


# 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:

1. Scaffolding / creation tasks run first
2. Database migrations before application code
3. Implementation before testing
4. Testing before code review
5. Documentation can run in parallel with review
6. Security audit and linting run last

## Output Format

```json
{
  "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
```

