Borrowing it
Nothing to install: this file belongs to cairn-framework/cairn. 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/cairn-framework/cairn/main/.claude/commands/auto-pr.mdgit clone --depth 1 https://github.com/cairn-framework/cairnWrote 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/cairn-framework/cairn/auto-pr)<a href="https://agentmods.dev/commands/cairn-framework/cairn/auto-pr"><img src="https://agentmods.dev/badge/commands/cairn-framework/cairn/auto-pr/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/cairn-framework/cairn/auto-pr"><img src="https://agentmods.dev/badge/commands/cairn-framework/cairn/auto-pr.svg" alt="Reviewed on agentmods" width="80" 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.00759 |
| Opus 5.5 | $0.00000 | $0.00304 |
| Sonnet 5.5 | $0.00000 | $0.00152 |
| Haiku 4.5 | $0.00000 | $0.00076 |
Grade A, and why
auto-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 2mo 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/auto-pr — Review, fix, and merge an open PR
Review an open pull request, fix any quality gate failures, and merge when clean.
Usage
/auto-pr <pr-number>
Workflow
Phase 1: Assess
Run the assessment script to check out the PR and run all gates:
scripts/auto-pr.sh <pr-number>
This will:
- Check out the PR branch
- Run cargo fmt, clippy, test
- Run cairn lint and cairn hook all
- Run the dogfood gate
If all gates pass, the script will merge the PR automatically (squash + delete branch).
Phase 2: Review and Fix (if gates failed)
If any gate fails:
- Inspect failures: Read the gate output to understand what failed.
- Review the diff: Run
git diff <base-branch>..HEADto see the full change set. - Fix issues:
cargo fmtfailures → runcargo fmtcargo clippyfailures → fix the code; add#[allow(...)]with// Reason:comments only when justifiedcargo testfailures → fix the underlying code or testcairn lintfindings → fix blueprint/contract issuescairn hook allfindings → fix structural errors or update interface hashes withcairn scandogfoodfailures → usually cairn hook all or lint; fix the underlying issue
- Commit fixes:
git add -A && git commit -m "fix: <concise description>" - Push:
git push - Re-assess: Run
scripts/auto-pr.sh <pr-number> --fixto re-run gates (does not merge). - Loop: Repeat Phase 2 until all gates pass.
Phase 3: Merge
Once all gates pass, run:
scripts/auto-pr.sh <pr-number>
This will merge the PR with squash and delete the branch.
Safety rules (hard stops)
- Do NOT proceed if the PR modifies
.github/workflows/,Cargo.toml, orscripts/dogfood.sh. Escalate to the user. - Do NOT proceed if the PR has >30 files changed or >1000 total lines changed. Escalate to the user.
- Do NOT proceed if the PR is a draft or from a fork.
- Do NOT proceed if you cannot understand or fix a test failure. Escalate to the user.
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.
- 2mo ago First seen · 80 lines · 0 tokens per session scan A 3a881d9860b9
auto-pr is a command published in the GitHub repository cairn-framework/cairn (53 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 759 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.
auto-pr compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| auto-prcairn-framework/cairn | Command | 53 | yesterday | Apache-2.0 | A | 0 | Claude Code |
| speckit.spex.submitrhuss/cc-spex | Command | 122 | 3d ago | Apache-2.0 | A | 15 | Claude Code |
| merge-conflict-analysisrjmurillo/ai-agents | Command | 49 | yesterday | MIT | A | 0 | GitHub Copilot |
| gitazrtydxb/procoder | Command | 211 | 11d ago | Apache-2.0 | A | 20 | Claude Code |
| factoryfelvieira/claude-skills-fv | Command | 28 | 2d ago | Apache-2.0 | A | 47 | Claude Code |
| repo-audittractorjuice/arc-kit | Command | 2.3k | 2d ago | none | A | 29 | Claude Code |
| advanced-code-review-contextaxiomantic/spellbook | Command | 11 | 2d ago | MIT | A | 19 | Claude Code |