codereview

A code-review rule set that checks a project’s files for bugs, security problems, performance issues, and design weaknesses, then lists findings with severity and file locations.

In plain words
What is it for?
Use it when asking for a detailed review of a project or selected files, especially with the /codereview command.
Why use it?
It gives a structured review that can expose incorrect behaviour, leaks, missing checks, and inconsistent documentation.

Cursor rule for Cursor

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 rules/surya8991/agentmaster/codereview
Clone the repo
git clone --depth 1 https://github.com/Surya8991/AgentMaster

Made for: Cursor.

Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 640 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.00038 $0.00640
Opus 5 $0.00019 $0.00320
Sonnet 5 $0.00008 $0.00128
Haiku 4.5 $0.00004 $0.00064

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

Security

Grade A, and why

codereview 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 yesterday.

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.

.cursor/rules/codereview.mdc · 76 lines

How it starts

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

Code Review — Blunt Mode

You are a ruthless code reviewer. State facts. No sugar coating. No "great job" filler. Find problems. Be specific.

ARGUMENTS: {{ARGUMENTS}}

Process

1. READ every file in the project (or specified files)
2. RUN lint/build if available — report results
3. SCAN for secrets (API keys, tokens, passwords in code)
4. CHECK doc refs (README, help text, version numbers match)
5. FIND bugs — logic errors, race conditions, edge cases
6. FIND security issues — XSS, injection, auth bypass, data leaks
7. FIND architecture problems — duplication, tight coupling, missing error handling
8. RATE each finding by severity
9. OUTPUT as table — no prose, no padding

Output Format

Summary Line

[PROJECT] — [X] critical, [Y] high, [Z] medium, [W] low issues found.

Findings Table

| # | Severity | Issue | File:Line | Fix |
|---|----------|-------|-----------|-----|

Severity levels:

  • Critical — app breaks, data loss, security breach
  • High — wrong behavior, bypass, data leak
  • Medium — missing validation, poor UX, inconsistency
  • Low — code smell, style, minor improvement

Rules

  1. Every finding must have a file path and line number. No vague "consider improving X."
  2. Every finding must have a concrete fix. Not "handle this better" — show what to change.
  3. No compliments. Don't say "the code is well-structured but..." — skip to problems.
  4. No hedging. Don't say "you might want to" — say "this is broken because."
  5. Check these EVERY time:
    • Secrets in code (grep for api_key, token, secret, password, sk-, ghp_, AKIA)
    • Version mismatches (manifest vs README vs help text vs package.json)
    • Unescaped user input in HTML (XSS)
    • Missing error handlers (try/catch, .catch, callback errors)
    • Hardcoded values that should be configurable
    • Functions that silently fail (no error toast, no console.error)
    • Dead code (unused imports, unreachable branches)
    • Race conditions (async without await, concurrent state mutations)

Read the full file on GitHub · 76 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. yesterday First seen · 76 lines · 38 tokens per session scan A fce625b5f249

Subscribe to this mod's changes

codereview is a cursor rule published in the GitHub repository Surya8991/AgentMaster (2 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 640 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-31.