pr-review-local

pr-review-local is a command for Codex from morpho-org/sdks. It costs 0 tokens per session (7,856 once invoked), scanned A, original, MIT.

A local pre-pull-request code-review command that compares the current branch with a base branch and prints findings in the terminal.

In plain words
What is it for?
Use it to review a branch, choose a base branch, apply one round of fixes, or run an iterative review-and-fix loop.
Why use it?
It helps find problems before opening a pull request and can optionally apply fixes or repeat review and fixes until the review is clean.

Command for Codex

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.

agentmods
npx agentmods add commands/morpho-org/sdks/pr-review-local
Clone the repo
git clone --depth 1 https://github.com/morpho-org/sdks

Made for: Codex.

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-review-local

README.md
[![agentmods](https://agentmods.dev/badge/commands/morpho-org/sdks/pr-review-local.svg)](https://agentmods.dev/commands/morpho-org/sdks/pr-review-local)
Your own site
<a href="https://agentmods.dev/commands/morpho-org/sdks/pr-review-local"><img src="https://agentmods.dev/badge/commands/morpho-org/sdks/pr-review-local.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.07856
Opus 5 $0.00000 $0.03928
Sonnet 5 $0.00000 $0.01571
Haiku 4.5 $0.00000 $0.00786

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

Security

Grade A, and why

pr-review-local 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 4d 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.

.agents/commands/pr-review-local.md · 424 lines

How it starts

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

pr-review-local

Pre-PR local code review. Output to terminal only — no GitHub interaction. Optionally apply fixes once with --fix, or loop review→fix→re-review with --goal until the review passes cleanly.

Usage

/pr-review-local                       # review current branch vs default base
/pr-review-local <BASE_BRANCH>         # review against an explicit base branch
/pr-review-local --fix                 # review and apply fixes once (unstaged; refuses on dirty tree)
/pr-review-local --goal                # loop review->fix->re-review, commit each iteration, until clean
/pr-review-local --goal --max-iters 8  # raise the loop ceiling (default 5)
/pr-review-local --fast                # skip the documentation agent (cheapest meaningful cut)
/pr-review-local <BASE_BRANCH> --fix   # flags combine freely

<BASE_BRANCH> is positional and must NOT begin with --. Flag order is otherwise free.

--fast excludes the documentation agent via the engine's <EXCLUDE_AGENTS> input — the most expensive lens per launch and the most likely to return clean on code-focused diffs. Use the default (full panel) when the diff touches Markdown, the §10 inventory, or public-API docs.

--goal is the autonomous loop: it reviews, fixes critical/high/medium findings, re-gates (format → lint → typecheck → test, scoped to the changed surface — see Goal mode), commits, and re-reviews until no actionable findings remain. It commits each iteration and therefore refuses on a dirty tree. --goal supersedes --fix (loop-and-commit beats single-shot-unstaged); if both are passed, --goal wins. There is no post-convergence runtime check / --no-runtime here — this is a headless SDK with no route-reachable UI, so no dev server is ever booted.

Validating end-to-end

A maintainer changing this skill should verify each outcome shape:

Scenario Expected last line
Clean branch, no findings Sentinel: REVIEW_CLEAN — no issues found in <HEAD_BRANCH> vs <BASE_BRANCH>.
Findings present Sentinel: REVIEW_DONE_LOCAL — <N> findings (X critical, Y high, Z medium, W low) on <HEAD_BRANCH> vs <BASE_BRANCH>.
Findings + agent crash Sentinel: REVIEW_DONE_LOCAL — <N> findings (X critical, Y high, Z medium, W low) on <HEAD_BRANCH> vs <BASE_BRANCH>. (with a WARNING: <FAILED_AGENTS> of <TOTAL_AGENTS_LAUNCHED> agents failed (<names>) — review may be incomplete. line prepended to the findings output)
Zero findings + agent crash Sentinel: REVIEW_INCOMPLETE — <FAILED_AGENTS> of <TOTAL_AGENTS_LAUNCHED> agents failed (<names>); no findings does NOT mean clean.
--fix happy path Sentinel: FIX_DONE_LOCAL — <X> applied, <Y> skipped (Local-only, unstaged). plus git diff shows the unstaged edits.
--fix aborted on dirty tree Sentinel: FIX_ABORTED — working tree is not clean. Commit or stash before --fix.
--goal converges Sentinel: GOAL_CLEAN — review passes cleanly after <i> iteration(s) on <HEAD_BRANCH> vs <BASE_BRANCH>; <K> low finding(s) triaged (not auto-fixed). plus one fix(review): iteration N commit per fixing pass.
--goal on already-clean branch Sentinel: GOAL_CLEAN — ... after 1 iteration(s) ... (idempotent: no commits made).
--goal aborted on dirty tree Sentinel: GOAL_ABORTED — working tree is not clean; commit or stash before --goal.
--goal aborted on detached HEAD Sentinel: GOAL_ABORTED — detached HEAD; check out a branch before --goal.
--goal aborted on red base gate Sentinel: GOAL_ABORTED — base gate is red (<TEST_CMD> fails before any fix); fix it or run without --goal.
--goal same findings twice Sentinel: GOAL_STUCK — identical findings on iteration <i> and <i-1>; stopping for user input.
--goal hits the ceiling Sentinel: GOAL_MAXED — <N> actionable finding(s) remain after <MAX_ITERS> iteration(s); extend, accept, or stop?
Re-run, input unchanged (cache hit) cached findings reprinted under a (cached — input unchanged since <head_sha>) header + a reuse/re-review prompt; on reuse, the matching REVIEW_* sentinel from the cached counts (Step 2c — single-shot only)

Read the full file on GitHub · 424 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. 4d ago First seen · 424 lines · 0 tokens per session scan A ca963efa39f0

Subscribe to this mod's changes

pr-review-local is a command published in the GitHub repository morpho-org/sdks (40 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,856 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-09-01.