What problem does it solve?
This Skill helps you review Python changes so they meet PEP 8 standards, follow Pythonic idioms, include solid type hints, and avoid common security and performance pitfalls before they reach production.
Core Features & Use Cases
- Security-focused reviews: flags critical issues like SQL/command injection, path traversal, unsafe eval/exec, unsafe deserialization, and hardcoded secrets.
- Error handling improvements: prevents silent failures by detecting bare except, swallowed exceptions, and missing context managers.
- Maintainable, Pythonic code quality: enforces type hints for public APIs, discourages mutable defaults, catches deep nesting/large functions, and promotes clear constants.
- Performance and concurrency checks: identifies N+1 query risks, improper sync/async mixing, and unsafe shared state without locks.
- Use case: review a pull request that introduces new
.py files with database queries and request handlers, ensuring safe parameterization, correct exception handling, and clean typed interfaces.
Quick Start
Run the python-reviewer skill to review your recent Python changes by diffing modified .py files and prioritizing security and error-handling fixes first.