coderabbit-rules-from-pr-reviews

coderabbit-rules-from-pr-reviews is a command for Claude Code from wangke19/gemini-ai-helpers. It costs 12 tokens per session (3,544 once invoked), scanned C, original, Apache-2.0.

A repository command that reviews human comments on recent GitHub pull requests and suggests recurring feedback as CodeRabbit rules in the repository configuration.

In plain words
What is it for?
Use it to inspect merged pull requests, identify common review patterns, and optionally open a pull request that updates the CodeRabbit configuration and contributing guide.
Why use it?
It helps turn repeated reviewer advice into written checks, so reviewers do not have to repeat the same guidance on every pull request.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 extensions/teams/skills/coderabbit-rules-from-pr-reviews/fetch_pr_comments.py <owner/repo> --count <N>.

Good fit Use it to inspect merged pull requests, identify common review patterns, and optionally open a pull request that updates the CodeRabbit configuration and contributing guide.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/wangke19/gemini-ai-helpers
agentmods
npx agentmods add commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews

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 coderabbit-rules-from-pr-reviews

README.md
[![agentmods](https://agentmods.dev/badge/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews/github.svg)](https://agentmods.dev/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews)
Your own site
<a href="https://agentmods.dev/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews"><img src="https://agentmods.dev/badge/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coderabbit-rules-from-pr-reviews

Your own site · 80×15
<a href="https://agentmods.dev/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews"><img src="https://agentmods.dev/badge/commands/wangke19/gemini-ai-helpers/coderabbit-rules-from-pr-reviews.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,544 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00012 $0.03544
Opus 5 $0.00006 $0.01772
Sonnet 5 $0.00002 $0.00709
Haiku 4.5 $0.00001 $0.00354

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

Security

Grade C, and why

coderabbit-rules-from-pr-reviews scanned grade C with 1 finding 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 9d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "${WORKDIR}"
extensions/teams/commands/coderabbit-rules-from-pr-reviews.md · 321 lines

How it starts

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

Name

teams:coderabbit-rules-from-pr-reviews

Synopsis

/teams:coderabbit-rules-from-pr-reviews openshift/origin
/teams:coderabbit-rules-from-pr-reviews https://github.com/openshift/origin
/teams:coderabbit-rules-from-pr-reviews openshift/origin --count 50

Description

The teams:coderabbit-rules-from-pr-reviews command analyzes human review comments on recent merged PRs in a GitHub repository to identify recurring review feedback patterns that could be codified as CodeRabbit review rules in the repo's .coderabbit.yaml file.

The command fetches the most recent N merged PRs (default: 30), collects all human review comments (excluding comments from coderabbitai[bot] and other bots), and uses AI analysis to identify patterns that appear across multiple PRs. Only patterns that are likely to recur in future PRs are proposed as rules -- obscure, one-off, or minor issues are ignored.

After analysis, the command offers to open a PR against the repo that adds or updates the .coderabbit.yaml with the proposed rules. It also checks for a CONTRIBUTING.md and adds a reference to the CodeRabbit review rules if one is missing. The command is designed to be re-run periodically -- it compares proposed rules against existing rules and only adds net-new ones.

Arguments

  • <repo> (required): The GitHub repository to analyze. Accepts either:
    • Full URL: https://github.com/openshift/origin
    • Short form: openshift/origin
  • --count N (optional): Number of recent merged PRs to analyze. Default: 30. Higher values give better pattern detection but take longer.

Implementation

Prerequisites

  • GitHub CLI (gh): Must be installed and authenticated with access to the target repo.

  • Python 3: Python 3.6 or later.

    gh auth status
    python3 --version
    

Steps

  1. Parse the repo argument: Extract owner/repo from the argument. If a full GitHub URL is provided, strip the https://github.com/ prefix. Validate the format is owner/repo.

Read the full file on GitHub · 321 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. 9d ago First seen · 321 lines · 12 tokens per session scan C cdc34437c27e

Subscribe to this mod's changes

coderabbit-rules-from-pr-reviews is a command published in the GitHub repository wangke19/gemini-ai-helpers (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 12 tokens to every session and 3,544 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.