agentleFS
Ygohel18Ygohel18/skills/code-review/SKILL.md

code-review

Skill1 starsChanged 2 months agoMITView on GitHub

Language-agnostic framework for conducting thorough, respectful, and constructive code reviews on pull requests, merge requests, git diffs, or code snippets. Triggers whenever an agent is asked to "review this PR", "review this diff", "give feedback on this code", "is this ready to merge?", "audit this pull request", or "critique this implementation". Enforces structured review ordering (intent first, architecture second, lines last), objective 3-tier severity triage (Blocker vs Should-Fix vs Nit), actionable feedback phrasing, and clear approval decisions.

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

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

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 8

    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:

    Follow this 3-step sequence when evaluating any code change:

    line 30
  2. Distinctive:

    Understand Intent First: Always read the PR description, user story, or linked issue *before* inspecting the diff.

    line 40
  3. Distinctive:

    Every review comment must be categorized into one of three explicit tiers:

    line 50
  4. Distinctive:

    Verify these five dimensions across the diff:

    line 64
  5. Distinctive:

    When drafting review comments:

    line 96
  6. Distinctive:

    Explain the "Why": Always explain the underlying risk (e.g.

    line 104
  7. Distinctive:

    Use when the code is safe, correct, and adequately tested.

    line 117
  8. Distinctive:

    If suggestions or nits are included, clearly label them as non-blocking:

    line 118
  9. Very specific:

    Use when one or more 🔴 [BLOCKER] issues must be addressed before merge.

    line 122

“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 Protocol

An operational guide for reviewing another engineer's pull request, diff, or code snippet across any programming language.

Sibling Standards:

  • For the underlying engineering standards and language conventions, refer to universal-coding-standards.
  • For evaluating commit history, commit messages, and branch hygiene, refer to git-commit-workflow.
  • For vetting any newly introduced dependencies, refer to package-security-vetting.

1. Review Scope & Order

Follow this 3-step sequence when evaluating any code change:

Step 1: Understand Intent (PR description, linked ticket, acceptance criteria)
  │
Step 2: High-Level Architecture (Does the approach make sense? Any design flaws?)
  │
Step 3: Detailed File Review (Logic correctness, edge cases, tests, security, nits)
  1. Understand Intent First: Always read the PR description, user story, or linked issue before inspecting the diff. Review against what the change claims to accomplish.
  2. Review High-Level Approach First: Evaluate the architectural design, component boundaries, and schema changes before examining line-by-line syntax. If the high-level approach is fundamentally flawed, detailed syntax feedback is wasted.
  3. Distinguish "Wrong" from "Different":
    • Wrong: Causes a bug, security flaw, data corruption, or breaks conventions $\rightarrow$ Blocks approval.
    • Different: An alternative stylistic approach that works equally well $\rightarrow$ Suggest as optional Nit.

2. Severity Triage Framework

Every review comment must be categorized into one of three explicit tiers:

TierMarkerCriteriaImpact on Approval
Blocking🔴 [BLOCKER]Direct bugs, edge-case crashes, security flaws, missing tests for core logic, breaking API changes, or repo guideline violations.Blocks approval. Must be fixed before merging.
Should-Fix🟡 [SHOULD-FIX]Ambiguous naming, missing documentation on complex logic, missing timeout/retry handling, or unmeasured performance smells.Does not block merge if time-critical; may be tracked in a follow-up ticket.
Nit / Suggestion🟢 [NIT]Non-standard personal preference, stylistic alternative, minor typo in a comment, or minor micro-optimization.Never blocks approval. Author has full discretion to adopt or skip.

Golden Rule: Never block a pull request on nits alone. If a PR has 0 blockers and 6 nits, approve the PR with comments.


3. Review Checklist (What to Check)

Verify these five dimensions across the diff:

3.1 Correctness & Edge Cases

  • Does the implementation fulfill all stated ticket requirements?
  • Are boundary values handled (null/nil, empty arrays, zero values, negative numbers, long strings)?
  • Are concurrency, race conditions, or state mutations handled safely?
  • Are error states caught and handled gracefully (no silent swallowing)?

3.2 Test Adequacy

  • Are all new features and bug fixes accompanied by automated tests?
  • Do tests assert on real behavioral outcomes rather than mocking out the entire system?
  • Are both the happy path and at least one failure/edge path tested?

3.3 Security & Dependencies

  • Zero committed secrets, private tokens, or hardcoded credentials.
  • All external user inputs are validated and sanitized at system boundaries.
  • Database queries use parameterized queries (zero SQL string interpolation).
  • If new dependencies are added, verify provenance and security advisories via package-security-vetting.

3.4 Readability & Maintainability

  • Would a new engineer understand this code in 6 months without explanation?
  • Are identifiers intention-revealing and idiomatic to the target language?
  • Are functions short, focused, and free of deeply nested conditional pyramids?

3.5 Scope Creep & Atomicity

  • Does this PR represent one logical unit of work?
  • Flag unrelated formatting changes, opportunistic refactors, or accidental file edits bundled into the PR.

4. Constructive Phrasing Rules

When drafting review comments:

  1. Critique the Code, Not the Author:
    • ❌ "You forgot to validate the payload."
    • ✅ "This endpoint doesn't appear to validate the payload schema before passing it to the database."
  2. Inquire Rather than Accuse:
    • ❌ "This will break when the list is empty."
    • ✅ "What happens here if the list is empty? Would items[0] throw an IndexOutOfBounds error?"
  3. Explain the "Why": Always explain the underlying risk (e.g. data loss, performance degradation, security exploit) so the author learns the rationale.
  4. Provide Actionable Code Suggestions: Include concrete code snippets demonstrating the recommended fix.
  5. Praise Good Decisions: Acknowledge clean abstractions, clever simplifications, and thorough tests.

(See references/feedback-phrasing.md for more examples).


5. The Review Decision

End every review with an unambiguous summary and verdict:

Option A: Approve (No Blockers)

  • Use when the code is safe, correct, and adequately tested.
  • If suggestions or nits are included, clearly label them as non-blocking:

    "Looks solid! Left two minor non-blocking nits regarding naming. Approved!"

Option B: Request Changes (At Least One Blocker)

  • Use when one or more 🔴 [BLOCKER] issues must be addressed before merge.
  • Provide a concise summary checklist at the top of the review:

    "Great progress on this feature! Before merging, we need to address two blocking items: 1. Parameterize the raw SQL query in findUserById (security). 2. Add unit tests covering the zero-balance edge case. Happy to re-review once updated!"


Reference Guides

  • references/feedback-phrasing.md: Practical before-and-after examples demonstrating respectful, constructive phrasing for bugs, performance, style, and positive reinforcement.
  • references/severity-examples.md: Worked real-world examples calibrating how to categorize review comments into Blocker, Should-Fix, and Nit.

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.