code-review
Comprehensive code review checklist. Use when asked to review code, PRs, pull requests, or before committing changes.
When & Why to Use This Skill
This Claude skill provides a comprehensive and automated code review checklist designed to enhance software quality across multiple languages including Go, Python, and C++. It streamlines the peer review process by focusing on DRY principles, error handling, resource management, and language-specific best practices, ensuring cleaner, more maintainable codebases before commits or PR merges.
Use Cases
- Pull Request Auditing: Automatically evaluate incoming PRs against a standardized checklist to ensure consistency and catch common bugs before they reach production.
- Pre-commit Self-Review: Developers can use the skill to scan their own changes locally using git diff to identify potential refactoring opportunities or missing error handling.
- Technical Debt Reduction: Analyze existing files to identify violations of DRY principles or overly complex functions that exceed recommended line counts.
- Cross-Language Quality Assurance: Apply specific linting and architectural rules for diverse stacks, such as checking goroutine safety in Go or PEP 8 compliance in Python.
| name | code-review |
|---|---|
| description | Comprehensive code review checklist. Use when asked to review code, PRs, pull requests, or before committing changes. |
| allowed-tools | Bash(git diff:*), Bash(git log:*), Bash(git show:*), Bash(gh:*), Bash(make lint:*), Read, Grep, Glob |
Code Review Skill
Key Focus Areas
Code Quality
- DRY (Don't Repeat Yourself): Extract duplicated code.
- Error Handling: Ensure proper error wrapping, propagation, and logging.
- Go: Do not log and bubble up (avoids duplicate logs).
- Resource Cleanup: Use
defer(Go) or RAII patterns (C++). - Clear Naming: meaningful names for functions and variables.
- Simplicity: Prioritize simple solutions over complex ones.
- Organization: Keep files concise (200-300 lines).
Language-Specific Checks
- Go: Goroutine safety, error handling, interface usage.
- Python: PEP 8, type hints.
- C++: RAII, const correctness.
- Protobuf: Backward compatibility.
Best Practices
- Be constructive and specific.
- Focus on significant issues, not nitpicks.
- Acknowledge good practices.