Agent skill

Agent Swarm PR

by ruvnet in ruvnet/ruflo

Agent skill for swarm-pr - invoke with $agent-swarm-pr. An agent skill from ruvnet/ruflo.

MITAuto-check passedDevelopment

Install Agent Swarm PR

skills CLI
$ npx skills add ruvnet/ruflo --skill agent-swarm-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo agent-swarm-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-swarm-pr .claude/skills/agent-swarm-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-swarm-pr
GitHub stars
74k
Used in
2 other repos
Token cost
~2.8k tokens
SKILL.md length
320 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Agent skill for swarm-pr - invoke with $agent-swarm-pr. An agent skill from ruvnet/ruflo.

  • Works in 9 steps: PR-Based Swarm Creation → PR Comment Commands → Automated PR Workflows → …
  • Tasks that involve Multi-agent orchestration
  • SKILL.md covers Overview, Core Features, PR Label Integration and PR Swarm Commands, plus 5 more sections
  • Calls npx, gh and jq

What it does

Agent Swarm PR is an agent skill from ruvnet/ruflo. Agent skill for swarm-pr - invoke with $agent-swarm-pr

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Multi-agent orchestration and Pull requests. It works with Model Context Protocol and GitHub. The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.

When your agent uses it

  • Tasks that involve Multi-agent orchestration
  • Tasks that involve Pull requests

Example prompts

  • “/agent-swarm-pr”

Requirements

  • Node.js

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. PR-Based Swarm Creation
  2. PR Comment Commands
  3. Automated PR Workflows
  4. Multi-PR Swarm Coordination
  5. PR Dependency Analysis
  6. Automated PR Fixes
  7. PR Templates
  8. Status Checks
  9. PR Merge Automation

What it can do on your machine

Read from SKILL.md and the folder at commit 58e0ae7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • gh
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Swarm PR loads about 2.8k tokens when it runs. Until then it costs about 17 tokens; SKILL.md has 320 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit 58e0ae7, republished under its MIT licence (© ruvnet). 320 words, ~2,818 tokens.

Download SKILL.mdSave it as .claude/skills/agent-swarm-pr/SKILL.md (or your agent's skills folder).
name
agent-swarm-pr
description
Agent skill for swarm-pr - invoke with $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 view 123 --json files --jq '.files[].path')

# Run swarm review
REVIEW_RESULTS=$(npx ruv-swarm github pr-review 123 \
  --agents "security,performance,style" \
  --files "$PR_FILES")

# Post review comments using gh CLI
echo "$REVIEW_RESULTS" | jq -r '.comments[]' | while read -r comment; do
  FILE=$(echo "$comment" | jq -r '.file')
  LINE=$(echo "$comment" | jq -r '.line')
  BODY=$(echo "$comment" | jq -r '.body')
  
  gh pr review 123 --comment --body "$BODY"
done

Advanced Features

1. Multi-PR Swarm Coordination
bash
# Coordinate swarms across related PRs
npx ruv-swarm github multi-pr \
  --prs "123,124,125" \
  --strategy "parallel" \
  --share-memory
2. PR Dependency Analysis
bash
# Analyze PR dependencies
npx ruv-swarm github pr-deps 123 \
  --spawn-agents \
  --resolve-conflicts
3. Automated PR Fixes
bash
# Auto-fix PR issues
npx ruv-swarm github pr-fix 123 \
  --issues "lint,test-failures" \
  --commit-fixes

Best Practices

1. PR Templates
markdown
<!-- .github$pull_request_template.md -->
## Swarm Configuration
- Topology: [mesh$hierarchical$ring$star]
- Max Agents: [number]
- Auto-spawn: [yes$no]
- Priority: [high$medium$low]

## Tasks for Swarm
- [ ] Task 1 description
- [ ] Task 2 description
2. Status Checks
yaml
# Require swarm completion before merge
required_status_checks:
  contexts:
    - "swarm$tasks-complete"
    - "swarm$tests-pass"
    - "swarm$review-approved"
3. PR Merge Automation
bash
# Auto-merge when swarm completes using gh CLI
# Check swarm completion status
SWARM_STATUS=$(npx ruv-swarm github pr-status 123)

if [[ "$SWARM_STATUS" == "complete" ]]; then
  # Check review requirements
  REVIEWS=$(gh pr view 123 --json reviews --jq '.reviews | length')
  
  if [[ $REVIEWS -ge 2 ]]; then
    # Enable auto-merge
    gh pr merge 123 --auto --squash
  fi
fi

Webhook Integration

Setup Webhook Handler
javascript
// webhook-handler.js
const { createServer } = require('http');
const { execSync } = require('child_process');

createServer((req, res) => {
  if (req.url === '$github-webhook') {
    const event = JSON.parse(body);
    
    if (event.action === 'opened' && event.pull_request) {
      execSync(`npx ruv-swarm github pr-init ${event.pull_request.number}`);
    }
    
    res.writeHead(200);
    res.end('OK');
  }
}).listen(3000);

Examples

Feature Development PR
bash
# PR #456: Add user authentication
npx ruv-swarm github pr-init 456 \
  --topology hierarchical \
  --agents "architect,coder,tester,security" \
  --auto-assign-tasks
Bug Fix PR
bash
# PR #789: Fix memory leak
npx ruv-swarm github pr-init 789 \
  --topology mesh \
  --agents "debugger,analyst,tester" \
  --priority high
Documentation PR
bash
# PR #321: Update API docs
npx ruv-swarm github pr-init 321 \
  --topology ring \
  --agents "researcher,writer,reviewer" \
  --validate-links

Metrics & Reporting

PR Swarm Analytics
bash
# Generate PR swarm report
npx ruv-swarm github pr-report 123 \
  --metrics "completion-time,agent-efficiency,token-usage" \
  --format markdown
Dashboard Integration
bash
# Export to GitHub Insights
npx ruv-swarm github export-metrics \
  --pr 123 \
  --to-insights

Security Considerations

  1. Token Permissions: Ensure GitHub tokens have appropriate scopes
  2. Command Validation: Validate all PR comments before execution
  3. Rate Limiting: Implement rate limits for PR operations
  4. Audit Trail: Log all swarm operations for compliance

Integration with Claude Code

When using with Claude Code:

  1. Claude Code reads PR diff and context
  2. Swarm coordinates approach based on PR type
  3. Agents work in parallel on different aspects
  4. Progress updates posted to PR automatically
  5. Final review performed before marking ready

Advanced Swarm PR Coordination

Multi-Agent PR Analysis
bash
# Initialize PR-specific swarm with intelligent topology selection
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 8 }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "PR Coordinator" }
mcp__claude-flow__agent_spawn { type: "reviewer", name: "Code Reviewer" }
mcp__claude-flow__agent_spawn { type: "tester", name: "Test Engineer" }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Impact Analyzer" }
mcp__claude-flow__agent_spawn { type: "optimizer", name: "Performance Optimizer" }

# Store PR context for swarm coordination
mcp__claude-flow__memory_usage {
  action: "store",
  key: "pr/#{pr_number}$analysis",
  value: { 
    diff: "pr_diff_content", 
    files_changed: ["file1.js", "file2.py"],
    complexity_score: 8.5,
    risk_assessment: "medium"
  }
}

# Orchestrate comprehensive PR workflow
mcp__claude-flow__task_orchestrate {
  task: "Execute multi-agent PR review and validation workflow",
  strategy: "parallel",
  priority: "high",
  dependencies: ["diff_analysis", "test_validation", "security_review"]
}
Swarm-Coordinated PR Lifecycle
javascript
// Pre-hook: PR Initialization and Swarm Setup
const prPreHook = async (prData) => {
  // Analyze PR complexity for optimal swarm configuration
  const complexity = await analyzePRComplexity(prData);
  const topology = complexity > 7 ? "hierarchical" : "mesh";
  
  // Initialize swarm with PR-specific configuration
  await mcp__claude_flow__swarm_init({ topology, maxAgents: 8 });
  
  // Store comprehensive PR context
  await mcp__claude_flow__memory_usage({
    action: "store",
    key: `pr/${prData.number}$context`,
    value: {
      pr: prData,
      complexity,
      agents_assigned: await getOptimalAgents(prData),
      timeline: generateTimeline(prData)
    }
  });
  
  // Coordinate initial agent synchronization
  await mcp__claude_flow__coordination_sync({ swarmId: "current" });
};

// Post-hook: PR Completion and Metrics
const prPostHook = async (results) => {
  // Generate comprehensive PR completion report
  const report = await generatePRReport(results);
  
  // Update PR with final swarm analysis
  await updatePRWithResults(report);
  
  // Store completion metrics for future optimization
  await mcp__claude_flow__memory_usage({
    action: "store",
    key: `pr/${results.number}$completion`,
    value: {
      completion_time: results.duration,
      agent_efficiency: results.agentMetrics,
      quality_score: results.qualityAssessment,
      lessons_learned: results.insights
    }
  });
};
Intelligent PR Merge Coordination
bash
# Coordinate merge decision with swarm consensus
mcp__claude-flow__coordination_sync { swarmId: "pr-review-swarm" }

# Analyze merge readiness with multiple agents
mcp__claude-flow__task_orchestrate {
  task: "Evaluate PR merge readiness with comprehensive validation",
  strategy: "sequential",
  priority: "critical"
}

# Store merge decision context
mcp__claude-flow__memory_usage {
  action: "store",
  key: "pr$merge_decisions/#{pr_number}",
  value: {
    ready_to_merge: true,
    validation_passed: true,
    agent_consensus: "approved",
    final_review_score: 9.2
  }
}

See also: swarm-issue.md, sync-coordinator.md, workflow-automation.md

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/agent-swarm-pr of ruvnet/ruflo.

Open the folder on GitHubat commit 58e0ae7

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in ruvnet/ruflo, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Agent Swarm PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Swarm PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Swarm PR this skillruvnet/ruflo74k2 repos~2.8kAutomated safety check: PassMIT
Review This Branchno-human-ai/no_human332—~1.4kAutomated safety check: PassMIT
Project Pull Requestswimmwatch/cloakbrowser-mcp164—~1kAutomated safety check: PassMIT
GitHub Commentingjuspay/neurolink144—~698Automated safety check: PassMIT
Branch Standup Facilitatorthedotmack/claude-mem99k—~1.7kAutomated safety check: NotesApache-2.0
GitHub Swarm Code Reviewruvnet/agentic-flow8196 repos~6.5kAutomated safety check: PassNone

Similar skills

  • Review This Branch

    no-human-ai/no_human

    Run the nohuman review gate (fresh-session adversarial reviewer + tamper guard) over the current branch or a GitHub pull request, with no server, no database, and no onboarding, and relay the…

    332 GitHub stars~1.4k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Project Pull Request

    swimmwatch/cloakbrowser-mcp

    Create, update, prepare, or review a cloakbrowser-mcp GitHub Pull Request only when the user explicitly requests PR work.

    164 GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed
  • GitHub Commenting

    juspay/neurolink

    How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules.

    144 GitHub stars~698 tokensUpdated today
    DevelopmentAuto-check passed
  • Branch Standup Facilitator

    thedotmack/claude-mem

    Facilitates a read-only standup between git worktrees, branches or PRs, where each acts as an agent in a shared markdown chat to agree one consolidation plan.

    99k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check: notes
  • GitHub Swarm Code Review

    ruvnet/agentic-flow

    Reviews GitHub pull requests with a swarm of specialized agents covering security, performance, architecture, style and accessibility, driven by the gh CLI and ruv-swarm.

    819 GitHub starsUsed in 6 repos~6.5k tokens
    DevelopmentAuto-check passed
  • Context Mode Ops

    mksglu/context-mode

    Runs maintenance for the context-mode project with parallel subagents: issue triage, PR review, releases, bug fixes, announcements and branch syncing.

    26k GitHub stars~6k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from ruvnet/ruflo

All 264 skills in this repo
  • Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

    74k GitHub starsUsed in 2 repos~830 tokens
    Auto-check passed
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed

Questions about Agent Swarm PR

What does Agent Swarm PR do?

Agent skill for swarm-pr - invoke with $agent-swarm-pr. An agent skill from ruvnet/ruflo. Agent Swarm PR is an agent skill from ruvnet/ruflo.

When should I use Agent Swarm PR?

Agent Swarm PR fits situations like: tasks that involve Multi-agent orchestration; tasks that involve Pull requests.

How do I install Agent Swarm PR in Claude Code?

Run `npx skills add ruvnet/ruflo --skill agent-swarm-pr -a claude-code`. Or copy the skill folder (.agents/skills/agent-swarm-pr in ruvnet/ruflo) into .claude/skills/agent-swarm-pr in your project. Claude Code loads it when a task matches its description.

How do I install Agent Swarm PR in Codex?

Run `npx skills add ruvnet/ruflo --skill agent-swarm-pr -a codex`. Or copy the skill folder (.agents/skills/agent-swarm-pr in ruvnet/ruflo) into .agents/skills/agent-swarm-pr in your project. Codex loads it when a task matches its description.

Can I use Agent Swarm PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill agent-swarm-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-swarm-pr, .gemini/skills/agent-swarm-pr, .github/skills/agent-swarm-pr and .opencode/skills/agent-swarm-pr in your project.

What does Agent Swarm PR need to run?

Going by SKILL.md and its folder, Agent Swarm PR needs the command-line tools its instructions call (npx, gh and jq). Our summary lists: Node.js.

Does Agent Swarm PR access the network?

SKILL.md contains no URLs. Its commands use npx and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Swarm PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Swarm PR use?

Agent Swarm PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Swarm PR use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Swarm PR?

Skills that share tags, products or a category with Agent Swarm PR: Review This Branch (no-human-ai/no_human, 332 stars), Project Pull Request (swimmwatch/cloakbrowser-mcp, 164 stars), GitHub Commenting (juspay/neurolink, 144 stars) and Branch Standup Facilitator (thedotmack/claude-mem, 99k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Swarm PR?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,159 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 9, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.