Automating PR-Based Development with Claude Task Master
Automating PR-Based Development with Claude Task Master Claude Task Master (claudetm) is a command line tool that keeps Claude working until a goal is achieved. It is built on the Claude Agent SDK and follows a strict
Automating PR-Based Development with Claude Task Master
Claude Task Master (claudetm) is a command line tool that keeps Claude working until a goal is achieved. It is built on the Claude Agent SDK and follows a strict PR-based workflow. This article explains how to set up the tool, how it orchestrates tasks, and how you can extend it with its REST API and webhook system.
Core Concepts
The tool operates in a loop that consists of four stages: planning, working, PR lifecycle, and verification. In the planning stage it reads the codebase, creates a task list and defines success criteria. During the working stage it makes code changes, runs tests, commits and pushes each change. The PR lifecycle stage opens a pull request, waits for CI, fixes failures and addresses review comments. Finally verification runs a final set of checks to confirm that all success criteria are met before marking the task as complete.
PLANNING → WORKING → PR LIFECYCLE → VERIFICATION
All work flows through pull requests, which means the code is never committed directly to the main branch. This approach gives teams a clear audit trail and integrates naturally with existing review processes.
Getting Started
Install the package with pip, uv or Docker. The following example uses uv:
uv tool install claude-task-master
Authenticate with Claude Code first:
claude login
Then run a task in your project directory:
cd my-project
claudetm start "Add user authentication with tests"
The CLI will create a plan, open a pull request, handle CI failures and merge when the PR is approved. If the process is interrupted, the tool persists its state and resumes exactly where it left off.
Profiles for Parallel Instances
Claude Task Master supports multiple isolated profiles. A profile can be an oauth profile that uses a separate Claude Code configuration directory, or an api-key profile that points to a direct Anthropic-compatible endpoint.
claudetm --profile my-team start "Implement payment gateway"
Using profiles prevents two Claude subscriptions from clobbering each other and allows teams to run several instances in parallel.
REST API, MCP Server and Webhooks
Beyond the CLI, the tool exposes a REST API and an MCP server. These interfaces let external systems dispatch tasks, monitor progress and react to mailbox updates. Webhooks are HMAC signed, ensuring secure communication.
A typical webhook payload contains the task identifier, current stage and any messages from the mailbox. You can use this to update a dashboard or trigger additional automation.
Merging Existing Pull Requests
If you have an existing PR that needs CI handling, you can hand it over to Claude Task Master:
claudetm merge-pr 42
The tool will take ownership of the CI loop, fix failures, address review comments and merge when the PR becomes mergeable. This feature was used to merge PRs #147-#150 in the project's own repository.
When to Use Claude Task Master
The tool is a good fit for teams that already use Claude Code and want end-to-end automation of the PR lifecycle. It works best with well-scoped goals that can be verified against explicit success criteria. Teams running multiple Claude subscriptions benefit from the profile isolation.
Conclusion
Claude Task Master provides a hands-off, PR-centric workflow that persists state, supports parallel instances and offers programmatic control through a REST API and webhooks. It is open source under the MIT license and can be installed via PyPI or Docker. Try it on your next feature and let the tool handle the repetitive parts of development.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.