swarm-pr

swarm-pr is a command for Claude Code from Soulcynics404/AgentForge. It costs 0 tokens per session (1,850 once invoked), scanned A, a copy of swarm-pr, MIT.

A command set that creates and manages coordinated AI workers from GitHub pull requests.

In plain words
What is it for?
Use it to create a swarm from pull-request details, start agents based on labels, and run tasks such as coding, testing, and status checks.
Why use it?
It lets development work start from the context already recorded in a pull request and supports commands through pull-request comments.

Command for Claude Code

Part of the claude-flow plugin — 134 skills, 52 commands, 11 agents, 4 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/soulcynics404/agentforge/swarm-pr
Clone the repo
git clone --depth 1 https://github.com/Soulcynics404/AgentForge

Made for: Claude Code.

Or install claude-flow, the plugin that ships this one along with the rest of its 134 skills, 52 commands, 11 agents, 4 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swarm-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/soulcynics404/agentforge/swarm-pr.svg)](https://agentmods.dev/commands/soulcynics404/agentforge/swarm-pr)
Your own site
<a href="https://agentmods.dev/commands/soulcynics404/agentforge/swarm-pr"><img src="https://agentmods.dev/badge/commands/soulcynics404/agentforge/swarm-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,850 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01850
Opus 5 $0.00000 $0.00925
Sonnet 5 $0.00000 $0.00370
Haiku 4.5 $0.00000 $0.00185

Measured yesterday against content hash 403feac4519f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

swarm-pr scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { execSync } = require('child_process');
Origin

This is a copy

100% identical to swarm-pr — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/github/swarm-pr.md · 285 lines

How it starts

The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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@v4
      - 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

Read the full file on GitHub · 285 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 285 lines · 0 tokens per session scan A 403feac4519f

Subscribe to this mod's changes

swarm-pr is a command published in the GitHub repository Soulcynics404/AgentForge (1 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,850 tokens. A static security scan graded it A with 1 finding (runs shell commands). It is 100% identical to swarm-pr, differing in 2 lines, and is treated as a copy.