This skill should be used when performing a "code review", "PR review", "review pull request", or evaluating implementation quality. Provides a two-stage process: Stage 1 checks spec compliance (does it do what was designed?), Stage 2 checks quality (is the code good?). Includes C/I/M severity classification. Do not use for design reviews or requirements reviews.
From forgenpx claudepluginhub flox/forge-plugin --plugin forgeThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
A two-stage code review process that prevents wasted effort and improves review quality. Stage 1 validates spec compliance before Stage 2 examines code quality.
Problem with unstructured review:
Two-stage solution:
If Stage 1 fails, stop and address spec issues before quality review.
Goal: Verify PR matches requirements and design.
Requirements Alignment:
Design Alignment:
Test Coverage Alignment:
Deliverable Completeness:
If compliant:
## Stage 1: Spec Compliance ✅
- Requirements: Aligned with specified criteria
- Design: Follows architecture from design.md
- Testing: All test types from strategy present
- Completeness: All ticket tasks addressed
Proceeding to Stage 2 (Quality Review).
If non-compliant:
## Stage 1: Spec Compliance ❌
Non-compliance issues (must fix before quality review):
1. Missing functionality: Requirement calls for version
validation, but code only checks format, not values
2. Design mismatch: Design specified using existing Error
type, but PR creates new error types
3. Test gap: Design called for integration tests, but
only unit tests present
Action required: Address spec issues before re-requesting
review. Quality review will begin once spec compliance is
achieved.
Key principle: Don't proceed to Stage 2 if Stage 1 fails. Spec compliance issues are blocking.
Goal: Verify implementation is maintainable, secure, and follows best practices.
Only start Stage 2 after Stage 1 passes.
Code Structure:
Error Handling:
Security:
Performance:
Maintainability:
Assign severity to each quality issue for clear prioritization.
Criteria: Security vulnerability, data loss risk, or production-breaking bug.
Examples:
Action: Block merge until fixed.
Criteria: Significant maintainability issue, performance problem, or deviation from established patterns.
Examples:
Action: Fix before merge, or create follow-up ticket if truly can't fix now (rare).
Criteria: Cosmetic issue, stylistic preference, or micro-optimization.
Examples:
Action: Optional fix. Can address or defer. Doesn't block merge.
## Stage 2: Code Quality
### Critical Issues (Must Fix) - 0
None found.
### Important Issues (Should Fix) - 2
**I1: Missing error handling for API timeout**
Location: src/api/client.py:45
Severity: Important
Issue: HTTP client doesn't handle timeout, will hang
Recommendation: Add timeout, return clear error
**I2: Query in loop (N+1 problem)**
Location: src/handlers/list.py:78
Severity: Important
Issue: Fetches record for each item in loop
Recommendation: Fetch all records in single query
### Minor Issues (Nice to Have) - 1
**M1: Variable naming**
Location: src/utils/parse.py:12
Severity: Minor
Issue: Variable `x` could be named `manifest_version`
Recommendation: Rename for clarity (optional)
---
Overall: 2 Important issues block merge. Please address
before approval.
Before reviewing code:
requirements.md (what we're building)design.md (how we're building it)Review order:
Decision point:
Only if Stage 1 passed.
Review order:
Use structured format:
## Code Review: {PR Title}
### Stage 1: Spec Compliance
[✅ Pass / ❌ Fail]
{Details}
### Stage 2: Code Quality
[Only if Stage 1 passed]
Critical: {count}
Important: {count}
Minor: {count}
{Detailed issues with severity labels}
---
Decision: [Approve / Request Changes]
Reason: {Why}
❌ Bad:
Review focuses on code style, variable names, function
structure. Near end: "Wait, this doesn't implement the
key requirement at all!" All prior feedback is wasted.
✅ Good:
First check: Does this match requirements and design?
If no: Stop, request spec fixes.
If yes: Then review code quality.
❌ Bad:
"Minor issue: SQL injection vulnerability"
✅ Good:
"CRITICAL: SQL injection vulnerability in user input
handling" (correct severity, blocks merge)
code-reviewer AgentWhen reviewing a PR:
Before requesting review:
Self-review Stage 1:
Self-review Stage 2:
| Stage | Focus | Blocking? | Output |
|---|---|---|---|
| Stage 1 | Spec compliance | Yes | ✅ Pass / ❌ Fail |
| Stage 2 | Code quality | Severity-dependent | C/I/M issues |
Key principles: