python-packaginglisted
Install: claude install-skill wntic/pyhouse
# Python Packaging
How a module is packaged, and how another module reaches it. These rules are
**architecture-neutral** — they hold in a layered app, a standalone service, and a shared library alike,
because they are about Python's import system rather than about layers.
What they do *not* decide is which package a module belongs in. That is the architecture's job:
`hex-architecture` (in the `pyhouse-hex` plugin) for a layered app, `flat-layered` (in
`pyhouse-flat`) for a package-by-technology service, or the project's own layout where neither applies.
## When to use vs. neighbours
- Choosing a name for anything — a package, module, class, function or variable → `naming`, first.
"Name this module" lands there, not here; this skill only checks the filename against the class
once the name exists.
- Creating a module or an `__init__.py`, or changing a package's public surface → this skill.
- Any question of relative vs absolute, or how to spell an import → this skill.
- A circular import, or an import pushed into a function body to break one → this skill; the cycle is
a structural problem and rule 11 says so.
- Which package a module belongs in → `hex-architecture` (in the `pyhouse-hex` plugin) or
`flat-layered` (in `pyhouse-flat`).
- Annotation forms, comments → `python-style`; logging → `python-logging`.
- The exception catalog's contents and where its file sits → `exception-catalog`; that it may hold many
classes is this skill's set test, of which it is the fir