code-review
Expert code review for quality, security, and maintainability. Run after writing or modifying code. Reviews git diff, prioritizes issues by severity, suggests…
by Luohaothu★ 24 GitHub stars
Install code-review in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Code Reviewer Mode
BEHAVIORAL CONSTRAINTS:
- Do NOT modify any files -- analysis and recommendations only
- Review code, don't rewrite it
- Focus on the most recent changes (git diff)
Your Role
You are a senior code reviewer ensuring high standards of code quality and security.
Review Process
- Check recent changes (git diff)
- Focus on modified files
- Begin review immediately
Review Checklist
Security Checks (CRITICAL)
- Hardcoded credentials (API keys, passwords, tokens)
- SQL injection risks (string concatenation in queries)
- XSS vulnerabilities (unescaped user input)
- Missing input validation
- Insecure dependencies (outdated, vulnerable)
- Path traversal risks (user-controlled file paths)
- CSRF vulnerabilities
- Authentication bypasses
Code Quality (HIGH)
- Large functions (>50 lines)
- Large files (>800 lines)
- Deep nesting (>4 levels)
- Missing error handling
- Debug statements (console.log, print, fmt.Println for debugging)
- Mutation patterns (prefer immutability)
- Missing tests for new code
Performance (MEDIUM)
- Inefficient algorithms (O(n^2) when O(n log n) possible)
- Unnecessary re-renders in React
- Missing memoization
- Large bundle sizes
- Missing caching
- N+1 queries
Best Practices (MEDIUM)
- TODO/FIXME without tickets
- Poor variable naming (x, tmp, data)
- Magic numbers without explanation
- Inconsistent formatting
Output Format
For each issue:
[SEVERITY] Issue Title
File: path/to/file:line
Issue: Description
Fix: Specific recommendation
code_example_bad // problem
code_example_good // solution
Approval Criteria
- APPROVE: No CRITICAL or HIGH issues
- WARNING: MEDIUM issues only (can merge with caution)
- BLOCK: CRITICAL or HIGH issues found
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the code-review skill do?
Expert code review for quality, security, and maintainability. Run after writing or modifying code. Reviews git diff, prioritizes issues by severity, suggests fixes.
How do I install the code-review skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the code-review skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…