grepai: Command for Claude Code

.claude/commands/review-pr.md

review-pr is a command for Claude Code from yoanbernabeu/grepai. It costs 0 tokens per session (632 once invoked), scanned A, original, MIT.

A Pull Request review assistant for GitHub, where a Pull Request is a proposed code change awaiting review. It retrieves the request, checks its automated tests, examines the diff, and classifies the change.

In plain words
What is it for?
Use it to review an existing Pull Request, inspect its CI checks and code diff, assess quality and risks, and label it as a feature, fix, documentation, maintenance, refactor, or test change.
Why use it?
It gathers the review information and code changes in one workflow, making it easier to spot failed checks, bugs, security concerns, and convention or testing issues.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

This is yoanbernabeu/grepai's own configuration. It tells Claude Code how to work on grepai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything grepai configures →

About the project

grepai is a local command-line tool that searches source code by meaning and traces function call graphs, rather than matching only exact words. Developers and coding agents use it to find relevant code, understand relationships between functions, and provide focused context for changes while keeping the code on the local machine. The catalogue entries expose its commands, skills, agent, and instruction for coding-agent workflows.

yoanbernabeu/grepai · 1,838 stars · on GitHub · yoanbernabeu.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to yoanbernabeu/grepai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yoanbernabeu/grepai/main/.claude/commands/review-pr.md
Clone the repo
git clone --depth 1 https://github.com/yoanbernabeu/grepai

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/yoanbernabeu/grepai/review-pr.svg)](https://agentmods.dev/commands/yoanbernabeu/grepai/review-pr)
Your own site
<a href="https://agentmods.dev/commands/yoanbernabeu/grepai/review-pr"><img src="https://agentmods.dev/badge/commands/yoanbernabeu/grepai/review-pr.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 632 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.1 $0.00000 $0.00632
Opus 5 $0.00000 $0.00316
Sonnet 5 $0.00000 $0.00126
Haiku 4.5 $0.00000 $0.00063

Measured 6d ago against content hash 75a51dc7731c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

review-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 6d 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.

.claude/commands/review-pr.md · 70 lines

How it starts

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

Review PR Command

You are a Pull Request review assistant. Follow these steps in order:

Step 1: Retrieve PR Information

Use gh pr view $ARGUMENTS --json number,title,body,state,author,headRefName,baseRefName,additions,deletions,changedFiles,labels to get PR details.

If no argument is provided, list open PRs with gh pr list and ask the user which one to review.

Step 2: Check CI Status

Use gh pr checks $ARGUMENTS to verify all GitHub Actions checks pass.

  • If any checks fail, display the details and ask the user if they want to continue anyway
  • If all checks pass, continue

Step 3: Analyze the Code

  1. Get the diff with gh pr diff $ARGUMENTS
  2. Analyze the modified code:
    • Code quality
    • Adherence to project conventions
    • Potential bugs or security issues
    • Tests added/modified if relevant
  3. Provide a summary of your analysis with observations

Step 4: Determine Change Type

Analyze the PR title and modified files to determine the type:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • chore: Maintenance
  • refactor: Refactoring
  • test: Tests only

Step 5: Request Custom Message

Use the AskUserQuestion tool to ask the user:

  • If they want to add a custom comment on the PR before merging
  • If yes, what message to add

If the user provides a message, add it as a comment on the PR with gh pr comment $ARGUMENTS --body "MESSAGE".

Step 6: Merge the PR

  1. Ask for user confirmation before merging
  2. Merge with gh pr merge $ARGUMENTS --squash --delete-branch
  3. Update local branch with git checkout main && git pull origin main

Step 7: Create a Release (if applicable)

If the change type is feat or fix (not docs, chore, test):

  1. Get the latest version with gh release list --limit 1
  2. Parse the current version number (semver format vX.Y.Z)
  3. Ask the user with AskUserQuestion:
    • For feat: propose a Minor version (vX.Y+1.0) or ask if it's a Major (vX+1.0.0)
    • For fix: propose a Patch version (vX.Y.Z+1)
  4. Generate release notes based on commits since the last release
  5. Create the release with gh release create vX.Y.Z --generate-notes --title "vX.Y.Z"

Read the full file on GitHub · 70 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. 6d ago First seen · 70 lines · 0 tokens per session scan A 75a51dc7731c

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository yoanbernabeu/grepai (1,838 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 632 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.