deepagents-planning-todos — Claude Code skill for task planning
The deepagents-planning-todos Claude Code skill shows how to plan Deep Agents work with write_todos. It covers task breakdown, progress tracking, and diagnosing todos that remain unfinished.
MIT ★ 106 updated 2026-11-11
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a claude-codeWhat deepagents-planning-todos does
The skill explains how to split multi-step work into tasks and track each one with write_todos. Every entry has a description and one of three statuses: pending, in_progress, or completed. Each update replaces the full list, so active entries need to remain in it.
Examples cover research, coding, analysis, and document processing. The guidance also describes getting approval before execution and tracing stuck tasks to causes such as missing status changes or vague completion criteria. Its agent example imports create_deep_agent from deepagents; the Claude Code install command places the skill at ~/.claude/skills/deepagents-planning-todos/SKILL.md.
What it helps with
- split multi-step work into trackable tasks
- keep todo statuses aligned with current progress
- find why an item stays
in_progress - outline research or coding work
Example prompts for the agent
- Break this work into stages and track them with
write_todos. - Show me the research plan before starting, then update each task's status.
- Find why this task remains
in_progressand suggest a fix.
How to install deepagents-planning-todos
1Skills CLI (Vercel)
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a claude-code2Manually: put the files in place
~/.claude/skills/deepagents-planning-todos/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/deepagents-planning-todos/
1Skills CLI (Vercel)
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a codex2Manually: put the files in place
.agents/skills/deepagents-planning-todos/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a cursor2Manually: put the files in place
.cursor/skills/deepagents-planning-todos/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install soba-labs/langchain-agent-skills skills/deepagents-planning-todos2Manually: put the files in place
.github/skills/deepagents-planning-todos/SKILL.md1Skills CLI (Vercel)
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a gemini-cli2Platform CLI
gemini skills install https://github.com/soba-labs/langchain-agent-skills --path skills/deepagents-planning-todosManually: put the files in place
.devin/skills/deepagents-planning-todos/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about deepagents-planning-todos
How do I install deepagents-planning-todos in Claude Code?
Run npx skills add soba-labs/langchain-agent-skills --skill deepagents-planning-todos -a claude-code. The skill file is at ~/.claude/skills/deepagents-planning-todos/SKILL.md.
What does deepagents-planning-todos do?
It explains how to plan multi-step Deep Agents work with write_todos, update task states, and diagnose unfinished items.
Which statuses does write_todos use?
The documented flow moves from pending to in_progress, then to completed. Full-list updates retain all active todos.
Source text
SKILL.md · MIT
---
name: deepagents-planning-todos
description: Use the write_todos tool effectively for task planning and decomposition in Deep Agents. Use when users want to (1) implement task planning with write_todos, (2) break down complex tasks into subtasks, (3) track agent progress through todos, (4) debug why todos aren't completing, (5) design todo structures for different task types (research, coding, analysis), (6) understand todo status lifecycle and best practices, or (7) visualize todo progression from LangSmith traces.
---
# Deep Agents Planning and Todos
Master the `write_todos` tool for effective task planning and decomposition in Deep Agents.
## Use This Skill When
- You need to break down complex multi-step tasks (3+ steps) into trackable subtasks.
- You want to show users the plan before executing (user approval workflow).
- You're debugging why todos aren't completing as expected.
- You need patterns for different task types (research, coding, analysis, document processing).
- You want to visualize todo progression from LangSmith traces.
## When To Use write_todos
| Use write_todos | Execute Directly |
|-----------------|------------------|
| ✅ Complex multi-step tasks (3-6 steps) | ✅ Simple 1-2 step queries |
| ✅ Tasks requiring user approval first | ✅ Single tool calls |
| ✅ Long-running workflows needing progress tracking | ✅ Quick information lookups |
| ✅ Tasks where planning adds clarity | ✅ Straightforward API calls |
**Decision rule**: If you'd benefit from showing the user "Here's my plan..." before starting, use `write_todos`.
## Quick Start
```python
from deepagents import create_deep_agent
# TodoListMiddleware is included by default in create_deep_agent
agent = create_deep_agent(
model="anthropic:claude-sonnet-4-5-20250929",
tools=[search_tool, summarize_tool],
system_prompt="You are a research assistant. Use write_todos for multi-step tasks."
)
# Agent workflow:
# 1. Call write_todos with initial plan
# 2. Ask user: "Does this plan look good?"
# 3. User approves → start executing
# 4. Update the todo list as work progresses
# 5. Keep todos aligned with the current plan and execution state
```
**Example todo creation:**
```python
# Agent calls write_todos internally:
{
"name": "write_todos",
"arguments": {
"todos": [
{"content": "Search for papers on LLM agents", "status": "pending"},
{"content": "Read and extract findings from top 5 papers", "status": "pending"},
{"content": "Identify common themes", "status": "pending"},
{"content": "Write summary report", "status": "pending"}
]
}
}
```
## Todo Structure and API
### Two-Field Structure
```json
{
"content": "Task description (clear, actionable)",
"status": "pending" | "in_progress" | "completed"
}
```
### Key Constraints
**Full-list updates**: Treat each `write_todos` call as a full state update and include all active todos.
**Per-turn discipline**: Prefer one `write_todos` update per model turn to avoid conflicting plan changes.
**Best granularity**: Keep lists to **3-6 items maximum** (avoid over-fragmentation).
### Tooling Note
Deep Agents documentation describes `write_todos` as the built-in interface for todo planning/tracking.
Keep todo state accurate by rewriting the list with updated statuses as execution progresses.
## Status Lifecycle
```
pending → in_progress → completed
```
**Best practices:**
1. Create todos with `"status": "pending"` for newly planned work.
2. Update to `"in_progress"` when starting work on a todo.
3. Mark `"completed"` when finished (don't delete - keeps context).
4. For interactive workflows, ask user approval ("Does this plan look good?") before starting execution.
**Typical workflow:**
```python
# Step 1: Create initial plan (all pending)
write_todos([
{"content": "Research topic", "status": "pending"},
{"content": "Write summary", "status": "pending"}
])
# Step 2: Ask user approval
# User: "Yes, proceed"
# Step 3: Start first task
write_todos([
{"content": "Research topic", "status": "in_progress"},
{"content": "Write summary", "status": "pending"}
])
# Step 4: Complete first task, start second
write_todos([
{"content": "Research topic", "status": "completed"},
{"content": "Write summary", "status": "in_progress"}
])
# Step 5: Finish all tasks
write_todos([
{"content": "Research topic", "status": "completed"},
{"content": "Write summary", "status": "completed"}
])
```
## Todo Patterns By Task Type
### Quick Reference
| Task Type | Pattern | Example Todos |
|-----------|---------|---------------|
| **Research** | gather → synthesize → report | Search docs, Read examples, Analyze patterns, Synthesize findings |
| **Coding** | design → implement → test | Design API, Implement endpoints, Write tests, Test end-to-end |
| **Analysis** | collect → process → analyze | Collect data, Process traces, Analyze patterns, Visualize results |
| **Document Processing** | read → extract → transform | Read files, Extract key info, Transform format, Output result |
**For detailed patterns with code examples**, see `references/todo-patterns.md`.
## Best Practices
### ✅ DO
- **Granularity**: Keep lists to 3-6 items max (clear milestones, not micro-tasks).
- **Naming**: Use clear, action-oriented descriptions ("Search for X", "Analyze Y").
- **User interaction**: Always ask approval before executing plan.
- **Status updates**: Update promptly as items complete (don't skip status transitions).
- **Context management**: Use with filesystem tools for complex workflows.
### ⚠️ DON'T
- **Over-fragment**: Avoid 10+ todos (too granular, hard to track).
- **Vague descriptions**: "Do research" → "Search LangChain docs for Deep Agents overview".
- **Skip approval**: Don't start executing without user confirmation.
- **Forget updates**: Always update status when transitioning tasks.
- **Drop existing context**: Include existing active items when rewriting todos.
## Troubleshooting
### Todo Not Completing
**Symptom**: Todo stuck in `in_progress`, agent loops or gets confused.
**Causes & fixes**:
- Missing status update → Ensure agent updates status when task finishes.
- Unclear completion criteria → Make content more specific ("Read 5 papers" vs "Do research").
### Agent Ignoring Todos
**Symptom**: Agent creates todos but doesn't follow them.
**Causes & fixes**:
- Missing system prompt guidance → Add: "Follow the todo list. Update status as you complete each item."
- One-off task (doesn't need todos) → Use direct execution for simple queries.
- Conflicting instructions → Remove competing planning instructions from prompt.
### Too Many Todos
**Symptom**: 10+ todos, hard to track, agent overwhelmed.
**Causes & fixes**:
- Over-planning → Simplify to 3-6 high-level milestones.
- Nested subtasks → Use todo hierarchy pattern (see `references/todo-patterns.md`).
- Wrong abstraction → Consider breaking into multiple agent invocations.
### Lost Context
**Symptom**: Agent loses track of what's been done.
**Causes & fixes**:
- No filesystem persistence → Use `FilesystemBackend` or `StoreBackend` for long sessions.
- Not maintaining todos → Update `write_todos` whenever status changes or scope shifts.
- Memory issues → Use `MemoryMiddleware` for long-term context.
## Visualizing Todos
Use the included script to parse LangSmith traces and visualize todo progression:
```bash
# Export trace from LangSmith (download JSON)
# Then run:
uv run skills/deepagents-planning-todos/scripts/visualize_todos.py trace.json
# Show Mermaid diagram:
uv run skills/deepagents-planning-todos/scripts/visualize_todos.py trace.json --format mermaid
# Show full timeline:
uv run skills/deepagents-planning-todos/scripts/visualize_todos.py trace.json --show-timeline
```
**Output example**:
```
Todo Timeline for trace abc123:
Initial Plan (Step 1):
⏳ [pending] Search for papers on LLM agents
⏳ [pending] Read and extract findings
⏳ [pending] Identify common themes
⏳ [pending] Write summary report
Final State:
✅ [completed] Search for papers on LLM agents
✅ [completed] Read and extract findings
✅ [completed] Identify common themes
✅ [completed] Write summary report
```
## Resources
**References (detailed patterns)**:
- `references/todo-patterns.md`: Task-specific patterns with code examples
**Examples (working code)**:
- `assets/examples/todo-driven-agent/`: Research agent demonstrating full workflow
**Example structures (templates)**:
- `assets/todo-structures/research-todos.json`: Research task breakdown
- `assets/todo-structures/coding-todos.json`: Coding task breakdown
**External docs**:
- Deep Agents overview: https://docs.langchain.com/oss/python/deepagents/overview
- Deep Agents customization (middleware defaults): https://docs.langchain.com/oss/python/deepagents/customization
- Deep Agents harness (planning capabilities): https://docs.langchain.com/oss/python/deepagents/harness
- LangChain To-do middleware: https://docs.langchain.com/oss/python/langchain/middleware/built-in
- LangSmith tracing for Deep Agents: https://docs.langchain.com/langsmith/trace-deep-agents
© soba-labs · MIT · soba-labs/langchain-agent-skills