Skip to main content
command CX Codex

todo-worktree — Claude Code command: what it does, how to install

todo-worktree takes tasks from a todo list and implements them inside isolated git worktrees with strict phased approvals.

no license ★ 1,357 updated 2026-03-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/todo-worktree.md
Open on GitHub

What todo-worktree does

The command guides an agent through a strict five-step pipeline: INIT, SELECT, REFINE, IMPLEMENT, and COMMIT. Instead of editing your main working copy directly, it spins up a dedicated git worktree with a timestamped branch for each task chosen from todos/todos.md.

Before touching application code, sub-agents inspect the repository to map commands, test configurations, and architecture into todos/project-description.md. Every checkbox in the implementation plan requires direct user sign-off, and the agent commits progress after completing each item.

Interrupted work will not be lost. The workflow logs the agent PID inside task.md and detects abandoned worktrees on restart. You will need an editor launch command such as code or cursor to open isolated task folders.

What it helps with

  • isolate new features in dedicated git worktrees
  • generate step-by-step implementation plans from raw todos
  • resume abandoned tasks using recorded agent PIDs
  • run validation checks before final task commits

Example prompts for the agent

  • Pick the next task from todos and set up a worktree
  • Resume the orphaned task from the worktree list
  • Run /todo-worktree to plan and execute the selected feature

How to install todo-worktree

Manually: put the files in place

.claude/commands/todo-worktree.md

Call it with /todo-worktree. For all projects use ~/.claude/commands/

Questions about todo-worktree

How to install todo-worktree in Claude Code?

Save the command definition file to .claude/commands/todo-worktree.md.

What does todo-worktree do?

It selects an item from todos/todos.md, moves it to an isolated git worktree, and walks through planning, implementation, and commit phases with explicit user confirmation.

How does todo-worktree track interrupted tasks?

It writes the agent PID into task.md inside the worktree directory. During initialization, it scans those files against running system processes to find unfinished sessions.

Similar slash commands

All slash commands for Git and GitHub →

From the same set112

The whole set →
database-optimizer database-optimizer — a subagent for database performance analysis: finds bottlenecks in SQL queries, indexing, schema design and infrastructure. CX Codex ★ 1,357repo stars ui-designer ui-designer — a Claude Code subagent for building interface mockups, design systems, and accessible layouts using magic and context7 MCP servers. CX Codex ★ 1,357repo stars cloudflare-worker Generate a Cloudflare Worker from a task description, with Wrangler configuration and sample requests. Useful for building an API, WebSocket service, or authentication middleware. CX Codex +1 ★ 1,357repo stars legacy-modernizer legacy-modernizer is a Claude Code subagent for planning and carrying out gradual changes to legacy systems. It engages on framework upgrades, codebase refactors, and monolith decomposition. CX Codex ★ 1,357repo stars package-skill package-skill is a Claude Code command that checks a skill and builds a ZIP for sharing, team distribution, or publication. CX Codex +1 ★ 1,357repo stars parallel-tasks-help parallel-tasks-help is a Claude Code command that explains how to run /parallel-tasks, with its options, agent types, and examples. It also covers task systems and coordination stages. CX Codex +1 ★ 1,357repo stars linear-task-to-issue linear-task-to-issue exports Linear tasks into GitHub issues while preserving descriptions, child tasks, comments, and priority labels. CX Codex +1 ★ 1,357repo stars electron-pro A Claude subagent that runs an Electron project written in TypeScript: main and renderer processes, IPC through a preload bridge, packaging with electron-builder. CX Codex ★ 1,357repo stars

Project sponsors

Companies that keep this analytics open