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.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install 36c7c41a-843f-43ce-a447-39c9004478af --target codex先 dry-run,确认写入项后再运行此命令。
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.
常见问题
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.
引用来源 (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
来源与感谢
Created by Claude Code Templates by davila7. Licensed under MIT. Install:
npx claude-code-templates@latest --agent ai-specialists/task-decomposition-expert --yes
讨论
相关资产
Claude Code Agent: K8s Specialist — Kubernetes Operations
Claude Code agent for Kubernetes. Deployment configs, helm charts, troubleshooting, scaling, monitoring, and cluster management.
Claude Code Agent: SEO Specialist — Technical SEO Audit
Claude Code agent for technical SEO. Audit meta tags, structured data, Core Web Vitals, crawlability, and content optimization.
Claude Code Agent: Data Scientist — Analysis & Visualization
Claude Code agent for data science. Exploratory analysis, statistical modeling, visualization, feature engineering, and Jupyter notebooks.
Claude Code Agent: API Architect — Design REST & GraphQL APIs
Claude Code agent for API design. REST endpoints, GraphQL schemas, authentication, rate limiting, versioning, and documentation.