batch-tasks
Execute TODO.md steps via unattended Claude Code sessions
- License 许可
- MIT
- 所属仓库
- shenxingy/Clade
- 最近更新
- 2026-11-13
- Stars
- ★ 10
- Forks
- 6
01 前言 Front Matter
- name
- batch-tasks
- description
- Execute TODO.md steps via unattended Claude Code sessions
- when_to_use
- execute TODO.md steps, run specific tasks from a list, batch execute named tasks, 批量执行, run steps from TODO — NOT for goal-file loops (use /loop) or task planning (use /orchestrate)
- argument-hint
- [step2 step4 ...] | "task1" "task2" ... | --run [file] | --dry-run [file] | --parallel [file]
- user_invocable
- true
02 资源文件 1
- 参考文档prompt.md17.8 KB
03 SKILL.md 正文
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)
/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
/batch-tasks "Fix sidebar padding" "Add loading skeleton to /projects"
Run / preview an existing task file
/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 ~/.claude/scripts/run-tasks.sh(serial) or~/.claude/scripts/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
After batch-tasks completes
Run /commit to commit worker output (tasks run in-tree; changes may not be
committed yet). It does not push — publication needs --publish or an existing
delivery authority.
Run /review to verify behavior anchors still pass after autonomous changes.
04 同仓库更多 Skills
worktree
Create or inspect runtime-adaptive isolated Git workspaces with explicit ownership and delivery routing
web-search
Route online research and URL reading to native tools or TinyFish MCP/API; prepare targeted requests, handle progress and failures, and check returned evidence. Applies to web search, fetching, and bulk collection; excludes repository/file search.
verify
Verify project behavior anchors — compilation, tests, and interaction checks after autonomous runs. NOT the Codex built-in /verify (which runs the app to observe a single change working) — this one walks the AGENTS.md "Features (Behavior Anchors)" list.
tasks
Coordinate dependency-aware project tasks across independent Codex, Codex, Kimi and human sessions using Beads. Use for shared plans, claiming work, task handoffs, acceptance and agent monitoring snapshots.
sync
End-of-session documentation sync — updates TODO.md and PROGRESS.md only (run /commit after to commit everything)
status
Show a provider-neutral, freshness-aware snapshot of active Agent work, Git delivery, execution identity, and usage limits. Use for “what's going on right now”, what is running, progress updates, active runtime/provider/model, or stuck-work checks.