Claude Code Agent: Task Decomposition — Break Down Complex Tasks
Claude Code agent that breaks complex tasks into manageable subtasks. Plans execution order, identifies dependencies, and tracks progress.
What it is
This is a Claude Code agent skill for task decomposition. It breaks complex development tasks into manageable subtasks, plans execution order based on dependencies, and tracks progress through completion.
The skill targets developers who face large, ambiguous tasks and need a structured approach to planning. Instead of diving into code immediately, the agent creates a task plan that can be reviewed, modified, and executed step by step.
How it saves time or tokens
Complex tasks attempted without decomposition often lead to circular attempts, forgotten requirements, and wasted tokens on unfocused exploration. Task decomposition front-loads the planning effort, producing a clear execution path that reduces backtracking.
Each subtask becomes a focused, self-contained unit of work. The agent can execute subtasks sequentially, validating each one before moving to the next, which catches issues early.
How to use
- Install the skill in your Claude Code configuration.
- Describe a complex task:
Add user authentication to the API with:
- Email/password registration
- JWT token generation
- Password reset flow
- Protected route middleware
- Rate limiting on auth endpoints
- The agent decomposes it into ordered subtasks:
Subtask 1: Create User model with password hashing
Subtask 2: Build registration endpoint
Subtask 3: Implement JWT token generation and validation
Subtask 4: Add login endpoint with token response
Subtask 5: Create auth middleware for protected routes
Subtask 6: Build password reset flow (request + reset)
Subtask 7: Add rate limiting to auth endpoints
Subtask 8: Write integration tests
- Review the plan, adjust ordering or add subtasks, then execute.
Example
Task Plan: Add Authentication
| # | Subtask | Depends On | Status |
|---|---|---|---|
| 1 | User model + migrations | - | pending |
| 2 | Registration endpoint | 1 | pending |
| 3 | JWT utils | - | pending |
| 4 | Login endpoint | 1, 3 | pending |
| 5 | Auth middleware | 3 | pending |
| 6 | Password reset | 1, 3 | pending |
| 7 | Rate limiting | 2, 4 | pending |
| 8 | Integration tests | all | pending |
Related on TokRepo
- AI Tools for Coding — AI development tools and agents
- AI Tools for Task Management — Task planning and management tools
Common pitfalls
- Decomposing too finely. Subtasks that take less than 5 minutes create overhead without benefit. Aim for subtasks that represent 15-60 minutes of focused work.
- Not identifying dependencies between subtasks. Independent subtasks can run in parallel; dependent ones must be sequenced. Missing a dependency causes rework.
- Skipping the review step. The initial decomposition is a starting point. Review and adjust before executing. The agent may miss domain-specific requirements.
Frequently Asked Questions
The agent analyzes the task description and identifies logical dependencies. Database models must exist before endpoints that use them. Utility functions must exist before code that calls them. The agent creates a dependency graph and sorts subtasks topologically.
Yes. The task plan is presented for review before execution. You can add, remove, reorder, or modify subtasks. The agent adjusts dependencies automatically when you make changes.
Yes. Each subtask has a status (pending, in-progress, done, blocked). The agent updates status as it completes subtasks and reports overall progress. Blocked subtasks are flagged with the reason.
Subtasks should represent a single, testable unit of work. Too granular (one function per subtask) creates overhead. Too coarse (entire feature as one subtask) loses the benefit of decomposition. Aim for subtasks that produce a reviewable, testable output.
Yes. Refactoring tasks benefit significantly from decomposition. The agent can plan a safe refactoring sequence: add new abstraction, migrate callers one by one, remove old code, update tests. This prevents the 'big bang refactor' that often introduces bugs.
Citations (3)
- Anthropic Documentation— Claude Code agent extensibility and custom skills
- Software Engineering at Google— Task decomposition patterns in software engineering
- Agile Alliance— Project management and task planning techniques
Related on TokRepo
Source & Thanks
Created by Claude Code Templates by davila7. Licensed under MIT. Install:
npx claude-code-templates@latest --agent ai-specialists/task-decomposition-expert --yes