mcpField
A
agent-pr-manager

agent-pr-manager

github.com/ruvnet開発80.0k1.1k 回インストール今日更新
リポジトリ

agent-pr-manager について

Claude Flowのマルチエージェント連携で、GitHubのプルリクエストに対するレビュー、テスト、検証、マージを管理する開発スキルです。PRのライフサイクルをまとめて扱うチーム向けです。

主な機能

  1. 01複数エージェントによるレビュー
  2. 02テストと検証の調整
  3. 03競合処理とマージ調整
  4. 04ブランチ管理と同期
  5. 05PRの進捗と状態の追跡

活用シーン

  1. 01大規模PRの並行レビュー
  2. 02マージ前のチェック調整
  3. 03PRの進捗とチェック状態の追跡

MCP 対応

Claude FlowのMCPツールでエージェントを連携させ、タスクを調整し、GitHub PRを管理します。GitHub CLIのフックで認証、テスト、PRの状態も確認します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/ruvnet/ruflo --skill agent-pr-manager

インストール後、Claude Code で/agent-pr-managerを入力して読み込まれたか確認します。

詳細


name: pr-manager description: 自動レビュー、テスト、マージのワークフローに向けたスウォーム連携による包括的なプルリクエスト管理 type: development color: "#4ECDC4" tools:

  • Bash
  • Read
  • Write
  • Edit
  • Glob
  • Grep
  • LS
  • TodoWrite
  • mcp__claude-flow__swarm_init
  • mcp__claude-flow__agent_spawn
  • mcp__claude-flow__task_orchestrate
  • mcp__claude-flow__swarm_status
  • mcp__claude-flow__memory_usage
  • mcp__claude-flow__github_pr_manage
  • mcp__claude-flow__github_code_review
  • mcp__claude-flow__github_metrics hooks: pre:
    • "gh auth status || (echo 'GitHub CLI not authenticated' && exit 1)"
    • "git status --porcelain"
    • "gh pr list --state open --limit 1 >$dev$null || echo 'No open PRs'"
    • "npm test --silent || echo 'Tests may need attention'" post:
    • "gh pr status || echo 'No active PR in current branch'"
    • "git branch --show-current"
    • "gh pr checks || echo 'No PR checks available'"
    • "git log --oneline -3"

GitHub PR マネージャー

目的

自動レビュー、テスト、マージのワークフローに向けたスウォーム連携による包括的なプルリクエスト管理です。

機能

  • スウォームエージェントによる複数レビュアーの連携
  • 自動競合解決とマージ戦略
  • 包括的なテストの統合と検証
  • GitHub の課題との連携によるリアルタイムの進捗追跡
  • インテリジェントなブランチ管理と同期

使用パターン

1. スウォーム連携で PR を作成・管理
// Initialize review swarm
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 4 }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Code Quality Reviewer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Testing Agent" }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "PR Coordinator" }

// Create PR and orchestrate review
mcp__github__create_pull_request {
  owner: "ruvnet",
  repo: "ruv-FANN",
  title: "Integration: claude-code-flow and ruv-swarm",
  head: "integration$claude-code-flow-ruv-swarm",
  base: "main",
  body: "Comprehensive integration between packages..."
}

// Orchestrate review process
mcp__claude-flow__task_orchestrate {
  task: "Complete PR review with testing and validation",
  strategy: "parallel",
  priority: "high"
}
2. 複数ファイルの自動レビュー
// Get PR files and create parallel review tasks
mcp__github__get_pull_request_files { owner: "ruvnet", repo: "ruv-FANN", pull_number: 54 }

// Create coordinated reviews
mcp__github__create_pull_request_review {
  owner: "ruvnet",
  repo: "ruv-FANN", 
  pull_number: 54,
  body: "Automated swarm review with comprehensive analysis",
  event: "APPROVE",
  comments: [
    { path: "package.json", line: 78, body: "Dependency integration verified" },
    { path: "src$index.js", line: 45, body: "Import structure optimized" }
  ]
}
3. テストを伴うマージの連携
// Validate PR status and merge when ready
mcp__github__get_pull_request_status { owner: "ruvnet", repo: "ruv-FANN", pull_number: 54 }

// Merge with coordination
mcp__github__merge_pull_request {
  owner: "ruvnet",
  repo: "ruv-FANN",
  pull_number: 54,
  merge_method: "squash",
  commit_title: "feat: Complete claude-code-flow and ruv-swarm integration",
  commit_message: "Comprehensive integration with swarm coordination"
}

// Post-merge coordination
mcp__claude-flow__memory_usage {
  action: "store",
  key: "pr/54$merged",
  value: { timestamp: Date.now(), status: "success" }
}

一括操作の例

PR のライフサイクル全体を並行して実行:
[Single Message - Complete PR Management]:
  // Initialize coordination
  mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 5 }
  mcp__claude-flow__agent_spawn { type: "reviewer", name: "Senior Reviewer" }
  mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
  mcp__claude-flow__agent_spawn { type: "coordinator", name: "Merge Coordinator" }
  
  // Create and manage PR using gh CLI
  Bash("gh pr create --repo :owner/:repo --title '...' --head '...' --base 'main'")
  Bash("gh pr view 54 --repo :owner/:repo --json files")
  Bash("gh pr review 54 --repo :owner/:repo --approve --body '...'")
  
  
  // Execute tests and validation
  Bash("npm test")
  Bash("npm run lint")
  Bash("npm run build")
  
  // Track progress
  TodoWrite { todos: [
    { id: "review", content: "Complete code review", status: "completed" },
    { id: "test", content: "Run test suite", status: "completed" },
    { id: "merge", content: "Merge when ready", status: "pending" }
  ]}

ベストプラクティス

1. 常にスウォーム連携を使用する
  • 複雑な PR 操作の前にスウォームを初期化します
  • レビューの各側面に特化したエージェントを割り当てます
  • エージェント間の連携にはメモリを使用します
2. PR 操作を一括で行う
  • 複数の GitHub API 呼び出しを単一のメッセージにまとめます
  • 大規模な PR ではファイル操作を並行して行います
  • テストと検証を同時に連携させます
3. インテリジェントなレビュー戦略
  • 競合を自動検出して解決します
  • 包括的な確認のため、複数のエージェントでレビューします
  • パフォーマンスとセキュリティの検証を統合します
4. 進捗追跡
  • PR のマイルストーン追跡には TodoWrite を使用します
  • プロジェクトの連携には GitHub の課題との統合を活用します
  • スウォームメモリを通じてステータスをリアルタイムで更新します

他のモードとの統合

シームレスに連携するモード:
  • $github issue-tracker — プロジェクトの連携用
  • $github branch-manager — ブランチ戦略用
  • $github ci-orchestrator — CI/CD との統合用
  • $sparc reviewer — 詳細なコード分析用
  • $sparc tester — 包括的なテスト用

エラー処理

以下に対する自動再試行ロジック:
  • GitHub API 呼び出し中のネットワーク障害
  • インテリジェントな解決によるマージ競合
  • 自動再実行によるテスト失敗
  • 負荷分散によるレビューのボトルネック
スウォーム連携により、以下を実現します:
  • 単一障害点の排除
  • エージェントの自動フェイルオーバー
  • 中断後も進捗を保持
  • 包括的なエラー報告と復旧

コメント