agentleFS
dafaalzdafaalz/agent-skills/skills/code-review/SKILL.md

code-review

Skill2 starsChanged 2 months agoMITView on GitHub

Use when requesting review for code changes, evaluating review feedback, pushing back against incorrect suggestions, or verifying review fixes. Don't use for automated test execution or lint fixing.

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 9 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
  • +1 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 22 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 22

    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 these core principles:

    line 14
  2. Distinctive:

    Verify before implementing.

    line 16
  3. Distinctive:

    After completing each task in subagent-driven development.

    line 28
  4. Distinctive:

    After finishing a major feature branch.

    line 29
  5. Distinctive:

    Before merging any working branch into the main trunk.

    line 30
  6. Distinctive:

    Follow this procedure to extract commit boundaries and dispatch the reviewer:

    line 36
  7. Very specific:

    When reviewing across a feature branch, resolve BASE_SHA from the merge base with trunk:

    line 44
  8. Distinctive:

    Follow this six-step loop for every review item:

    line 86
  9. Distinctive:

    Read. Process the entire review item without defensive or emotional reactions.

    line 87
  10. Distinctive:

    Verify. Inspect the codebase, git history, and tests to confirm whether the premise matches reality.

    line 89
  11. Distinctive:

    Never generate performative agreement, excessive gratitude, or subservient conversational fillers.

    line 98
  12. Distinctive:

    Never guess intent or apply partial assumptions when review comments lack clarity.

    line 114
  13. Distinctive:

    Stop immediately when any item in a review list is ambiguous.

    line 117
  14. Distinctive:

    Do not implement clear items prematurely if ambiguous items may alter shared architecture.

    line 118
  15. Distinctive:

    Never accept anti-patterns to avoid interpersonal friction.

    line 125
  16. Distinctive:

    Check blast radius across modules.

    line 126
  17. Distinctive:

    Verify necessity using this process:

    line 134
  18. Distinctive:

    Search the codebase for actual call sites using grep or file search tools.

    line 135
  19. Distinctive:

    If the feature has zero active callers, reject the abstraction and propose removing dead code instead.

    line 136
  20. Distinctive:

    If active callers exist, implement the minimum clean logic required to satisfy those callers without speculative generalizations.

    line 137
  21. Distinctive:

    Test each fix individually.

    line 146
  22. Distinctive:

    When pushing back, reference test results, benchmark metrics, or architectural constraints rather than personal preference.

    line 154
  23. Distinctive:

    If you pushed back and later discover the reviewer was correct, acknowledge the facts directly without lengthy apologies.

    line 155

“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

Unify requesting and receiving code review into a single disciplined workflow. Catch regressions early, protect architectural boundaries, and evaluate all review feedback against codebase reality before applying fixes.

Overview and core principles

Code review demands technical rigor rather than emotional performance or unverified agreement.

Follow these core principles:

  • Review early, review often. Request review after each discrete task or major feature to prevent compounding defects.
  • Verify before implementing. Never accept reviewer suggestions blindly. Check codebase truth and test suites first.
  • Technical correctness over social comfort. Maintain skepticism. Push back with concrete facts when suggestions degrade architecture.
  • Structural audit depth. Consult references/architectural-lenses.md for classic engineering lenses and logic defect categories.
  • Comment hygiene. Consult references/comment-hygiene.md to prune AI conversational narration while preserving critical business context.

Phase 1. Requesting code review

Dispatch an isolated code reviewer subagent to catch defects before they cascade into downstream tasks. Provide precise context and git ranges without polluting the reviewer with conversational session history.

When to request review

Request code review under the following mandatory conditions:

  • After completing each task in subagent-driven development.
  • After finishing a major feature branch.
  • Before merging any working branch into the main trunk.

Request review optionally when encountering complex bug fixes, before significant refactoring, or when stuck and requiring an objective fresh perspective.

Step 1. Commit boundary extraction and reviewer dispatch

Follow this procedure to extract commit boundaries and dispatch the reviewer:

  1. Extract git commit SHAs:
BASE_SHA=$(git rev-parse HEAD~1)
HEAD_SHA=$(git rev-parse HEAD)

When reviewing across a feature branch, resolve BASE_SHA from the merge base with trunk:

BASE_SHA=$(git merge-base origin/main HEAD)
HEAD_SHA=$(git rev-parse HEAD)
  1. Inspect the git diff statistics before dispatching:
git diff --stat ${BASE_SHA}..${HEAD_SHA}
  1. Dispatch the code reviewer subagent using the template at references/code-reviewer-prompt.md. Populate all template variables:
  • WHAT_WAS_IMPLEMENTED. The exact feature, fix, or module completed.
  • PLAN_OR_REQUIREMENTS. The task specification or requirements reference.
  • BASE_SHA. Starting commit SHA for the diff range.
  • HEAD_SHA. Ending commit SHA for the diff range.
  • DESCRIPTION. Brief summary of architectural decisions and changed files.

Completion criterion. The code reviewer subagent is dispatched with verified commit SHA boundaries, diff stats, and requirements context.

Step 2. Finding triage and priority ranking

Categorize all review findings into three priority tiers:

  • Critical. Bugs, security vulnerabilities, data loss risks, broken invariants, or failing tests. Fix these immediately before any further work.
  • Important. Architectural debt, missing error handling, test coverage gaps, or performance regressions. Address these before merging.
  • Minor. Style inconsistencies, naming improvements, or documentation polish. Track or address these after functional concerns pass.

Completion criterion. Every review item is cataloged into Critical, Important, or Minor tier with confirmed file locations.

Workflow integration

Align review cadence with development workflows:

  • Subagent-driven development. Review after each task to catch issues before they compound.
  • Executing plans. Review after each batch of tasks, apply verified fixes, and proceed.
  • Ad-hoc development. Review before branch merges or whenever architectural doubts arise.

Phase 2. Evaluating and receiving feedback

Review comments represent hypotheses to evaluate, not unilateral commands to execute. Process every piece of feedback through deliberate verification.

Step 3. Feedback verification and pushback loop

Follow this six-step loop for every review item:

  1. Read. Process the entire review item without defensive or emotional reactions.
  2. Understand. Restate the core technical requirement in your own words.
  3. Verify. Inspect the codebase, git history, and tests to confirm whether the premise matches reality.
  4. Evaluate. Assess whether the proposed change is technically sound for this specific stack.
  5. Respond. Provide a factual technical response or reasoned pushback.
  6. Implement. Apply approved modifications one item at a time, running tests after each edit.

Completion criterion. All review comments verified against codebase truth, with ambiguous items clarified and grounded counter-arguments formulated where architecture is degraded.

Banned performative agreement

Never generate performative agreement, excessive gratitude, or subservient conversational fillers.

Strictly avoid phrases like these:

  • "You're absolutely right!"
  • "Great point!" or "Excellent catch!"
  • "Thanks for pointing that out!"
  • "Let me implement that right away!"

Respond instead with direct technical substance:

  • State the factual requirement or issue directly.
  • Point to the specific file and line under review.
  • Confirm the fix factually, such as "Fixed date validation in search.ts by rejecting non-ISO strings."
  • Jump directly to running tests and showing diffs. Actions carry authority over words.

Handling unclear items

Never guess intent or apply partial assumptions when review comments lack clarity.

Apply this clarification protocol:

  • Stop immediately when any item in a review list is ambiguous.
  • Do not implement clear items prematurely if ambiguous items may alter shared architecture.
  • State exactly which items are understood and ask targeted questions regarding the unclear items.
  • Resume implementation only after requirements are fully unambiguous.

Architectural integrity and counter-argument protocol

Protect system boundaries when suggestions violate Single Responsibility Principle, introduce tight coupling, or cause lifecycle mismatches:

  • Never accept anti-patterns to avoid interpersonal friction.
  • Check blast radius across modules. Verify whether the suggestion forces unrelated domains into a shared file or puts request-time logic into static initialization.
  • Ground counter-arguments in external consensus. Run targeted searches using official framework documentation or industry standards before responding.
  • Formulate a structured technical counter-argument. State the concrete tradeoff, cite the authoritative source, and propose a clean, decoupled alternative that satisfies the caller's true requirement.

YAGNI verification

Reviewers frequently recommend building speculative abstraction layers, extra configuration flags, or unused data exports.

Verify necessity using this process:

  1. Search the codebase for actual call sites using grep or file search tools.
  2. If the feature has zero active callers, reject the abstraction and propose removing dead code instead.
  3. If active callers exist, implement the minimum clean logic required to satisfy those callers without speculative generalizations.

Step 4. Surgical remediation and regression pass

Execute accepted review changes methodically to avoid compound regressions:

  • Clarify ambiguous items first before touching code.
  • Fix blocking and critical bugs first, including broken tests and security concerns.
  • Apply simple localized fixes second, such as typos, imports, or boundary checks.
  • Address complex refactorings and structural modifications last.
  • Test each fix individually. Run targeted test suites immediately after modifying each file.
  • Execute full test suites and linters after all items are resolved to confirm zero regressions.

Completion criterion. Accepted fixes implemented one by one, each verified by targeted test runs, followed by a clean full test suite pass.

Handling pushback and corrections

Navigate disagreements with technical facts:

  • When pushing back, reference test results, benchmark metrics, or architectural constraints rather than personal preference.
  • If you pushed back and later discover the reviewer was correct, acknowledge the facts directly without lengthy apologies.
  • State the verified finding plainly, such as "Verified the 10.15 backward compatibility requirement. Implementing the fallback branch now."

Review anti-patterns

Review these common pitfalls and their corrections:

Anti-patternCorrect practice
Performative agreementState technical facts directly or apply the fix
Blind implementationVerify suggestions against codebase truth first
Batching fixes without testingImplement one item at a time and test each
Assuming reviewer is always rightVerify if proposed changes break existing features
Avoiding pushbackPrioritize technical correctness over comfort
Partial implementationClarify ambiguous items before writing code
Speculative generalizationsCheck YAGNI by grepping for actual callers

Thread replies

Reply directly in the comment thread for inline GitHub pull request comments rather than submitting top-level PR comments. Keep all discussion tied to the relevant line diff.

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.