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.
npx agentmods add commands/cairn-framework/cairn/auto-prgit clone --depth 1 https://github.com/cairn-framework/cairnWhat 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 | $0.00000 | $0.00759 |
| Opus 5 | $0.00000 | $0.00380 |
| Sonnet 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 3d 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.
- 3d 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 (40 stars, last pushed 3d ago), 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.