Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

agent-swarm-prAgent 群公关

Agent Skill

agent-swarm-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,227

周安装

171

GitHub Stars

34,122

下载量

1,327
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-swarm-pr(Agent 群公关)
来源仓库:https://github.com/ruvnet/ruflo
仓库路径:skills/agent-swarm-pr
安装命令:
npx skills add https://github.com/ruvnet/ruflo --skill agent-swarm-pr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ruvnet/ruflo --skill agent-swarm-pr

简介

用于协调多智能体代码审查、验证与集成工作流。

  • 适合自动化 PR 生命周期管理与协同测试。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 支持获取、创建、合并 PR 及 diff 查看与评论。
  • 涉及写入操作时需确认 token 权限与仓库访问范围。
  • agent-swarm-pr 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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:

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

# 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:

<!-- In PR comment -->
$swarm init mesh 6
$swarm spawn coder "Implement authentication"
$swarm spawn tester "Write unit tests"
$swarm status

3. Automated PR Workflows

# .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:

{
  "label-mapping": {
    "bug": ["debugger", "tester"],
    "feature": ["architect", "coder", "tester"],
    "refactor": ["analyst", "coder"],
    "docs": ["researcher", "writer"],
    "performance": ["analyst", "optimizer"]
  }
}

Label-Based Topology

# 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

# 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

# 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

# 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

# Coordinate swarms across related PRs
npx ruv-swarm github multi-pr \
  --prs "123,124,125" \
  --strategy "parallel" \
  --share-memory

2. PR Dependency Analysis

# Analyze PR dependencies
npx ruv-swarm github pr-deps 123 \
  --spawn-agents \
  --resolve-conflicts

3. Automated PR Fixes

# Auto-fix PR issues
npx ruv-swarm github pr-fix 123 \
  --issues "lint,test-failures" \
  --commit-fixes

Best Practices

1. PR Templates

<!-- .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

# Require swarm completion before merge
required_status_checks:
  contexts:
    - "swarm$tasks-complete"
    - "swarm$tests-pass"
    - "swarm$review-approved"

3. PR Merge Automation

# 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

// 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

# 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

# PR #789: Fix memory leak
npx ruv-swarm github pr-init 789 \
  --topology mesh \
  --agents "debugger,analyst,tester" \
  --priority high

Documentation PR

# 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

# Generate PR swarm report
npx ruv-swarm github pr-report 123 \
  --metrics "completion-time,agent-efficiency,token-usage" \
  --format markdown

Dashboard Integration

# 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

# 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

// 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

# 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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.17%
按下载量换算480

Claude

30.5%
按下载量换算405

Cursor

19.01%
按下载量换算252

Gemini CLI

8.33%
按下载量换算111

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/ruvnet/ruflo --skill agent-swarm-pr 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills