agentleFS
hoangNguyenAngelhackhoangNguyenAngelhack/ai-agent-setup/.claude/skills/code-review/SKILL.md

Code Review & Quality

Skill3 starsChanged 6 months agoMITView on GitHub

Five-axis code review for comprehensive quality assessment

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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 tests verify the claimed behavior?

    line 31
  2. Distinctive:

    Do dependencies flow in the right direction?

    line 60
  3. Distinctive:

    Use prefixes to clarify intent:

    line 118

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Code Review & Quality Skill

Philosophy

"Approve a change when it definitely improves overall code health, even if it isn't perfect."

Progress over perfection. Continuous incremental improvement.


Five-Axis Review Framework

Axis 1: Correctness

Questions to ask:

  • Does the implementation match the specification?
  • Are edge cases handled?
  • Are error paths covered?
  • Are there potential runtime issues?
    • Off-by-one errors
    • Race conditions
    • Null/undefined access
    • Resource leaks

Test adequacy:

  • Do tests verify the claimed behavior?
  • Are negative cases tested?
  • Would a bug slip through?

Axis 2: Readability & Simplicity

Questions to ask:

  • Can another engineer understand this without explanation?
  • Are names clear and descriptive?
  • Is control flow straightforward?
  • Is the code organized logically?

Complexity checks:

  • Deep nesting (> 3 levels)?
  • Long functions (> 30 lines)?
  • Clever tricks that obscure intent?
  • Unnecessary abstractions?

Axis 3: Architecture

Questions to ask:

  • Does this follow existing patterns in the codebase?
  • Are module boundaries respected?
  • Is there code duplication that should be extracted?
  • Is the abstraction level appropriate?
  • Do dependencies flow in the right direction?

Over-engineering checks:

  • Is this simpler than it needs to be?
  • Are there abstractions "for future use"?
  • Would a simpler approach work?

Axis 4: Security

Input validation:

  • Is user input validated and sanitized?
  • Are queries parameterized?
  • Is output properly encoded?

Authentication & Authorization:

  • Are auth checks in place?
  • Is ownership verified for resources?
  • Are permissions enforced?

Secrets management:

  • No hardcoded secrets?
  • Sensitive data excluded from logs?
  • External data treated as untrusted?

Axis 5: Performance

Common issues:

  • N+1 query patterns?
  • Unbounded operations (loops, queries)?
  • Missing pagination?
  • Unnecessary re-renders (React)?
  • Objects created in hot paths?
  • Missing indexes for queries?

Async handling:

  • Are async operations properly awaited?
  • Could operations be parallelized?

Change Sizing Guidelines

SizeLinesGuidance
Ideal~100Easy to review thoroughly
Acceptable~300Requires focused review
Too Large1000+Split into smaller PRs

Each PR should be one logical change, not an entire feature.


Comment Severity Labels

Use prefixes to clarify intent:

LabelMeaningAction Required
(none)Required changeMust fix before merge
Critical:Merge blockerMust fix before merge
Nit:Minor/styleOptional, author's choice
Optional:SuggestionConsider, not required
FYI:InformationalNo action needed

Examples:

Critical: This allows SQL injection via the `name` parameter.

Nit: Consider renaming `data` to `userData` for clarity.

Optional: You could use `Array.from()` here instead of spread.

FYI: We have a shared utility for this in `src/utils/format.ts`.

Review Process

Step 1: Understand Context

  • What is this PR trying to achieve?
  • Is there a linked issue or spec?
  • What's the scope of changes?

Step 2: Review Tests First

Tests reveal:

  • What behavior is expected
  • What edge cases are considered
  • Whether coverage is adequate

Step 3: Examine Implementation

Walk through changes with the 5 axes in mind.

Step 4: Categorize Findings

  • Must fix — Correctness, security, critical bugs
  • Should fix — Readability, architecture concerns
  • Consider — Suggestions, style preferences

Step 5: Provide Actionable Feedback

❌ "This is confusing"

✅ "This nested conditional is hard to follow. Consider extracting 
    the inner logic to a named function like `isEligibleForDiscount()`"

Review Output Format

## Review: [PR Title]

### Summary
[1-2 sentences on overall assessment]

### Critical Issues
- **[file:line]** [Issue description]

### Important
- **[file:line]** [Issue description]

### Suggestions
- **[file:line]** [Suggestion]

### Verdict
- [ ] Approve
- [ ] Request changes
- [ ] Needs discussion

Rules

  • Don't accept "I'll clean it up later" — It won't happen
  • Remove dead code — Don't comment it out
  • Review within 1 business day — Faster is better
  • Be kind, not nice — Honest feedback helps everyone
  • One approval minimum — Before any merge

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.