python-best-practices
Installation
SKILL.md
Python Best Practices
Priority: P1 (HIGH)
Rules
- Prefer small focused functions over long stateful procedures.
- Push parsing, formatting, transport, and persistence into separate helpers.
- Return early on invalid or terminal states.
- Pass collaborators in; do not hide them behind globals or import-time singletons.
- Keep naming literal and domain-specific.
Recipe
- Split orchestration from transformation.
- Extract repeated shape cleanup into one helper.
- Keep side effects at edges and pure decisions in the middle.
- Use fakes in tests instead of patching deep internal chains when possible.