Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/pr.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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.
[](https://agentmods.dev/commands/swarm-ai-research/swarm/pr)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/pr"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/pr.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01026 |
| Opus 5 | $0.00000 | $0.00513 |
| Sonnet 5 | $0.00000 | $0.00205 |
| Haiku 4.5 | $0.00000 | $0.00103 |
Grade A, and why
pr scanned grade A with 0 findings 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 7d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/pr
Create a feature branch, commit staged/unstaged changes, push, and open a GitHub PR against main — use when you have local changes not yet on any branch and want a reviewable PR. Distinct from /ship (commit + push to current branch, no PR) and /fix_pr (resolve conflicts or run quality gates on an existing PR).
Also handles branch lifecycle cleanup via --cleanup.
Usage
/pr [branch-name] [commit message]
/pr --cleanup
Examples:
/pr(auto-generates branch name and commit message from changes)/pr fix/loader-crash/pr add/track-b-pipeline "Add Track B research pipeline"/pr --cleanup(delete all merged/stale remote branches)
Behavior
- Determine the starting point:
- Detect worktree context: run
git rev-parse --git-dirvsgit rev-parse --git-common-dir. If they differ and the current branch starts withsession/, you are in a session worktree. - Session worktree (
session/*branch): do NOTgit checkout main(it will fail because main is checked out in the main worktree). Instead:git fetch origin main. - Main worktree on
main:git pull origin mainas before. - Other branch: use it directly as the base for the feature branch.
- If there are no uncommitted changes and no untracked files, abort with a message.
- Create and switch to a feature branch:
- If
<branch-name>is provided, use it. - Otherwise, generate one from the change summary (e.g.
fix/pre-commit-scoped-lint). - Session worktree:
git checkout -b <branch-name> origin/main(branch from remote main without switching to it). - Main worktree:
git checkout -b <branch-name>(already on updated main).
- Stage changes:
- Run
git statusto identify modified and untracked files. - Stage all modified and untracked files, but exclude:
.DS_Store,*.db, files matching secret patterns (.env,credentials*). - Show the user what will be committed and confirm before proceeding.
- Commit:
- If
<commit message>is provided, use it. - Otherwise, analyze the diff and draft a concise commit message.
- Always append
Co-Authored-By: Claude Opus 4.6 <[email protected]>. - Use
SKIP_SWARM_HOOKS=1only if the hook itself is being modified (chicken-and-egg), otherwise let the hook run.
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.
- 7d ago First seen · 102 lines · 0 tokens per session scan A 1cc1629fd86d
pr is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,026 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
eval-merge
Use the Read tool to load .skill-compass/{skill-name}/manifest.json. Verify.
speckit.git.feature
Create a feature branch with sequential or timestamp numbering.
speckit.git.commit
Auto-commit changes after a Spec Kit command completes.
speckit.git.initialize
Initialize a Git repository with an initial commit.
speckit.git.remote
Detect Git remote URL for GitHub integration.
speckit.git.validate
Validate current branch follows feature branch naming conventions.