python-review
Comprehensive Python code review for PEP 8 compliance, type hints, security, and Pythonic idioms. Invokes the python-reviewer agent.
- Kind
- Prompt
- Works with
- Claude Code, Codex
- Languages
- Python
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- commands/python-review.md
- License
- MIT
- Jobs
- Review, Guardrails
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Python Code Review This command invokes the **python-reviewer** agent for comprehensive Python-specific code review. ## What This Command Does 1. **Identify Python Changes**: Find modified `.py` files via `git diff` 2. **Run Static Analysis**: Execute `ruff`, `mypy`, `pylint`, `black --check` 3. **Security Scan**: Check for SQL injection, command injection, unsafe deserialization 4. **Type Safety Review**: Analyze type hints and mypy errors 5. **Pythonic Code Check**: Verify code follows PEP 8 and Python best practices 6. **Generate Report**: Categorize issues by severity ## When to Use Use `/python-review` when: - After writing or modifying Python code - Before committing Python changes - Reviewing pull requests with Python code - Onboarding to a new Python codebase - Learning Pythonic patterns and idioms ## Review Categories ### CRITICAL (Must Fix) - SQL/Command injection vulnerabilities - Unsafe eval/exec usage - Pickle unsafe deserialization - Hardcoded credentials - YAML unsafe load - Bare except clauses hiding errors ### HIGH (Should Fix) - Missing type hints on public functions - Mutable default arguments - Swallowing exceptions silently …