integrations/claude-code/commands/plan-to-beads.md
Convert a Claude Code plan file into beads epic + tasks for cross-session tracking.
$ARGUMENTS (optional - path to plan file, defaults to most recent in ~/.claude/plans/)
Use the Task tool with subagent_type='general-purpose' to convert the plan.
The agent should:
Find the plan file
ls -t ~/.claude/plans/*.md | head -1Parse the plan structure
# Plan: or # heading## Summary### Phase N: or ### N. sectionCreate the epic
bd create "[Plan Title]" -t epic -p 1 -d "[summary]. Files: N to modify." --json
Create tasks from phases
bd create "[Phase title]" -t task -p 2 -d "[description]" --json
Add sequential dependencies
bd dep add <phase2> <phase1>Link tasks to epic
bd dep add <epic> <task> for each taskReturn a concise summary (not raw output):
Created from: [filename]
Epic: [title] ([epic-id])
├── [Phase 1] ([id]) - ready
├── [Phase 2] ([id]) - blocked by [prev]
└── [Phase 3] ([id]) - blocked by [prev]
Total: [N] tasks
Run `bd ready` to start.