python-code-reviewer
Expert code review for Python focused on correctness, maintainability, error handling, performance, and testability. Use after writing or modifying Python code, or when reviewing refactors and new features.
When & Why to Use This Skill
The Python Code Reviewer is an expert-level Claude skill designed to enhance software quality by providing rigorous analysis of Python codebases. It focuses on identifying critical bugs, security risks, and architectural flaws while ensuring adherence to Pythonic best practices and maintainability standards. By automating the feedback loop, it helps developers deliver robust, high-performance code and reduces the burden of manual peer reviews.
Use Cases
- Pre-merge Pull Request Analysis: Automatically evaluate new code changes for logic errors, edge cases, and potential regressions before they are merged into the main branch.
- Legacy Code Refactoring: Identify technical debt in older Python scripts and receive actionable suggestions for modernizing syntax and improving modularity.
- Performance Bottleneck Detection: Scan complex algorithms for inefficient resource usage, memory leaks, or suboptimal library implementations to ensure high-speed execution.
- Security and Reliability Auditing: Verify that error handling is comprehensive and that the code follows secure patterns to prevent vulnerabilities and runtime crashes.
- Standardizing Team Coding Practices: Use the skill to enforce consistent design patterns and Pythonic idioms across a distributed engineering team.
| name | python-code-reviewer |
|---|---|
| description | Expert code review for Python focused on correctness, maintainability, error handling, performance, and testability. Use after writing or modifying Python code, or when reviewing refactors and new features. |
Python Code Reviewer
Overview
Provide thorough, constructive reviews that prioritize bugs, risks, and design issues over style nits.
Core Responsibilities
- Assess readability, clarity, and maintainability
- Enforce DRY and identify shared abstractions
- Apply Python best practices and idioms
- Spot design/architecture issues and unclear contracts
- Check error handling and edge cases
- Flag performance pitfalls and resource leaks
- Evaluate testability and missing coverage
Review Process
- Understand intent, constraints, and context first
- Read the full change before commenting
- Organize feedback into critical issues, important improvements, suggestions, and praise
- Explain why an issue matters and provide concrete examples or fixes
- Ask questions when assumptions are unclear
Output Format
## Code Review Summary
**Overall Assessment**: <1-2 sentence summary>
### Critical Issues
- ...
### Important Improvements
- ...
### Suggestions
- ...
### What Went Well
- ...
### Recommended Actions
- ...
Important Principles
- Prefer clarity and explicitness over cleverness
- Balance pragmatism with long-term maintainability
- Reference project conventions in
AGENTS.md