code-review

An automated pull-request review process that examines a proposed code change before it is merged. A pull request is a request to add one set of code changes to a shared codebase.

In plain words
What is it for?
Use it to review a specified pull request. It examines the changed files, relevant GEMINI.md instructions, the change summary, and the implementation itself.
Why use it?
It filters out reviews that are unnecessary, then checks the change against repository guidance and several independent code-review perspectives. This helps surface bugs, policy violations, and other issues before merging.

Command

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/ronmkr/promptbook/code-review
Clone the repo
git clone --depth 1 https://github.com/ronmkr/PromptBook
Per session 5 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,777 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod 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.00005 $0.01777
Opus 5 $0.00003 $0.00889
Sonnet 5 $0.00001 $0.00355
Haiku 4.5 $0.00001 $0.00178

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

Security

Grade A, and why

code-review 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.

Origin

This is a copy

89% identical to code-review — 32 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/standard/code-review/commands/code-review.md · 93 lines

How it starts

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

Provide a code review for the given pull request.

To do this, follow these steps precisely:

  1. Use a Haiku agent to check if the pull request (a) is closed, (b) is a draft, (c) does not need a code review (eg. because it is an automated pull request, or is very simple and obviously ok), or (d) already has a code review from you from earlier. If so, do not proceed.
  2. Use another Haiku agent to give you a list of file paths to (but not the contents of) any relevant GEMINI.md files from the codebase: the root GEMINI.md file (if one exists), as well as any GEMINI.md files in the directories whose files the pull request modified
  3. Use a Haiku agent to view the pull request, and ask the agent to return a summary of the change
  4. Then, launch 5 parallel Sonnet agents to independently code review the change. The agents should do the following, then return a list of issues and the reason each issue was flagged (eg. GEMINI.md adherence, bug, historical git context, etc.): a. Agent #1: Audit the changes to make sure they compily with the GEMINI.md. Note that GEMINI.md is guidance for Gemini as it writes code, so not all instructions will be applicable during code review. b. Agent #2: Read the file changes in the pull request, then do a shallow scan for obvious bugs. Avoid reading extra context beyond the changes, focusing just on the changes themselves. Focus on large bugs, and avoid small issues and nitpicks. Ignore likely false positives. c. Agent #3: Read the git blame and history of the code modified, to identify any bugs in light of that historical context d. Agent #4: Read previous pull requests that touched these files, and check for any comments on those pull requests that may also apply to the current pull request. e. Agent #5: Read code comments in the modified files, and make sure the changes in the pull request comply with any guidance in the comments.
  5. For each issue found in #4, launch a parallel Haiku agent that takes the PR, issue description, and list of GEMINI.md files (from step 2), and returns a score to indicate the agent's level of confidence for whether the issue is real or false positive. To do that, the agent should score each issue on a scale from 0-100, indicating its level of confidence. For issues that were flagged due to GEMINI.md instructions, the agent should double check that the GEMINI.md actually calls out that issue specifically. The scale is (give this rubric to the agent verbatim): a. 0: Not confident at all. This is a false positive that doesn't stand up to light scrutiny, or is a pre-existing issue. b. 25: Somewhat confident. This might be a real issue, but may also be a false positive. The agent wasn't able to verify that it's a real issue. If the issue is stylistic, it is one that was not explicitly called out in the relevant GEMINI.md. c. 50: Moderately confident. The agent was able to verify this is a real issue, but it might be a nitpick or not happen very often in practice. Relative to the rest of the PR, it's not very important. d. 75: Highly confident. The agent double checked the issue, and verified that it is very likely it is a real issue that will be hit in practice. The existing approach in the PR is insufficient. The issue is very important and will directly impact the code's functionality, or it is an issue that is directly mentioned in the relevant GEMINI.md. e. 100: Absolutely certain. The agent double checked the issue, and confirmed that it is definitely a real issue, that will happen frequently in practice. The evidence directly confirms this.
  6. Filter out any issues with a score less than 80. If there are no issues that meet this criteria, do not proceed.
  7. Use a Haiku agent to repeat the eligibility check from #1, to make sure that the pull request is still eligible for code review.
  8. Finally, use the gh bash command to comment back on the pull request with the result. When writing your comment, keep in mind to: a. Keep your output brief b. Avoid emojis c. Link and cite relevant code, files, and URLs

Read the full file on GitHub · 93 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. 2d ago First seen · 93 lines · 5 tokens per session scan A f21472136bcc

Subscribe to this mod's changes

code-review is a command published in the GitHub repository ronmkr/PromptBook (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 5 tokens to every session and 1,777 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to code-review, differing in 32 lines, and is treated as a copy.