pr-ready

pr-ready is a command for Claude Code from costajohnt/oss-autopilot. It costs 45 tokens per session (1,538 once invoked), scanned A, original, MIT.

A command that reviews the current Git branch before it is pushed, using checks such as linting, tests, code reviews, and an over-engineering audit.

In plain words
What is it for?
Checking branch hygiene, detecting upstream changes that overlap the diff, running review tools, fixing findings, and repeating the checks until they converge.
Why use it?
It helps find problems and changes from the main branch before declaring the branch ready, without pushing code or opening a pull request.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Part of the oss-autopilot plugin — 3 skills, 9 commands, 8 agents, 2 MCP servers shipped together

Good fit Checking branch hygiene, detecting upstream changes that overlap the diff, running review tools, fixing findings, and repeating the checks until they converge.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/costajohnt/oss-autopilot/pr-ready
Install

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.

Clone the repo
git clone --depth 1 https://github.com/costajohnt/oss-autopilot

Made for: Claude Code.

Or install oss-autopilot, the plugin that ships this one along with the rest of its 3 skills, 9 commands, 8 agents, 2 MCP servers.

Wrote 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.

agentmods badge for pr-ready

README.md
[![agentmods](https://agentmods.dev/badge/commands/costajohnt/oss-autopilot/pr-ready.svg)](https://agentmods.dev/commands/costajohnt/oss-autopilot/pr-ready)
Your own site
<a href="https://agentmods.dev/commands/costajohnt/oss-autopilot/pr-ready"><img src="https://agentmods.dev/badge/commands/costajohnt/oss-autopilot/pr-ready.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,538 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01538
Opus 5 $0.00023 $0.00769
Sonnet 5 $0.00009 $0.00308
Haiku 4.5 $0.00005 $0.00154

Measured 8d ago against content hash e3ae930819c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pr-ready 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 8d 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.

commands/pr-ready.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/pr-ready

This command drives the mandatory pre-commit review loop that the project's CLAUDE.md describes. It does not push or open a PR — it tells you whether the branch is ready to.

What it does

For the diff currently uncommitted-and-staged or already on the local branch (whichever applies):

  1. Verify branch hygiene — confirm we're not on main, the working tree has work to evaluate, and main has been pulled recently. If the working tree is clean and the branch matches main, abort with "nothing to review".

    Upstream drift check (mandatory). Re-fetch the upstream default branch and detect any commits since this branch diverged that touch files in this branch's diff:

    git fetch <remote> <default> 2>/dev/null
    mergeBase=$(git merge-base <remote>/<default> HEAD)
    touchedFiles=$(git diff --name-only "$mergeBase" HEAD)
    overlappingCommits=$(git log "$mergeBase..<remote>/<default>" --oneline -- $touchedFiles)
    

    If $overlappingCommits is non-empty, surface the list and recommend re-vetting the issue before declaring READY. The same fix may have already merged; the CONTRIBUTING-style "no other open PRs" check passes vacuously when the duplicate has merged, so this drift check is the only safety net. Report as a Critical finding if any overlapping commits are found and the user hasn't acknowledged them.

  2. Run the project's lint+format checks:

    • pnpm run lint
    • pnpm run format:check (if the project's package.json defines it)
    • Surface any failures inline; do not auto-fix unless the user explicitly asks.
  3. Run the full test suite: pnpm test. Block readiness on any failure.

  4. Dispatch the pr-review-toolkit agents in parallel against the diff:

    • pr-review-toolkit:code-reviewer — bugs, dead code, consistency
    • pr-review-toolkit:silent-failure-hunter — error handling gaps
    • pr-review-toolkit:code-simplifier — refactoring opportunities

    For larger PRs (>15 files or new test surface), additionally run:

    • pr-review-toolkit:pr-test-analyzer — coverage gaps
    • pr-review-toolkit:comment-analyzer — outdated/over-explanatory comments
    • pr-review-toolkit:type-design-analyzer — when new types are introduced

Read the full file on GitHub · 106 lines

Changes

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.

  1. 8d ago First seen · 106 lines · 45 tokens per session scan A e3ae930819c6

Subscribe to this mod's changes

pr-ready is a command published in the GitHub repository costajohnt/oss-autopilot (12 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 1,538 once invoked, about $0.0002 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.