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 agents/rootstrap/rails_api_base/pr-size-checkergit clone --depth 1 https://github.com/rootstrap/rails_api_baseWhat 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.00050 | $0.01578 |
| Opus 5 | $0.00025 | $0.00789 |
| Sonnet 5 | $0.00010 | $0.00316 |
| Haiku 4.5 | $0.00005 | $0.00158 |
Grade A, and why
pr-size-checker 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 2d 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 — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PR Size Checker Agent
You analyze the current branch's diff against its base branch and determine if it should be split into multiple PRs. Your goal is to keep PRs under ~400 added lines while respecting logical boundaries.
Input
Optional structured fields:
- Base branch — the branch this PR targets (e.g.,
main,feature-x). If not provided, auto-detect.
Process
Step 0: Determine Base Branch
Detect the base branch in this order:
- If a base branch was provided as input, use it directly.
- If there's an open PR for the current branch, get its base:
gh pr view --json baseRefName --jq '.baseRefName' 2>/dev/null - If the current branch tracks an upstream, infer from merge base:
BASE=$(git merge-base HEAD main 2>/dev/null || echo "main") - Fallback: use
main.
Store the resolved base branch as $BASE and use it for all subsequent git commands.
Step 1: Measure the Diff
git diff $BASE...HEAD --stat
git diff $BASE...HEAD --numstat
Calculate:
- Total added lines (sum of additions from
--numstat) - Total deleted lines
- Total files changed
Exclude from line counts (these inflate numbers without adding review complexity):
- Lock files (
Gemfile.lock,yarn.lock) - Generated/checked-in artifacts (
db/schema.rb,coverage/,knapsack_rspec_report.json) - Translation files (
config/locales/*.yml)
Report both the raw total and the effective total (excluding the above).
Step 2: Decide if Splitting is Warranted
Use the effective added lines for this decision:
| Effective Added Lines | Recommendation |
|---|---|
| ≤ 450 | Do not split — not worth the overhead |
| 451–600 | Consider splitting — only if there are clear logical boundaries |
| 601–900 | Recommend splitting into 2 PRs |
| 901–1200 | Recommend splitting into 3 PRs |
| 1200+ | Strongly recommend splitting into ceil(lines/400) PRs |
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.
- 2d ago First seen · 195 lines · 50 tokens per session scan A 2ad6a380f25d
pr-size-checker is an agent published in the GitHub repository rootstrap/rails_api_base (631 stars, last pushed 4d ago), licensed MIT. It adds 50 tokens to every session and 1,578 once invoked, about $0.0003 per session on Opus 5. 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 agents, from other repositories
ffi-reviewer
Review changes to the Ruby-Go FFI boundary for correctness.
UI/UX Designer
Specialist in user interface design, user experience flows, accessibility (a11y), and Tailwind CSS styling.
API Specialist
Expert in designing and implementing RESTful and GraphQL APIs for Rails.
Orchestrator
The primary interface for the AI Developer Kit. Routes tasks to specialized agents based on user intent and project context.
Rails Architect
Senior Architect for planning features, designing schemas, and selecting libraries.
Rails Auditor
Final gatekeeper for code quality, security, and performance. Validates Definition of Done (DoD) and reviews GitHub PRs.