
Agent Swarm Pr
Spin up a coordinated multi-agent swarm from a GitHub pull request to run review, validation, and merge-ready checks without manual orchestration.
Overview
agent-swarm-pr is an agent skill most often used in Ship (also Ship testing, Build integrations) that orchestrates multi-agent pull-request review, validation, and GitHub lifecycle actions from a single swarm-pr workflow
Install
npx skills add https://github.com/ruvnet/ruflo --skill agent-swarm-prWhat is this skill?
- Initializes PR-specific swarms with diff analysis, impact assessment, and topology tuned to PR complexity
- Wraps GitHub MCP flows: get/create/update PRs, diff, comments, merge, and list
- Coordinates claude-flow swarm_init, agent_spawn, task_orchestrate, memory_usage, and coordination_sync
- Pre-hooks store PR metadata and diff context; post-hooks publish swarm review results and merge guidance
- TodoRead/TodoWrite plus Bash/Grep/Read/Write/Edit for in-repo validation alongside the swarm
Adoption & trust: 643 installs on skills.sh; 58.5k GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You open PRs constantly but one agent cannot reliably review diffs, run validation, and keep GitHub comments and merge decisions in sync.
Who is it for?
Solo and indie builders using GitHub PRs with Claude-flow MCP who want swarm-based review and automated PR updates on every change set.
Skip if: Teams without GitHub MCP, monorepos that forbid agent shell/git access on PR branches, or workflows that only need a one-off lint with no PR integration.
When should I use this skill?
Invoke when you need swarm-pr to manage a GitHub pull request with multi-agent review, validation, and automated PR lifecycle updates ($agent-swarm-pr).
What do I get? / Deliverables
After a run, the PR carries structured swarm review output, clearer merge guidance, and stored metrics so you can merge or iterate with documented agent consensus.
- Updated pull request with swarm-generated review comments and status context
- Swarm memory entries for PR metadata, diff context, and completion metrics
- Merge recommendation or coordinated merge action based on swarm analysis
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Pull-request lifecycle management—diff analysis, swarm review, and merge decisions—is where solo builders gate quality before code lands on main, which maps to the Ship phase. The skill’s core job is orchestrating multi-agent code review and PR comments on diffs, which is the canonical Review shelf under Ship.
Where it fits
Spawn a review topology on an open PR diff and post consolidated findings as GitHub comments before you approve.
Orchestrate validation agents against the PR branch while Todo items track failing checks tied to specific files in the diff.
Run an integration-focused swarm when a PR touches external APIs so impact and contract risks surface before merge.
How it compares
Use for multi-agent PR orchestration on real GitHub diffs instead of pasting patches into a single chat review.
Common Questions / FAQ
Who is agent-swarm-pr for?
It is for solo and indie developers who already ship through GitHub pull requests and want claude-flow swarms to handle review, validation comments, and merge coordination in one skill invocation.
When should I use agent-swarm-pr?
Use it in Ship during review before merge, in Ship during testing-style validation on the PR diff, and in Build when integration-risk changes need a coordinated agent pass before you approve the PR.
Is agent-swarm-pr safe to install?
It expects GitHub and claude-flow MCP tools plus shell and repo file access; review the Security Audits panel on this Prism page and scope tokens and repo permissions before enabling merge actions.
SKILL.md
READMESKILL.md - Agent Swarm Pr
--- name: swarm-pr description: Pull request swarm management agent that coordinates multi-agent code review, validation, and integration workflows with automated PR lifecycle management type: development color: "#4ECDC4" tools: - mcp__github__get_pull_request - mcp__github__create_pull_request - mcp__github__update_pull_request - mcp__github__list_pull_requests - mcp__github__create_pr_comment - mcp__github__get_pr_diff - mcp__github__merge_pull_request - mcp__claude-flow__swarm_init - mcp__claude-flow__agent_spawn - mcp__claude-flow__task_orchestrate - mcp__claude-flow__memory_usage - mcp__claude-flow__coordination_sync - TodoWrite - TodoRead - Bash - Grep - Read - Write - Edit hooks: pre: - "Initialize PR-specific swarm with diff analysis and impact assessment" - "Analyze PR complexity and assign optimal agent topology" - "Store PR metadata and diff context in swarm memory" post: - "Update PR with comprehensive swarm review results" - "Coordinate merge decisions based on swarm analysis" - "Generate PR completion metrics and learnings" --- # Swarm PR - Managing Swarms through Pull Requests ## Overview Create and manage AI swarms directly from GitHub Pull Requests, enabling seamless integration with your development workflow through intelligent multi-agent coordination. ## Core Features ### 1. PR-Based Swarm Creation ```bash # Create swarm from PR description using gh CLI gh pr view 123 --json body,title,labels,files | npx ruv-swarm swarm create-from-pr # Auto-spawn agents based on PR labels gh pr view 123 --json labels | npx ruv-swarm swarm auto-spawn # Create swarm with PR context gh pr view 123 --json body,labels,author,assignees | \ npx ruv-swarm swarm init --from-pr-data ``` ### 2. PR Comment Commands Execute swarm commands via PR comments: ```markdown <!-- In PR comment --> $swarm init mesh 6 $swarm spawn coder "Implement authentication" $swarm spawn tester "Write unit tests" $swarm status ``` ### 3. Automated PR Workflows ```yaml # .github$workflows$swarm-pr.yml name: Swarm PR Handler on: pull_request: types: [opened, labeled] issue_comment: types: [created] jobs: swarm-handler: runs-on: ubuntu-latest steps: - uses: actions$checkout@v3 - name: Handle Swarm Command run: | if [[ "${{ github.event.comment.body }}" == $swarm* ]]; then npx ruv-swarm github handle-comment \ --pr ${{ github.event.pull_request.number }} \ --comment "${{ github.event.comment.body }}" fi ``` ## PR Label Integration ### Automatic Agent Assignment Map PR labels to agent types: ```json { "label-mapping": { "bug": ["debugger", "tester"], "feature": ["architect", "coder", "tester"], "refactor": ["analyst", "coder"], "docs": ["researcher", "writer"], "performance": ["analyst", "optimizer"] } } ``` ### Label-Based Topology ```bash # Small PR (< 100 lines): ring topology # Medium PR (100-500 lines): mesh topology # Large PR (> 500 lines): hierarchical topology npx ruv-swarm github pr-topology --pr 123 ``` ## PR Swarm Commands ### Initialize from PR ```bash # Create swarm with PR context using gh CLI PR_DIFF=$(gh pr diff 123) PR_INFO=$(gh pr view 123 --json title,body,labels,files,reviews) npx ruv-swarm github pr-init 123 \ --auto-agents \ --pr-data "$PR_INFO" \ --diff "$PR_DIFF" \ --analyze-impact ``` ### Progress Updates ```bash # Post swarm progress to PR using gh CLI PROGRESS=$(npx ruv-swarm github pr-progress 123 --format markdown) gh pr comment 123 --body "$PROGRESS" # Update PR labels based on progress if [[ $(echo "$PROGRESS" | grep -o '[0-9]\+%' | sed 's/%//') -gt 90 ]]; then gh pr edit 123 --add-label "ready-for-review" fi ``` ### Code Review Integration ```bash # Create review agents with gh CLI integration PR_FILES=$(gh pr