Batch Tasks Skill
Read steps from TODO.md, auto-plan implementation details, and run them sequentially (or in parallel) via claude -p. Each task runs in a fresh Claude Code session with pre-generated plans.
Key features
- •TODO.md integration — Reads project TODO.md, parses steps and unchecked items. Default: first uncompleted step. Specify steps:
/batch-tasks step2 step4. - •Auto-planning — Before writing tasks, the skill researches relevant files in the current session (which has codebase context) and generates detailed implementation plans with file paths, line numbers, and patterns to follow. This dramatically reduces token waste from redundant exploration in
claude -psessions. - •Scout scoring — Each task is scored (0-100) before execution. Tasks scoring <50 are skipped and a GitHub Issue is created instead. Tasks 50-79 are flagged as risky.
- •Per-task model assignment — Each task is automatically assigned
haiku(simple deletions, <20 lines),sonnet(standard features, 2-4 files), oropus(architectural, 5+ files) based on complexity. - •Per-task timeout & retries — Each task has a configurable timeout (default 10 min) and retry count (default 2). Timed-out or failed tasks are rolled back via git and retried automatically.
- •Failure resilience — Failed tasks don't kill the batch. After all retries are exhausted, failures are logged to PROGRESS.md and a GitHub Issue is created automatically.
- •Parallel execution —
--parallelflag runs independent tasks concurrently using git worktrees, with automatic conflict detection and merge. - •Background execution with live progress monitoring
Usage
Execute TODO steps (primary usage)
code
/batch-tasks # First uncompleted step from TODO.md /batch-tasks step2 # Execute Step 2 /batch-tasks step2 step4 # Execute Steps 2 and 4
Run from quoted task descriptions
code
/batch-tasks "Fix sidebar padding" "Add loading skeleton to /projects"
Run / preview an existing task file
code
/batch-tasks --run # Serial execution /batch-tasks --parallel # Parallel execution (git worktrees) /batch-tasks --dry-run
How it works
- •Parse TODO.md — Finds the target step(s), extracts unchecked
- [ ]items - •Planning phase — For each item, searches the codebase (Glob/Grep), reads relevant files, and generates a detailed plan with exact file paths, line numbers, and implementation steps
- •Scout scoring — Each task is scored on readiness (target files found, patterns clear, no blocking deps). Tasks scoring <50 are skipped.
- •Model assignment — Each task gets assigned
haiku,sonnet, oropusbased on complexity - •Tasks are written to
tasks.txtin delimited block format - •
scripts/run-tasks.sh(serial) orscripts/run-tasks-parallel.sh(parallel) executes tasks - •Each task runs with a timeout; on failure, working tree is rolled back and the task is retried
- •Logs go to
logs/claude-tasks/with timestamps (per attempt) - •After all tasks complete: success/failure summary, failures logged to PROGRESS.md + GitHub Issue