agentleFS
DulajDilDulajDil/claude-skills-manager/skills/code-reviewer/SKILL.md

code-reviewer

Skill1 starsChanged 20 days agoMITView on GitHub

Review a diff or a set of files for correctness, security, and maintainability and report findings ranked by severity. Use this skill when the user asks to "review this", "review my changes", "look over this PR", "check this code before I merge", "what's wrong with this", or asks for a second pair of eyes on code they are about to ship.

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

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 9

    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:

    Default to reviewing uncommitted or recently changed code, not the whole repository:

    line 18
  2. Distinctive:

    If the user names specific files, review those instead.

    line 25
  3. Distinctive:

    Do not report a finding you have not checked.

    line 76
  4. Distinctive:

    Read the surrounding code — the guard you think is missing may be upstream.

    line 78
  5. Distinctive:

    If you cannot construct one, either downgrade it to a note or drop it.

    line 80
  6. Distinctive:

    If you find nothing above Minor, say that plainly instead of inflating small observations into problems.

    line 105
  7. Distinctive:

    Do not rewrite working code to match personal style preferences.

    line 113
  8. Distinctive:

    Follow the conventions already in the file over your own defaults.

    line 114
  9. Distinctive:

    Do not apply fixes unless the user asks you to.

    line 115

“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

Code Reviewer

Review code the way a careful senior colleague would: find the things that will actually bite, say so plainly, and skip the noise.

Scope

Default to reviewing uncommitted or recently changed code, not the whole repository:

  1. git status --short to see what's in flight.
  2. git diff for unstaged, git diff --staged for staged work.
  3. For a branch: git diff main...HEAD (or master).

If the user names specific files, review those instead. If there is no diff and no target named, ask what to review rather than reviewing everything.

What to look for

Work through these in order. The first two earn their keep; the rest are supporting.

1. Correctness

  • Off-by-one errors, inverted conditions, wrong operator precedence.
  • Unhandled null/undefined, empty collections, zero, and negative numbers.
  • async work that isn't awaited; promises whose rejections nobody catches.
  • Race conditions between concurrent writes to the same resource.
  • Error paths that swallow the error or return a success shape on failure.
  • Logic that contradicts what the surrounding code or its callers assume.

2. Security

  • Untrusted input reaching a dangerous sink. Trace the path: request params and bodies, CLI args, file contents, and third-party API responses are all untrusted. Dangerous sinks include SQL, shell commands, path.join, eval, deserialization, and template rendering.
  • Path traversal specifically: any id from a request that gets joined onto a directory needs validation, not sanitisation.
  • Secrets in source, in logs, or in error messages returned to a caller.
  • Authorization checks that are missing, or that run after the side effect.
  • Sensitive data written to logs (tokens, PII, full request bodies).

3. Resource handling

  • Files, sockets, and DB connections opened but not closed on the error path.
  • Unbounded growth: reading an entire file or result set into memory, queues with no cap, caches with no eviction.
  • Queries inside loops that should be a single batched call.

4. Maintainability

  • Names that mislead about what the thing actually does.
  • Duplicated logic that has already drifted between copies.
  • Comments that contradict the code — one of them is wrong.
  • Dead code and unreachable branches.

5. Tests

  • Does the change have tests? Do they test behaviour or just restate the implementation?
  • Are the error paths covered, or only the happy path?

How to verify before reporting

Do not report a finding you have not checked. For each candidate:

  1. Read the surrounding code — the guard you think is missing may be upstream.
  2. Construct the concrete failure: what input, what state, what wrong result.
  3. If you cannot construct one, either downgrade it to a note or drop it.

A confident, wrong finding costs the reader more than a missed one.

Output

Group findings by severity. Within each group, most serious first.

### Critical      data loss, security holes, crashes on ordinary input
### Important     wrong behaviour in a real edge case, resource leaks
### Minor         naming, duplication, dead code, style inconsistencies
### Notes         things worth knowing that are not defects

For each finding, give:

  • Where — path/to/file.ts:42
  • What — one sentence stating the defect.
  • Why it matters — the concrete failure: inputs → wrong outcome.
  • Fix — the smallest change that resolves it, as a snippet where useful.

End with a one-line verdict: safe to merge, merge after fixing the criticals, or needs rework.

If you find nothing above Minor, say that plainly instead of inflating small observations into problems. "This looks correct; two minor naming nits" is a complete and useful review.

Stay in your lane

  • Review the change in front of you, not the architecture it sits in — unless the change actively makes that architecture worse.
  • Do not rewrite working code to match personal style preferences.
  • Follow the conventions already in the file over your own defaults.
  • Do not apply fixes unless the user asks you to; report first.

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.