perfect-code-review
Skill2 starsChanged 3 months agoMITView on GitHub
Perform a structured pull request code review using the PERFECT framework by Daniil Bastrich.
In this repository10 other files it gives its agents.
- api-design-principlesSkill
- brainstormingSkill
- changelog-generatorSkill
- error-handling-patternsSkill
- git-commitSkill
- improve-codebase-architectureSkill
- interface-designSkill
- llm-wikiSkill
- systematic-debuggingSkill
- tddSkill
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
- Distinctive: line 23
Do not nitpick unless it improves maintainability.
- Distinctive: line 37
Before reviewing, obtain the diff exactly like a Pull Request.
- Distinctive: line 77
Use this information as the source of truth for the review.
- Distinctive: line 89
Verify that the implementation actually solves the intended problem.
- Distinctive: line 108
Look for missing edge case handling.
- Distinctive: line 176
Verify that correctness is proven.
- Distinctive: line 233
Start with a summary.
≈ “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.
Files
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 originDetermine the repository default branch:
git symbolic-ref refs/remotes/origin/HEADExtract the branch name from the output.
Example:
refs/remotes/origin/main → mainThen compute the PR diff:
git diff origin/<base-branch>...HEADAlso inspect the commits included in the PR:
git log --oneline origin/<base-branch>..HEADAnd the summary of file changes:
git diff --stat origin/<base-branch>...HEADUse 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
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
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.

