joabgonzalez/ai-agents-skills/code-review
Claude Code and agent skill by joabgonzalez/ai-agents-skills
- community
Checking that the SKILL.md file is still in the repository.
Two-stage code review: spec compliance then code quality. Trigger: When reviewing code for correctness and quality.
Install
npx vskill@latest install joabgonzalez/ai-agents-skills/code-reviewSKILL.md
The same SKILL.md was published earlier as joabgonzalez/ai-agents-skills/code-review.
Code Review
Two-stage code review: verify spec compliance FIRST, then assess code quality. Never reversed.
When to Use
- Reviewing pull requests or code submissions
- Validating implementation against requirements
- Providing structured feedback on code
- Ensuring spec compliance before quality assessment
Don't use for:
- General critical feedback on prompts/decisions (use critical-partner)
- Debugging errors (use systematic-debugging)
Critical Patterns
✅ REQUIRED: Two-Stage Review (NEVER Reversed)
Stage 1: Spec Compliance (MUST come first)
- Does code meet requirements?
- Are all acceptance criteria satisfied?
- Does behavior match specification?
Stage 2: Code Quality (ONLY after Stage 1 passes)
- Is code maintainable?
- Are best practices followed?
- Performance considerations?
Why this order?
- Spec = correctness (does it work?)
- Quality = maintainability (is it good?)
- No point reviewing quality if behavior is wrong
- Prevents wasting time on code that will be rewritten
✅ REQUIRED: File-by-File Analysis
Review each file separately with clear structure.
Benefits:
- Clear scope per file
- Easy to navigate review
- Prevents context switching
- Enables parallel fixes
✅ REQUIRED: Evidence-Based Feedback
Provide line numbers and specific examples.
try { await updateUser(id, data); } catch (error) { // Silent failure - user doesn't know what happened }
try { await updateUser(id, data); return { success: true }; } catch (error) { console.error('Failed to update user:', error); return { success: false, error: 'Unable to update user. Please try again.', }; }
Evidence includes:
- Line numbers (file.ts:34-38)
- Code snippets (what's wrong)
- Suggested fix (how to improve)
- Rationale (why it matters)
✅ REQUIRED: Stage 2 Quality Dimensions
Check these four dimensions when Stage 1 passes. Always cite file and line number.
Security (flag immediately — does not wait for Stage 2 order):
- Injections: SQL, NoSQL, command injection (parameterized queries? user input in queries?)
- XSS:
innerHTML/dangerouslySetInnerHTMLwith user input not sanitized - Auth: missing authentication checks, broken authorization, exposed credentials/secrets in code
- CSRF: missing tokens on state-changing endpoints
- Path traversal / SSRF: user-controlled file paths or URLs passed to
fetch/fs
Performance:
- N+1 queries: loops that trigger individual DB calls
- Algorithmic complexity: O(n²) or worse in hot paths (nested loops over unbounded data)
- Resource leaks: unclosed files, connections, streams, event listeners
- Unbounded operations: queries/loops without pagination or size limits
Correctness (beyond spec — catches runtime failures):
- Null/undefined/empty input: are edge cases handled before use?
- Off-by-one: array bounds, pagination offsets, inclusive/exclusive ranges
- Race conditions: shared mutable state, concurrent writes without locking
- Type coercion: implicit conversions that may produce
NaN,undefined, or"0"
Maintainability:
- Single responsibility: functions/classes doing more than one thing
- Test quality: tests are deterministic, independent, named descriptively
- Dead code / commented-out code: remove, don't archive in code
- Magic numbers/strings: extract to named constants
❌ NEVER: Review Quality Before Spec
If spec is not met, STOP. Do not proceed to quality review.
Decision Tree
Edge Cases
Spec is ambiguous: Flag ambiguity before review. Ask: "Spec says X, but could mean Y or Z. Which is correct?"
Partial implementation: Review completed parts only. Note: "Reviewed implemented features. Features X, Y not yet implemented."
Breaking changes: Check if intentional and documented. Flag unintentional breaks.
Performance regressions: If spec includes performance requirements, verify with benchmarks.
Security issues: Always flag security issues regardless of stage. Security > process.
Checklist
- [ ] Stage 1 (spec compliance) completed BEFORE Stage 2
- [ ] If spec fails, quality review SKIPPED
- [ ] Each file reviewed separately
- [ ] Line numbers provided for all issues
- [ ] Evidence-based feedback (code snippets + fixes)
- [ ] Recommendations prioritized (critical → high → medium → low)
- [ ] Security issues flagged immediately
- [ ] Breaking changes identified
- [ ] Test coverage assessed (if applicable)
Example
// Current (deprecated) const hashed = bcrypt.hashSync(password, 10);
// Recommended const hashed = await bcrypt.hash(password, 10);
// Current if (password.length < 8) throw new Error('Password too short');
// Recommended const MIN_PASSWORD_LENGTH = 8; if (password.length < MIN_PASSWORD_LENGTH) throw new ValidationError('Password too short');
/**
- Registers a new user with email and password
- @param email - User email address (validated)
- @param password - Plain text password (will be hashed)
- @returns User object without password
- @throws ConflictError if email already exists
- @throws ValidationError if input invalid
*/ export async function registerUser(email: string, password: string): Promise<User>
Resources
- output-format.md - Canonical output structure: verdict, self-contained findings, merge checklist
- critical-partner - General critical feedback
- code-conventions - Code standards and organization
- typescript - Type safety review
- systematic-debugging - Debugging methodology
- verification-protocol - Evidence-based verification
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-review/SKILL.md
Popularity
- Repository stars
- 9
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/joabgonzalez/ai-agents-skills/code-review)