code-review

jcdoll's avatarfrom jcdoll

Reviews code for quality, security, and maintainability. Use after implementing features, completing significant work, or when user asks for code review.

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the code review process by analyzing source code for quality, security, and maintainability. It leverages tools like git diff and grep to identify changes, providing structured feedback on security vulnerabilities, Python-specific best practices, and test coverage to ensure robust and clean codebases. By integrating automated checks for credentials, input validation, and architectural standards, it helps developers maintain high engineering excellence and reduce technical debt.

Use Cases

  • Pre-merge Quality Assurance: Automatically review new feature implementations or significant refactors to ensure they meet project standards before merging into the main branch.
  • Security Vulnerability Scanning: Identify exposed API keys, unsanitized file paths, or potential injection points during the development phase to prevent security breaches.
  • Python Best Practices Enforcement: Ensure code consistency by checking for type hints, proper exception handling, and adherence to modern Pythonic conventions like f-strings and context managers.
  • Automated Testing Validation: Verify that new functionality includes adequate test coverage and that edge cases or error conditions are properly addressed in the test suite.
  • Technical Debt Identification: Use the structured feedback to find code duplication, complex logic requiring comments, or unused imports that clutter the codebase.
namecode-review
descriptionReviews code for quality, security, and maintainability. Use after implementing features, completing significant work, or when user asks for code review.
allowed-toolsRead, Grep, Glob, Bash

Code Review

Instructions

  1. Run git diff to identify changed files
  2. Read modified files to understand the intent of changes
  3. Review against the checklist below
  4. Provide structured feedback organized by priority

Review Checklist

Security

  • No exposed credentials, API keys, or secrets
  • Input validation implemented where needed
  • File paths are sanitized (no path traversal)
  • External commands are safely constructed (no injection)

Code Quality

  • Variables and functions are clearly named
  • Functions have single responsibility
  • No code duplication (DRY principle)
  • Complex logic has explanatory comments
  • Error handling is comprehensive
  • No unused imports or variables
  • Clean separation of concerns

Python Specific

  • Type hints used appropriately
  • Exceptions are specific (not bare except:)
  • Context managers used for resources
  • f-strings preferred over .format() or %

Testing

  • New functionality has test coverage
  • Edge cases are tested
  • Error conditions are tested
  • Tests are readable and maintainable

Project Standards

  • Code passes ruff linting
  • No legacy wrappers or thin compatibility layers
  • No "last updated" dates or copyright headers

Output Format

Organize feedback by severity:

Critical (must fix)

  • Security issues
  • Bugs that will cause failures
  • Include specific line numbers and suggested fixes

Warnings (should fix)

  • Code quality issues
  • Missing error handling
  • Potential edge cases
  • Include rationale and improvement suggestions

Suggestions (consider)

  • Style improvements
  • Minor optimizations
  • Include brief explanation of benefit