The Checklist Manifesto for AI Commands: Using TodoWrite in Claude Code

Cover Image for The Checklist Manifesto for AI Commands: Using TodoWrite in Claude Code
Mario Giancini
Mario Giancini
@MarioGiancini
Published:
Read Time: 4 min

The Problem

I have a /daily-brief command that runs 18 steps: checking calendar, email, git activity, stats, trend analysis, network health, and more. Today it skipped two steps (trend intelligence and network health) without me noticing until the end.

So why did that happen? The command is 300+ lines. Claude was executing steps, parallelizing where possible, and simply lost track mid-flow. No malice, no error—just the reality of complex procedures.

This is the same problem Atul Gawande identified in The Checklist Manifesto: even experts miss steps in complex procedures without explicit tracking.

The Solution: TodoWrite

Claude Code has a built-in tool called TodoWrite that creates a visible task list in the UI. It's designed for exactly this scenario.

How It Works

TodoWrite accepts an array of items with three properties:

TodoWrite({
  todos: [
    {
      content: "Check calendar",           // What to do (imperative)
      activeForm: "Checking calendar",     // Shown during execution
      status: "pending"                    // pending | in_progress | completed
    }
  ]
})

The task list appears in Claude Code's interface, giving you real-time visibility into progress.

The Pattern: Initialize Before Executing

The key insight is to create the full checklist before starting any work. Add this as Step 0 in any complex command:

### Step 0: Initialize Progress Tracking

**CRITICAL:** Before starting any work, create a TodoWrite checklist.

Use TodoWrite to create these items (all pending initially):
1. Load configuration
2. Create journal entry
3. Check calendar
4. Check email
5. Get Mission Control stats
6. Run trend analysis
7. Generate output file
8. Commit changes

Mark each item `in_progress` when starting and `completed` when done.

This transforms a 300-line command from "hope Claude remembers everything" to "explicit accountability with visible progress."

When to Use This Pattern

Use TodoWrite for commands with:

  • 5+ distinct steps
  • Steps that can be parallelized (easy to lose track)
  • Non-blocking steps that might be skipped (like optional integrations)
  • Steps with dependencies where order matters

Skip it for:

  • Simple 2-3 step commands
  • Commands where failure is obvious (build errors, test failures)
  • Interactive commands where you're guiding each step

Implementation Example

Here's the before/after for my daily brief command:

Before:

## Instructions

### Step 0: Load Configuration
Read the `.agent-secrets` file...

### Step 1: Create Journal Entry
...

After:

## Instructions

### Step 0: Initialize Progress Tracking

**CRITICAL:** Before starting any work, create a TodoWrite checklist.

Use TodoWrite to create these items (all pending initially):
1. Load configuration
2. Create/validate journal entry
3. Read context files
... (all 18 steps listed)

Mark each item `in_progress` when starting and `completed` when done.

### Step 1: Load Configuration
Read the `.agent-secrets` file...

The Visibility Benefit

Beyond preventing skipped steps, TodoWrite gives you:

  1. Progress awareness - See which step Claude is on during long operations
  2. Debugging context - If something fails, you know exactly where
  3. Completion confidence - Clear visual that all steps finished
  4. Interruptibility - If you need to stop, you know what's done vs. pending

Cross-Environment Compatibility

If you're building commands that run in both Claude Code and Cursor (or other AI coding environments), make your tracking instruction generic:

### Step 0: Initialize Progress Tracking

Use your environment's task tracking capability (TodoWrite in Claude Code,
Cursor's task list, or equivalent). If no task tracking is available,
announce "Starting step X" before each major step.

Create these items (all pending initially):
1. First step
2. Second step
...

This works because:

  • Claude Code has TodoWrite as a native tool
  • Cursor has its own task list UI that Claude models can use
  • Other environments fall back to verbal progress announcements

Claude models are smart enough to use whatever tracking mechanism is available. The key is giving explicit permission to adapt rather than demanding a specific tool.

The Meta-Lesson

This is the checklist manifesto applied to AI tooling. The same principle that saves lives in surgery and aviation applies to complex AI commands:

Complex procedures need explicit checklists, not implicit memory.

Claude is incredibly capable, but capability doesn't prevent oversight in long procedures. A 30-second initialization step that creates a visible checklist prevents the frustration of discovering skipped steps after the fact.


The /daily-brief command in my digital-self system now runs 18 steps with zero skips—whether executed in Claude Code or Cursor—thanks to environment-agnostic progress tracking.


Did you find this article useful?

Subscribe to my newsletter for more content like this.


Related Posts

View All →