Automating PR Workflows with Claude Task Master
Introduction
Developers who use Claude Code often find themselves stuck in a loop of opening pull requests, watching CI, fixing failures, and responding to review comments. Claude Task Master (CLI claudetm) closes that loop by turning a high-level goal into an autonomous workflow that plans, works, opens PRs, handles CI, and merges when everything passes. The tool is built on the Claude Agent SDK and runs until the goal is achieved or it needs human input.
Core Concepts
- Autonomous execution - the agent runs continuously, creating commits and PRs without manual intervention.
- PR-based workflow - every change is pushed as a pull request, preserving the review process.
- CI integration - the agent watches CI checks, fixes failures, and addresses reviewer comments automatically.
- State persistence - if the process is stopped, the task resumes exactly where it left off.
- Profiles - isolated credential sets allow multiple Claude subscriptions to run in parallel without conflict.
- Mailbox system - a REST API, MCP server, or webhook can send dynamic plan updates while the task is in progress.
Installation
# Install via pip, uv, or Docker
uv tool install claude-task-master
# Or using pip directly
pip install claude-task-master
After installation, authenticate with Claude Code:
claude login
Example Workflow
Suppose you want to add user authentication with tests to a Ruby on Rails project. The command is straightforward:
cd my-rails-app
claudetm start "Add user authentication with tests"
The agent performs the following steps:
- Planning - it reads the codebase, creates a task list, and defines success criteria.
- Working - it writes code, runs tests, commits changes, and pushes them.
- PR lifecycle - a pull request is opened, CI runs, any failures are fixed, and review comments are addressed.
- Verification - the agent runs the final test suite and lint checks before marking the task complete.
- Merge - when the PR is approved, the agent auto-merges it (configurable). All of this happens without a human typing a single line of code after the initial command.
Profiles for Parallel Work
When a team uses multiple Claude subscriptions, profiles keep credentials isolated:
claudetm profile create oauth myteam
claudetm profile use myteam
claudetm start "Implement feature X"
Each profile stores its own Claude configuration under ~/.claudetm/profiles/<name>/. This prevents API-key clashes and allows concurrent agents to run safely.
API and Webhook Integration
Claude Task Master exposes a REST API and an MCP server that publish task events. A simple webhook payload looks like this:
{
"task_id": "12345",
"status": "working",
"current_step": "fixing CI",
"pr_number": 78
}
You can sign the payload with HMAC for security and have your CI dashboard react in real time. The MCP server can be started with:
claudetm mcp start
When to Use Claude Task Master
- Teams already using Claude Code that want end-to-end PR automation.
- Projects with well-scoped goals and explicit success criteria.
- Organizations that run multiple Claude subscriptions and need isolation.
- Workflows that require programmatic dispatch and monitoring via REST or webhooks.
Conclusion
Claude Task Master turns a single goal into a fully automated development cycle, handling planning, coding, PR creation, CI, review, and merge. It persists state across interruptions and supports parallel agents through profiles. The open-source MIT license makes it easy to adopt and extend. Give it a try on your next feature and let the agent take care of the repetitive work while you focus on architecture and design.
GitHub repository - install, configure, and start automating today.
Top comments (0)