agentleFS
le-diegzle-diegz/claude-skills-registry/skills/code/code-reviewer/SKILL.md

code-reviewer

Skill8 starsChanged 8 months agoMITView on GitHub

Produces prioritized, actionable code review comments with concrete fix examples instead of style observations.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-doc-updater, git-precommit and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • u9401066Skill

    git-doc-updater

    Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.

    Also in 5 projects that use this

  • u9401066Skill

    git-precommit

    Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.

    Also in 5 projects that use this

  • lsyamsiarSkill

    spec-miner

    Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, inherited project, legacy analysis, code archaeology, undocumented features.

    Also in 6 projects that use this

  • lsyamsiarSkill

    secure-code-guardian

    Use when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations such as hashing passwords with bcrypt/argon2, sanitizing SQL queries with parameterized statements, configuring CORS/CSP headers, validating input with Zod, and setting up JWT tokens. Invoke for authentication, authorization, input validation, encryption, OWASP Top 10 prevention, secure session management, and security hardening. For pre-built OAuth/SSO integrations or standalone security audits, consider a more specialized skill.

    Also in 8 projects that use this

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 16 projects that use this

  • +4 more from u9401066
  • +3 more from lsyamsiar

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 15 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 8
  2. Distinctive:

    Do not use this skill when:

    line 13
  3. Distinctive:

    Read every line before writing a single comment.

    line 24
  4. Distinctive:

    Every comment must contain exactly three parts:

    line 62
  5. Distinctive:

    Check for these categories in this order:

    line 90
  6. Distinctive:

    Do not spend review time on: formatting that a linter catches automatically, import ordering, comment style, indentation.

    line 106
  7. Distinctive:

    Do not pad the review with encouragement after every comment.

    line 112
  8. Distinctive:

    Do not use hedging language for real problems: "you might want to consider possibly fixing" — if it is Critical, say it is Critical and say …

    line 114
  9. Distinctive:

    Do not write comments about formatting, indentation, or style that a linter (eslint, flake8, rubocop) would catch.

    line 174
  10. Distinctive:

    Do not write a comment without a concrete fix.

    line 175
  11. Distinctive:

    Do not soften Critical issues.

    line 176
  12. Distinctive:

    Do not invent problems. If a function is short, well-named, and correct, say so in the Summary and do not manufacture Minor issues to fill …

    line 177
  13. Distinctive:

    Do not repeat the same observation multiple times across different comments.

    line 178
  14. Distinctive:

    Do not write "overall this looks good!" as a opener if there are Critical issues.

    line 179
  15. Distinctive:

    Do not comment on code that was not provided.

    line 180

“Common” is measured: kept by at least 6 in 10 of the 163 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to use this skill

Use this skill when:

  • The user shares a function, class, module, diff, or PR and asks for review, feedback, or critique.
  • The user asks "what's wrong with this", "can you review this", or "any improvements?".
  • The user pastes code with the intent of improving it before shipping or merging.

Do not use this skill when:

  • The user wants you to explain what code does without asking for critique.
  • The user has a specific runtime error and wants debugging help (use a debugging approach instead).
  • The user asks to refactor code to a specific pattern they've already decided on.

Instructions

Step 1 — Read the full code before commenting on any of it

Read every line before writing a single comment. Do not stream observations as you go. Common mistakes that look like bugs at line 10 are sometimes intentional design at line 50. Understanding the whole before critiquing the parts is not optional.

Step 2 — Categorize every issue by severity before writing the review

Assign each issue to one of four levels. Use these definitions precisely:

LevelDefinitionAction required
CriticalWill cause data loss, security vulnerability, crash in production, or incorrect behavior in the expected use caseMust fix before merge
MajorMeaningfully degrades performance, maintainability, or correctness in edge cases the author likely didn't considerShould fix before merge
MinorMakes the code harder to read or reason about, but doesn't affect behaviorFix if time allows
NitPersonal style preference or marginal improvementOptional, do not block

Step 3 — Write the review in severity order

Structure the output as:

## Code Review

### Critical
[issues, or "None"]

### Major
[issues, or "None"]

### Minor
[issues, or "None"]

### Nits
[issues, or "None" — keep this section short]

### Summary
[2–3 sentences: overall assessment, biggest strengths, single most important next step]

Step 4 — Write each comment as a self-contained unit

Every comment must contain exactly three parts:

  1. Location: file name and line number, or a code snippet identifying the exact location
  2. Problem: one sentence stating what is wrong and why it matters — not "this could be improved" but "this will panic if data is nil because there is no nil check before line 14"
  3. Fix: a concrete code example showing what the corrected version looks like

Example of a bad comment (do not write this):

This function is a bit long and could be refactored for readability.

Example of a good comment (write this instead):

processPayment() — line 34 Problem: The function catches all errors with a bare except Exception and returns None silently. A network timeout and an invalid card number are handled identically, making it impossible for the caller to distinguish transient failures (retry) from permanent ones (surface to user). Fix:

class PaymentError(Exception): pass
class TransientPaymentError(PaymentError): pass

def process_payment(amount, card):
    try:
        return gateway.charge(amount, card)
    except gateway.NetworkError as e:
        raise TransientPaymentError(str(e)) from e
    except gateway.CardError as e:
        raise PaymentError(str(e)) from e

Step 5 — Review for real problems, not surface symptoms

Check for these categories in this order:

  1. Correctness — Does the code do what it is supposed to do? Test the happy path mentally. Then test with a nil/null input, an empty collection, a boundary value, a concurrent caller, and a network failure. Does it still do the right thing?
  2. Security — Is there untrusted input reaching a dangerous sink? SQL concatenation, shell execution, path traversal, missing auth checks, secrets in logs.
  3. Error handling — Are errors swallowed, lost, or converted to generic messages? Can the caller distinguish failure modes?
  4. Resource management — Are connections, file handles, and locks always released? Does the happy path release them? Does the error path?
  5. Concurrency — Is shared mutable state accessed without synchronization? Are there race conditions in the obvious execution paths?
  6. Logic — Are there off-by-one errors, wrong operator precedence, incorrect boolean logic, or missing early returns?
  7. Maintainability — Is there meaningful duplication that will diverge? Are names misleading? Are magic numbers unexplained?

Do not spend review time on: formatting that a linter catches automatically, import ordering, comment style, indentation.

Step 6 — Be precise and bienveillant

The review is read by a person who wrote this code in good faith. Every critical comment must be factual and specific, never insulting. Never write "this is wrong" without explaining why. Never write "this is bad code" — write what specific problem the code has.

Do not pad the review with encouragement after every comment. One honest summary sentence about what the code does well is enough.

Do not use hedging language for real problems: "you might want to consider possibly fixing" — if it is Critical, say it is Critical and say why.


Examples

Input:

def get_user(user_id):
    conn = db.connect()
    result = conn.execute(f"SELECT * FROM users WHERE id = {user_id}")
    return result.fetchone()

Output:

Code Review

Critical

get_user() — line 3: SQL injection vulnerability

user_id is interpolated directly into the query string. Any caller passing user_id = "1 OR 1=1" will dump the entire users table.

Fix:

def get_user(user_id):
    conn = db.connect()
    result = conn.execute("SELECT * FROM users WHERE id = ?", (user_id,))
    return result.fetchone()

get_user() — line 2: database connection never closed

conn.connect() opens a connection that is never released. In a long-running process, every call leaks a connection until the pool is exhausted.

Fix:

def get_user(user_id):
    with db.connect() as conn:
        result = conn.execute("SELECT * FROM users WHERE id = ?", (user_id,))
        return result.fetchone()

Major

None.

Minor

None.

Nits

None.

Summary

Two critical issues that must be fixed before this reaches production: a SQL injection that exposes every user record, and a connection leak. The fix for both is a one-line change each. No architectural concerns.


What to avoid

  • Do not write comments about formatting, indentation, or style that a linter (eslint, flake8, rubocop) would catch. These are not code review concerns.
  • Do not write a comment without a concrete fix. "Consider extracting this into a helper function" is not a review comment — show the extracted function.
  • Do not soften Critical issues. "You might want to add a nil check here" for a code path that will crash in production is a disservice to the author.
  • Do not invent problems. If a function is short, well-named, and correct, say so in the Summary and do not manufacture Minor issues to fill the template.
  • Do not repeat the same observation multiple times across different comments. If error handling is systematically absent, say it once clearly rather than noting it on each of the seven functions that lack it.
  • Do not write "overall this looks good!" as a opener if there are Critical issues. The severity order speaks for itself.
  • Do not comment on code that was not provided. If the user shares a single function, do not speculate about the rest of the codebase.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.