跳到正文
DEV Community· developerz.ai·· 2 天前AI 評分52

Claude Task Master 自動化完整 PR 生命週期

Automating the Full PR Lifecycle with Claude Task Master

AI 導讀

Claude Task Master(claudetm)是一款自動化 PR 生命週期的 CLI 工具,可規劃及執行任務、建立 PR、處理 CI 檢查與審閲意見,並在獲批後按設定自動合併。

正文

developerz.ai

Automating the Full PR Lifecycle with Claude Task Master

If you use Claude Code daily, you know the loop: plan a feature, write code, run tests, commit, push, open a PR, wait for CI, fix failures, address review comments, merge. Repeat.

Claude Task Master (CLI: claudetm) automates that entire loop. Give it a goal and it:

  1. Plans - reads the codebase, creates a task list organized by PRs, defines success criteria up front
  2. Executes - works through each task: makes changes, runs tests, commits, pushes
  3. Creates PRs - all work flows through pull requests, never direct commits
  4. Handles CI - waits for checks, fixes failures, addresses review comments
  5. Merges - auto-merges when approved (configurable)
  6. Verifies - confirms every success criterion is actually met
  7. Adapts - accepts dynamic plan updates via its mailbox system while still working

State That Survives Interruptions

The key difference from a simple script: Task Master persists state between sessions. Close your laptop, lose power, hit a rate limit - the task resumes exactly where it left off. The mailbox system lets you send plan updates mid-execution via REST API, MCP, or CLI.

Running Multiple Subscriptions in Parallel

By default claudetm uses your global Claude Code session. Profiles let you run isolated instances:

  • OAuth profiles - each gets its own config home at ~/.claudetm/profiles/<name>/, so two Claude subscriptions never clobber each other
  • API-key profiles - inject ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL directly (works with Anthropic API or OpenRouter)

This means you can run multiple autonomous agents against the same repo or different ones, each with its own credentials.

Building On Top

The REST API, MCP server, and HMAC-signed webhooks expose the same lifecycle programmatically. Our own claudetm merge-pr command uses this - PRs #147-#150 in our repo were merged this way.

Quick Start

uv tool install claude-task-master
claude
/login
cd your-project
claudetm start "Add user authentication with tests"

Requires Python >= 3.10, authenticated Claude CLI, and authenticated GitHub CLI.

MIT licensed. Free on PyPI and Docker.

https://github.com/developerz-ai/claude-task-master

ClaudeCode #AIAgents #DevTools #Automation #OpenSource

來源:DEV Community · dev.to