occam-pythonlisted
Install: claude install-skill stephenoffer/occam
# Python
Tie choices to the project's supported versions and tools. Inspect `pyproject.toml`, lockfiles, packaging, interpreter versions, CI, and the established formatter, linter and type checker, then reuse the existing environment. Don't migrate tooling or raise the Python version to express a preference, or install a stack that isn't established.
## What goes wrong most
These failed in real runs, with or without it:
- **New module names.** `random.py`, `email.py` or `logging.py` beside a script shadows the standard library and breaks that script.
- **Partial splits.** Asked to break a module up, moving a third isn't done. Say what stayed and why.
- **Audits that trust tests.** A test asserting only on a mock can stay green when behavior breaks. Report it.
- **Notebooks.** Only a fresh kernel running top to bottom verifies one.
## Style and structure
Follow PEP 8, PEP 257 and the repository's public API conventions, sensibly. Avoid unnecessary metaclasses, decorators, dynamic attributes, import tricks, and classes wrapping stateless functions.
## Types
Type meaningful interfaces and data boundaries with the project's chosen checker. Avoid both untyped public contracts and ornate generics that add nothing. An annotation isn't input validation or a security check: data crossing a trust boundary still needs validating at runtime.
## Values and state
Watch for these common defects:
- Mutable default arguments and accidental aliasing. Know whether you need a shallow