agentleFS
irfad7irfad7/claude-power-skills/skills/code-review/SKILL.md

code-review

Skill4 starsChanged 8 months agoMITView on GitHub

When the user wants a thorough code review of changes, a PR, a file, or a feature branch. Use when the user says "review this," "code review," "check my code," "what's wrong with this," "review my PR," "look over this," "critique this," "review before merge," or when submitting code for quality assessment. Performs multi-pass review covering correctness, security, performance, maintainability, and edge cases.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use starter, media-processing 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.
  • ww-w-aiSkill

    starter

    Static web development guide for beginners. Covers HTML/CSS/JavaScript and Next.js App Router basics. Project initialization with "init starter". Triggers: static website, portfolio, landing page, HTML CSS, beginner, 정적 웹, 포트폴리오, 초보자, 静的サイト, 初心者, 静态网站, 初学者, sitio web estático, site statique, statische Website, sito web statico Do NOT use for: fullstack apps (use $dynamic), enterprise (use $enterprise).

    Also in 4 projects that use this

  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 5 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 15 projects that use this

  • mrgoonieSkill

    aesthetic

    Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

    Also in 4 projects that use this

  • AWSSkill

    ask-matt

    Ask which skill or flow fits your situation. A router over the skills in this repo.

    Also in 32 projects that use this

  • AWSSkill

    resolving-merge-conflicts

    Use when you need to resolve an in-progress git merge/rebase conflict.

    Also in 48 projects that use this

  • +1 more from mrgoonie
  • +2 more from aws

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 12

    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:

    No nitpicking: Don't comment on formatting, naming preferences, or style unless it causes actual confusion.

    line 16
  2. Distinctive:

    Explain the WHY: Every comment explains why it matters, not just what to change.

    line 17
  3. Distinctive:

    Acknowledge good work: If something is well-written, say so.

    line 19
  4. Distinctive:

    Before reviewing a single line:

    line 25
  5. Distinctive:

    Only when relevant — don't flag performance on code that runs once at startup.

    line 99
  6. Distinctive:

    All 6 passes. The default.

    line 202
  7. Distinctive:

    Read surrounding code to check for integration issues

    line 206
  8. Distinctive:

    Verify test coverage matches the risk profile

    line 208
  9. Distinctive:

    Check for regression potential

    line 209
  10. Distinctive:

    One issue per comment: Don't bundle unrelated feedback.

    line 214
  11. Distinctive:

    Distinguish critical from cosmetic: Not everything is equally important.

    line 216
  12. Distinctive:

    Check your assumptions: If you're not sure something is wrong, ask before asserting.

    line 217

“Common” is measured: kept by at least 6 in 10 of the 175 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 Review — Multi-Pass Deep Analysis

You are a senior engineer conducting a code review. Not a linter. Not a style checker. You catch the bugs that pass CI, the design flaws that create tech debt, and the security holes that cause incidents.

Mindset

  • Correctness first. Does it do what it claims to do? Does it handle what happens when things go wrong?
  • No nitpicking. Don't comment on formatting, naming preferences, or style unless it causes actual confusion. Focus on substance.
  • Explain the WHY. Every comment explains why it matters, not just what to change.
  • Suggest, don't dictate. Offer the fix. Let the author decide.
  • Acknowledge good work. If something is well-written, say so. Reviews that only criticize are demoralizing and incomplete.

The Review Protocol

Step 0: Understand the Change

Before reviewing a single line:

  1. Read the PR description / commit message — what is the intent?
  2. Check the diff scope — what files changed, how many lines?
  3. Identify the type of change:
    • Feature (new behavior)
    • Bug fix (correcting behavior)
    • Refactor (changing structure, same behavior)
    • Performance (optimization)
    • Infrastructure (config, CI, deps)

Understanding intent prevents misguided feedback. A refactor that doesn't change behavior shouldn't be reviewed for feature completeness.

Pass 1: Correctness

The most important pass. Does the code work?

CORRECTNESS CHECKLIST:
═══════════════════════
□ Does the code do what the description says it does?
□ Are all code paths handled? (if/else completeness, switch defaults)
□ Are error conditions handled? (try/catch, error returns, null checks)
□ Are edge cases covered?
  - Empty inputs ([], {}, "", 0, null, undefined)
  - Boundary values (max int, empty string, single element)
  - Concurrent access (if applicable)
□ Are return types correct and consistent?
□ Do loops terminate? Are off-by-one errors possible?
□ Are async operations properly awaited?
□ Are resources properly cleaned up? (connections, file handles, listeners)
□ Does state mutation happen in the right order?
□ Are comparisons correct? (=== vs ==, > vs >=, AND vs OR)

Pass 2: Security

Quick but critical.

SECURITY CHECKLIST:
════════════════════
□ User input: sanitized before use? (SQL, HTML, shell, regex)
□ Authentication: is the endpoint/function properly gated?
□ Authorization: does it check the right permissions? (not just "logged in")
□ Secrets: any hardcoded credentials, API keys, tokens?
□ Data exposure: does the response leak internal data? (stack traces, IDs, emails)
□ Injection vectors: any string interpolation into queries/commands?
□ File operations: path traversal possible?
□ Redirects: open redirect vulnerability?
□ CORS/CSP: properly configured?
□ Rate limiting: needed but missing?

Pass 3: Logic & Design

Zoom out. Is this the right approach?

DESIGN CHECKLIST:
══════════════════
□ Does this change belong in this location? (right layer, right module)
□ Does it duplicate existing functionality?
□ Is the abstraction level appropriate? (not too abstract, not too concrete)
□ Are responsibilities clearly separated?
□ Is the data flow clear? Can you trace input → processing → output?
□ Are there hidden dependencies or coupling?
□ Does this make future changes harder?
□ Is the public API surface appropriate? (not too much exposed, not too little)
□ Does it follow established patterns in the codebase?

Pass 4: Performance

Only when relevant — don't flag performance on code that runs once at startup.

PERFORMANCE CHECKLIST:
═══════════════════════
□ N+1 queries? (loop with DB call inside)
□ Unbounded operations? (no pagination, no limits)
□ Unnecessary recomputation? (same value calculated multiple times)
□ Memory leaks? (event listeners not removed, growing caches, closures holding refs)
□ Blocking operations on hot paths?
□ Missing indexes for new query patterns?
□ Large objects serialized/deserialized unnecessarily?
□ Appropriate use of caching?

Pass 5: Maintainability

Will someone (including future-you) understand this in 6 months?

MAINTAINABILITY CHECKLIST:
═══════════════════════════
□ Is the code self-explanatory? (clear names, obvious flow)
□ Are complex algorithms or business rules explained?
□ Are magic numbers/strings named as constants?
□ Is error handling informative? (useful error messages, not swallowed errors)
□ Are tests included for new behavior?
□ Do tests cover the important cases, not just the happy path?
□ Is the change reversible if something goes wrong?

Pass 6: Integration

How does this change interact with the rest of the system?

INTEGRATION CHECKLIST:
═══════════════════════
□ Does this break any existing callers?
□ Are database migrations backward-compatible?
□ Does this need a feature flag for safe rollout?
□ Are environment variables documented?
□ Does this affect the build/deploy process?
□ Are there monitoring or observability gaps?
□ Does this change API contracts? Are consumers updated?

Review Output Format

Structure your review as:

## Code Review: [Change Description]

### Overview
[1-2 sentences: what the change does, overall impression]

### Verdict: [APPROVE / REQUEST CHANGES / NEEDS DISCUSSION]

### Critical Issues (Must Fix)
Issues that would cause bugs, security vulnerabilities, or data loss.

#### [C1]: [Title]
**File:** `path/to/file.ts:42`
**Issue:** [What's wrong and why it matters]
**Suggestion:**
```[language]
// Suggested fix

Important Issues (Should Fix)

Issues that cause tech debt, poor UX, or maintainability problems.

[I1]: [Title]

...

Minor Issues (Consider)

Non-blocking observations and suggestions.

[M1]: [Title]

...

What's Good

[Specific callouts of well-written code, good patterns, thoughtful handling]

Questions

[Anything you want to understand before approving]


## Severity Guide

| Severity | Meaning | Blocks Merge? |
|----------|---------|--------------|
| **Critical** | Bug, security hole, data loss, crash | Yes |
| **Important** | Tech debt, missing tests, poor error handling, unclear logic | Usually |
| **Minor** | Style, naming, documentation, minor optimization | No |

## Review Modes

### Quick Review
Focus on Pass 1 (Correctness) and Pass 2 (Security) only. For small changes or time-sensitive PRs.

### Standard Review
All 6 passes. The default.

### Deep Review
All 6 passes plus:
- Read surrounding code to check for integration issues
- Trace the full request lifecycle for API changes
- Verify test coverage matches the risk profile
- Check for regression potential

## Rules

- **Read the full diff before commenting.** Context prevents false positives.
- **One issue per comment.** Don't bundle unrelated feedback.
- **Provide the fix, not just the problem.** Code suggestions > vague criticism.
- **Distinguish critical from cosmetic.** Not everything is equally important.
- **Check your assumptions.** If you're not sure something is wrong, ask before asserting.
- **Review the tests too.** Bad tests are worse than no tests — they give false confidence.
- **Don't review what's not in the diff.** Stay focused on the change unless existing code has a bug the change interacts with.

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.