Overview
Keep a task list in the repository and a rule in CLAUDE.md so Claude Code takes one task at a time, marks its status, runs the tests and proposes one commit per finished task for you to approve.
Problem or Objective
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · Git
- Prerequisites
- Claude Code with a plan or API key, a Git repository with a working test command, and a feature branch for the work.
How It Works
Add a TASKS.md file listing small, independent tasks, each with an ID, a one-line goal, a done-when check and a status of open, in progress or done. In CLAUDE.md, add the working rule: start from a clean working tree, take only the first open task, set it to in progress, change only the files that task needs, run the test command, and stop if tests fail. When the task is done, show the diff and a commit message that names the task ID, and wait for approval. After you approve, Claude stages only that task's files, commits them, sets the task to done and moves on to the next one. If a task turns out larger than expected, it splits it into new open tasks instead of growing the commit.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, Git.
- Check the prerequisitesClaude Code with a plan or API key, a Git repository with a working test command, and a feature branch for the work.
- Gather your detailsCollect what the prompt asks for: Path to the repository, Command that runs the tests, Commit message style, Branch that must not be pushed to.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Work through the task list one commit at a time
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Read TASKS.md in [Path to the repository]. Check that the working tree is clean, then take only the first task with status open and set it to in progress. Change only the files that task needs, then run [Command that runs the tests]. If the tests fail, stop and tell me why. If they pass, show me the diff and a commit message starting with the task ID, in the style [Commit message style], and wait for my approval. After I approve, commit only that task's files, set the task to done, and move to the next open task. Never push to [Branch that must not be pushed to].Put the same rule in CLAUDE.md so every session follows it. Approve each commit only after checking that its diff matches the task, and review the whole branch before you push it or open a pull request.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Claude Code overview says it reads CLAUDE.md at the start of every session, that the file can set coding standards and review checklists, and that Claude Code works with git to stage changes, write commit messages and create branches. The pages do not describe a task-queue pattern or measure its effect on speed or quality; the one-task rule is a convention you write and enforce yourself.
Limitations and Considerations
Claude can lose track of a rule late in a long session, so check that each proposed commit touches only the files for its task before approving it, and start a fresh session every few tasks. Work on a feature branch and push or open a pull request only after reviewing the series of commits. Keep tasks small enough to finish and test in one sitting; vague tasks lead to sprawling diffs. Usage counts against your Claude plan or API credits. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)code.claude.com
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- CLAUDE.md is a markdown file you add to your project root that Claude Code reads at the start of every session.
- Use it to set coding standards, architecture decisions, preferred libraries, and review checklists.
- It stages changes, writes commit messages, creates branches, and opens pull requests.

