build-python-library

Installation
SKILL.md

Build Python Library

Implements pip-installable Python libraries by scaffolding the project structure, building core abstractions with adapters, and verifying each module with pytest before proceeding.

Workflow

  1. Scaffold the project — create src layout, pyproject.toml, package structure, and py.typed marker. See SCAFFOLDING.md.
  2. Define the public API — write __init__.py with explicit exports and __all__. Only types and functions users need. See SCAFFOLDING.md.
  3. Implement core abstractions — build protocols/ABCs, data classes, and shared types that all concrete implementations depend on. See PATTERNS.md.
  4. Test core abstractions — write pytest tests for core types and protocols. Run pytest and verify zero failures before proceeding. See TESTING.md.
  5. Implement concrete modules — build one module at a time (proxy wrappers, provider clients, adapters). See PATTERNS.md.
  6. Test each module before the next — write tests for the module just implemented. Run pytest and verify zero failures before starting the next module. See TESTING.md.
  7. Install and verify — run pip install -e ".[dev]" and verify the package imports correctly from a clean script. See TESTING.md.
  8. Run full test suite — run pytest -v and verify all tests pass, then run python -c "from packagename import ..." to verify public API. See TESTING.md.

Self-review checklist

Before delivering, verify ALL:

Installs
1
GitHub Stars
5
First Seen
Oct 3, 2026