agentleFS
marwan562marwan562/agents-skills/skills/code-review/SKILL.md

code-review

Skill8 starsChanged 2 months agoMITView on GitHub

Use this skill when reviewing code for correctness, security, maintainability, performance, testing, and clean code. Triggers on requests to review, audit, critique, or assess code, PRs, or diffs.

  • Reads credentials

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

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read surrounding context (neighboring files, tests, configs) to understand intent — do not review in isolation

    line 27
  2. Distinctive:

    Check that the code does what it claims:

    line 32
  3. Distinctive:

    If nothing security-relevant is in scope, explicitly say "No security-relevant changes in this scope" rather than inventing issues

    line 47
  4. Distinctive:

    Only flag measurable concerns.

    line 62
  5. Distinctive:

    Test quality: asserts behavior, not implementation.

    line 67
  6. Very specific:

    When configured, send task+diff+files+test results to jev_review.

    line 90
  7. Distinctive:

    Be specific and evidence-based: Every finding must cite a location and explain the risk.

    line 97
  8. Distinctive:

    Limit noise: If there are >15 findings, show the top 10 and summarize the rest as "Additional nits: ...".

    line 98
  9. Distinctive:

    Acknowledge good code: Call out one thing done well when warranted — it reinforces patterns and balances tone.

    line 99
  10. Distinctive:

    Do NOT hallucinate files or lines — only reference artifacts you actually read

    line 106
  11. Distinctive:

    Do NOT flag security issues without a plausible attack path in this codebase

    line 107
  12. Distinctive:

    Do NOT demand tests for trivial config/doc-only changes unless they affect behavior

    line 108
  13. Distinctive:

    Do NOT suggest adding dependencies without noting the trade-off

    line 109
  14. Distinctive:

    Do NOT provide a review without an explicit verdict (Approve / Approve with comments / Request changes)

    line 110

“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

Provides a systematic, repeatable code-review workflow that balances thoroughness with actionability.

Purpose

Help an AI agent produce high-quality code reviews that catch defects, surface risks, and improve maintainability — without nitpicking or over-flagging. The output should be prioritized, justified, and easy for the author to act on.

When to Use

  • User asks to review code, a file, a directory, or a PR diff
  • User requests an audit, critique, or assessment of implementation quality
  • User pastes a snippet and asks "is this good?", "any issues?", "can you review?"
  • CI or pre-merge checks need a checklist-based review
  • Keywords: review, audit, critique, assess, PR review, code quality

Workflow

1. Scope and context

  • Identify what is under review: commit range, PR diff, file list, or full module
  • Read surrounding context (neighboring files, tests, configs) to understand intent — do not review in isolation
  • Note stated goals, linked issue/ticket, and any project conventions (CONTRIBUTING.md, linters, .editorconfig)

2. Correctness

Check that the code does what it claims:

  • Logic errors, off-by-one, null/undefined handling, error paths, edge cases
  • API contracts: request/response shapes, status codes, error codes
  • Concurrency and async correctness (races, deadlocks, unawaited promises)
  • Data invariants and state transitions

3. Security

Scan for common vulnerabilities, proportional to the code's exposure:

  • Injection (SQL, XSS, command, template), auth/authz bypass, IDOR
  • Secrets in code/logs, insecure randomness, weak crypto, unsafe deserialization
  • Mass assignment, SSRF, path traversal, open redirects
  • Dependency risks (known CVEs if a lockfile changed)
  • If nothing security-relevant is in scope, explicitly say "No security-relevant changes in this scope" rather than inventing issues

4. Maintainability and clean code

  • Naming clarity, single responsibility, function/module length, duplication
  • Abstraction appropriateness (no premature abstraction, no leaky abstraction)
  • Public API surface: is it minimal and hard to misuse?
  • Comments: explain why, not what; remove stale or misleading comments
  • Consistency with project style (naming, error handling, patterns)

5. Performance

  • Obvious hot-path issues: N+1 queries, unbounded loops, missing pagination, large allocations
  • Complexity regressions (e.g., O(n) → O(n²) on a large collection)
  • I/O: redundant network calls, missing caching where appropriate, blocking I/O on event loop
  • Only flag measurable concerns; avoid micro-optimizations without evidence

6. Testing

  • Is the change covered by tests? Would you trust this without manual QA?
  • Test quality: asserts behavior, not implementation; covers edge cases and failure paths
  • Missing tests for bug fixes (should include a regression test)
  • Over-mocked or flaky tests

7. Synthesize and prioritize

Produce findings grouped by severity:

  • 🔴 Blocking — must fix before merge (incorrectness, security, data loss)
  • 🟡 Important — should fix (maintainability debt, missing tests, performance risk)
  • 🟢 Suggestion — optional/nit (style, minor naming, alternative approach)

For each finding, include:

  • Location: file_path:line_number
  • Issue: one sentence
  • Why it matters: impact if not fixed
  • Suggested fix: concrete code or direction (diff hunk when helpful)

Close with a verdict: Approve / Approve with comments / Request changes and a 2-3 line summary.

8. Optional Jev rescore (skipped without JEV_API_KEY)

When configured, send task+diff+files+test results to jev_review; fix the weakest important dimensions, re-run checks, rescore with previousEvaluation. The verdict above still decides. Never send secrets. Full protocol: contribute Jev gates.

Instructions

  • Be specific and evidence-based. Every finding must cite a location and explain the risk. Never emit vague "consider improving quality" without a concrete pointer.
  • Limit noise. If there are >15 findings, show the top 10 and summarize the rest as "Additional nits: ...". Respect the author's time.
  • Acknowledge good code. Call out one thing done well when warranted — it reinforces patterns and balances tone.
  • Follow project conventions first. House style outranks generic preference. Cite the config or doc that supports a style comment.
  • Don't rewrite the PR. Suggest the smallest fix that resolves the issue; offer a larger refactor only as an optional follow-up.
  • Use non-judgmental tone. "This branch does not handle..." not "You forgot to handle..."

Constraints

  • Do NOT hallucinate files or lines — only reference artifacts you actually read
  • Do NOT flag security issues without a plausible attack path in this codebase
  • Do NOT demand tests for trivial config/doc-only changes unless they affect behavior
  • Do NOT suggest adding dependencies without noting the trade-off
  • Do NOT provide a review without an explicit verdict (Approve / Approve with comments / Request changes)

Examples

Example 1 — PR review

User: "Review the diff in src/auth/login.ts from this PR."

Agent:

  1. Reads src/auth/login.ts:1-120, src/auth/login.test.ts, and CONTRIBUTING.md
  2. Produces:
Verdict: Request changes

🔴 Blocking
- src/auth/login.ts:42 — `password` logged in plaintext via `console.log`.
  Risk: credential leak in logs. Fix: remove log or log `***`.

🟡 Important
- src/auth/login.ts:78 — Missing rate-limit check before `verify()`.
  Risk: brute-force. Fix: call `rateLimiter.check(ip)` first.

🟢 Suggestion
- src/auth/login.ts:91 — Variable `tmp` is vague; rename `pendingSession`.

Example 2 — Security-focused audit

User: "Audit api/search.ts for security."

Agent:

  1. Reads api/search.ts:1-80, checks for req.query usage
  2. Flags: api/search.ts:34 — String-interpolated SQL: \SELECT ... WHERE q='${q}'`. Use parameterized query `db.query('SELECT ... WHERE q=$1', [q])`` with severity 🔴 Blocking
  3. Notes "No authz check needed here — endpoint is public by design" to show reasoning

Example 3 — Whole-module review

User: "Can you review internal/billing/ for maintainability?"

Agent:

  1. Lists files, measures per-file length, spots duplication between invoice.ts and receipt.ts
  2. Recommends extracting shared Money value object, notes function calculate() at 90 lines should be split
  3. Verdict: Approve with comments — no blocking issues, but debt will compound if not addressed

References

  • Complements project-architecture (review the architecture) and documentation (note missing docs flagged during review)

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.