Code review

From fdhhhdjd/Class-AI-Agent · View interactive version

Code review is an AI agent skill from the GitHub repository fdhhhdjd/Class-AI-Agent. Five-axis code review for comprehensive quality assessment

How to use this skill

Skill file

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:

Test adequacy:


Axis 2: Readability & Simplicity

Questions to ask:

Complexity checks:


Axis 3: Architecture

Questions to ask:

Over-engineering checks:


Axis 4: Security

Input validation:

Authentication & Authorization:

Secrets management:


Axis 5: Performance

Common issues:

Async handling:


Change Sizing Guidelines

| Size | Lines | Guidance |

|------|-------|----------|

| Ideal | ~100 | Easy to review thoroughly |

| Acceptable | ~300 | Requires focused review |

| Too Large | 1000+ | Split into smaller PRs |

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


Comment Severity Labels

Use prefixes to clarify intent:

| Label | Meaning | Action Required |

|-------|---------|-----------------|

| (none) | Required change | Must fix before merge |

| Critical: | Merge blocker | Must fix before merge |

| Nit: | Minor/style | Optional, author's choice |

| Optional: | Suggestion | Consider, not required |

| FYI: | Informational | No 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

Step 2: Review Tests First

Tests reveal:

Step 3: Examine Implementation

Walk through changes with the 5 axes in mind.

Step 4: Categorize Findings

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.