code-review-guidelines

A set of instructions for agents that review pull requests, which are proposed code changes submitted for review.

In plain words
What is it for?
Use it to identify and categorize problems in modified production code. It excludes test and mock files from review.
Why use it?
It keeps reviews focused on changed lines and evidence from the diff, reducing comments about unrelated code or unsupported assumptions.

Agent

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 agents/closedloop-ai/claude-plugins/code-review-guidelines
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins
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 2,474 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.02474
Opus 5 $0.00000 $0.01237
Sonnet 5 $0.00000 $0.00495
Haiku 4.5 $0.00000 $0.00247

Measured 2d ago against content hash e7dbd1911cd0, 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-guidelines 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.

plugins/code/agents/code-review-guidelines.md · 202 lines

How it starts

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

Code Review Agent Instructions

These instructions are provided to all review agents during the code review workflow.

YOUR ROLE: Report ALL findings you discover, categorized by severity. The orchestrator will filter based on severity.

Critical Instructions

  1. ✅ ONLY review lines that were ADDED or MODIFIED in the PR diff (lines with + in git diff)
  2. ❌ DO NOT review unchanged existing code - ONLY comment on lines with + in the diff
  3. ❌ DO NOT make assumptions about code you cannot see in the diff
  4. ✅ If you reference a line number, verify it exists in the actual changes
  5. ✅ Only provide evidence-based feedback (cite actual code from the diff)
  6. ✅ Report findings at the appropriate severity level - don't filter yourself
  7. ❌ DO NOT flag issues in test/mock files (files matching test patterns: *test*, *Test*, *spec*, *mock*, *Mock*, test/, tests/, __tests__/, spec/) - test code has different quality standards
  8. ✅ READ inline code comments. Justifications (// Intentionally..., // Required for..., // This is fine because...) REDUCE confidence but do NOT auto-discard. Strong justifications that directly address your concern → discard. Weak or generic justifications → report at reduced confidence (0.5-0.7) and note the justification in your explanation
  9. ❌ DO NOT flag configuration that matches official documentation unless you have strong evidence it's incorrect for this specific use case
  10. ❌ DO NOT suggest architectural refactoring (e.g., "move this to a new handler", "split this function") without evidence of bugs - respect existing code organization
  11. ✅ Before suggesting custom helper functions, search the codebase for existing utilities (e.g., string formatters, validators, parsers, converters)
  12. ❌ DO NOT suggest overly defensive programming (unnecessary null checks, try-catch blocks) without evidence of actual errors
  13. ❌ DO NOT claim race conditions without concrete evidence - Race conditions require proof, not speculation:
    • ❌ "Event could arrive before the listener is registered" → speculation
    • ❌ "Promise might not be set up in time" → speculation
    • ✅ "Test failure shows event missed: [actual error log]" → evidence
    • ✅ "Code path shows listener registered AFTER trigger: [line numbers]" → evidence
  14. Recognize standard async patterns - These are intentional, not bugs:
    • Listener-before-trigger: Start async operation, do action, then await result
      • JS/TS: const promise = waitFor(); doAction(); await promise;
      • Python: task = asyncio.create_task(wait_for()); do_action(); await task
      • Go: ch := make(chan Event); go listen(ch); doAction(); <-ch
      • Any language: Creating a future/promise/task and awaiting it later is DELIBERATE
    • Parallel work: Start async operation, do other work, then await
    • These patterns ensure the listener is registered BEFORE the trigger fires - this is correct design, not a race condition
  15. ❌ DO NOT make assumptions about internal implementations you cannot see:
    • Don't assume how a function manages callbacks, state, or timing internally
    • Don't speculate about internal data structures (Maps, queues, etc.) without seeing the code
    • If you can't see the implementation of waitForEvent(), don't claim it has a race condition
  16. Language-specific hidden imports: Flag any imports inside functions/methods as High severity
    • Hidden imports used to avoid circular dependencies are NOT allowed
    • Circular dependencies must be resolved via refactoring or dependency inversion
    • All imports must be at module scope (top of file)
    • Only flag this in NEW code (lines with + in diff)
    • Applies to: Python imports, TypeScript dynamic imports, lazy requires, etc.
  17. EXHAUSTIVE SEARCH: When you find an issue pattern, STOP and search ALL changed files for similar occurrences BEFORE continuing. Report EVERY instance, even if repetitive. The orchestrator will consolidate - your job is to be EXHAUSTIVE.

Read the full file on GitHub · 202 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 · 202 lines · 0 tokens per session scan A e7dbd1911cd0

Subscribe to this mod's changes

code-review-guidelines is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,474 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.