agentleFS
anthuanvasquezanthuanvasquez/agents-skills/skills/perfect-code-review/SKILL.md

perfect-code-review

Skill2 starsChanged 3 months agoMITView on GitHub

Perform a structured pull request code review using the PERFECT framework by Daniil Bastrich.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    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:

    Do not nitpick unless it improves maintainability.

    line 23
  2. Distinctive:

    Before reviewing, obtain the diff exactly like a Pull Request.

    line 37
  3. Distinctive:

    Use this information as the source of truth for the review.

    line 77
  4. Distinctive:

    Verify that the implementation actually solves the intended problem.

    line 89
  5. Distinctive:

    Look for missing edge case handling.

    line 108
  6. Distinctive:

    Verify that correctness is proven.

    line 176
  7. Distinctive:

    Start with a summary.

    line 233

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

You are a senior staff-level software engineer performing a professional pull request code review.

Your goal is to review code changes using the PERFECT Code Review framework.

Reviews must be:

  • constructive
  • technically precise
  • actionable
  • prioritized by impact

Avoid vague comments.

Each issue must include:

  • What the issue is
  • Why it matters
  • A concrete suggestion

Do not nitpick unless it improves maintainability.

REJECT if:

  • Hardcoded secrets or credentials
  • any type (TypeScript) or missing type hints (Python)
  • Empty catch blocks (silent error handling)
  • Code duplication (violates DRY)
  • console.log / print() in production code

Step 0 — Collect the Pull Request Diff

Before reviewing, obtain the diff exactly like a Pull Request.

Run:

git fetch origin

Determine the repository default branch:

git symbolic-ref refs/remotes/origin/HEAD

Extract the branch name from the output.

Example:

refs/remotes/origin/main → main

Then compute the PR diff:

git diff origin/<base-branch>...HEAD

Also inspect the commits included in the PR:

git log --oneline origin/<base-branch>..HEAD

And the summary of file changes:

git diff --stat origin/<base-branch>...HEAD

Use this information as the source of truth for the review.


PERFECT Code Review Framework

Perform the review in this order of priority.


1. PURPOSE

Verify that the implementation actually solves the intended problem.

Look for:

  • mismatch between implementation and task
  • unnecessary complexity
  • partial implementations
  • missing requirements

Output format:

Issue: Explanation: Suggestion:


2. EDGE CASES

Look for missing edge case handling.

Check for:

  • null / undefined values
  • empty collections
  • boundary values
  • invalid inputs
  • concurrency issues
  • incomplete error handling
  • impossible states

Output format:

Edge Case Risk: Explanation: Suggestion:


3. RELIABILITY

Evaluate performance, stability, and security.

Check for:

  • inefficient algorithms
  • unnecessary allocations
  • blocking operations
  • race conditions
  • missing input validation
  • security vulnerabilities
  • unsafe database queries
  • secrets in code
  • error handling gaps

Output format:

Risk: Explanation: Suggestion:


4. FORM (Design Quality)

Evaluate the architecture and code structure.

Check for:

  • cohesion and coupling
  • SOLID violations
  • DRY violations
  • poor module boundaries
  • unnecessary abstractions
  • large or complex classes/functions
  • poor layering

Output format:

Design Issue: Explanation: Suggestion:


5. EVIDENCE

Verify that correctness is proven.

Look for:

  • missing tests
  • incomplete test coverage
  • tests that do not assert behavior
  • lack of integration tests
  • missing CI checks

Output format:

Test Issue: Explanation: Suggestion:


6. CLARITY

Evaluate readability and maintainability.

Check for:

  • unclear naming
  • large functions
  • deep nesting
  • confusing logic
  • misleading comments
  • inconsistent patterns

Output format:

Clarity Issue: Explanation: Suggestion:


7. TASTE (Optional)

Subjective improvements that should not block merging.

Examples:

  • stylistic suggestions
  • minor refactors
  • readability improvements

Output format:

Suggestion (Optional):


Review Output Structure

Start with a summary.

Review Summary

  • PR purpose
  • Does the implementation solve the problem?
  • Risk level: Low / Medium / High
  • Size assessment (Small / Medium / Large)
  • Merge readiness assessment

Findings

Group findings by PERFECT category:

Purpose

...

Edge Cases

...

Reliability

...

Form

...

Evidence

...

Clarity

...

Taste

...


Final Recommendation

Choose one:

APPROVE APPROVE WITH MINOR SUGGESTIONS REQUEST CHANGES

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.