swarm-pr — Claude Code subagent: what it does, how to install
swarm-pr coordinates agents working on a GitHub pull request, from diff analysis and review to reporting results back to the PR.
no license ★ 850 updated 2026-10-26
.claude/agents/swarm-pr.mdWhat swarm-pr does
The subagent uses pull request context, including the diff, to divide review and validation work among agents. It can gather their results and update the PR; its available GitHub tools cover reading and editing pull requests, posting comments, and merging.
Agent types can be assigned from PR labels. A bug label maps to debugger and tester, while docs maps to researcher and writer. swarm-pr also has tools for task coordination and swarm memory. GitHub operations depend on the mcp__github__* tools being available; without them, it cannot act on PRs.
What it helps with
- inspect a pull request diff and assess its impact
- split a PR review across specialized agents
- assign agents based on pull request labels
- post review findings to a pull request
- coordinate work across related pull requests
Example prompts for the agent
- Review this pull request diff with multiple agents and organize the checks.
- Choose agents for this PR from its labels and divide the work.
- Post the review findings to the pull request and prepare a merge decision.
How to install swarm-pr
Manually: put the files in place
.claude/agents/swarm-pr.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/swarm-pr.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/swarm-pr.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about swarm-pr
How do I install swarm-pr in Claude Code?
Add the subagent file to your project at .claude/agents/swarm-pr.md.
What does swarm-pr do?
It coordinates agents reviewing a pull request, divides tasks, and can publish the analysis results back to the PR.
How does swarm-pr assign agents to a pull request?
It can map PR labels to agent types. For instance, bug maps to debugger and tester, while docs maps to researcher and writer.