python-best-practices
Installation
SKILL.md
Python Best Practices
Use this skill when reviewing or writing Python code that needs human-style engineering judgment: code smells, hot-path performance issues, test quality, and robust failure handling.
How To Use This Skill
Start by identifying the kind of Python work in front of you, then read only the matching reference files.
- Read
references/anti-patterns.mdwhen reviewing general code quality, maintainability, architecture smells, configuration handling, resource usage, or type-safety issues. - Read
references/performance.mdwhen the code is latency-sensitive, CPU-heavy, memory-heavy, uses async execution, or appears to sit on a hot path. - Read
references/testing.mdwhen reviewing test code, coverage quality, fixtures, mocking strategy, parameterization, or the structure of a pytest suite. - Read
references/error-handling.mdwhen reviewing validation, exceptions, failure modes, batch processing, recovery behavior, or API/service robustness.
Load more than one reference when the change crosses concerns. Examples:
- API handlers often need both
references/error-handling.mdandreferences/testing.md. - Async services often need both
references/performance.mdandreferences/anti-patterns.md. - Refactors of business logic and persistence boundaries often need both
references/anti-patterns.mdandreferences/error-handling.md.