Agent skill · software engineering · github
python-pypi-package-builder
End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI. Covers all four build backends (setuptools+setuptools_scm, hatchling, flit, poetry), PEP 440 versioning, semantic versioning, dynamic git-tag versioning, OOP/SOLID design, type hints (PEP 484/526/544/561), Trusted Publishing (OIDC), and the full PyPA packaging flow. Use for: creating Python packages, pip-installable SDKs, CLI tools, framework plugins, pyproject.toml setup, py.typed, setuptools_scm, semver, mypy, pre-commit, GitHub Actions CI/CD, or PyPI publishing.
Why this skill is useful
Adds a scaffold script and detailed workflows for building and publishing Python packages that the AI cannot generate on its own.
What it needs
Requires python installed locally. Requires pypi account access. About 10k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Python PyPI Package Builder Skill A complete, battle-tested guide for building, testing, linting, versioning, typing, and publishing a production-grade Python library to PyPI — from first commit to community-ready release. AI Agent Instruction: Read this entire file before writing a single line of code or creating any file. Every decision — layout, backend, versioning strategy, patterns, CI — has a decision rule here. Follow the decision trees in order. This skill applies to any Python package type (utility, SDK, CLI, plugin, data library). Do not skip sections. --- Quick Navigation Section in this file What it covers --- --- 1. Skill Trigger When to load this skill 2. Package Type Decision Identify what you are building 3. Folder Structure Decision src/ vs flat vs monorepo 4. Build Backend Decision setuptools / hatchling / flit / poetry 5. PyPA Packaging Flow The canonical publish pipeline 6. Project Structure Templates Full layouts for every option 7. Versioning Strategy PEP 440, semver, dynamic vs static Reference file What it covers --- --- references/pyproject-toml.md All four backend templates, setuptoolsscm, py.typed, tool configs references/library-patterns.md OOP/SOLID, type hints, core class design, factory, protocols, CLI references/testing-quality.md conftest.py, unit/backend/async tests, ruff/mypy/pre-commit references/ci-publishing.md ci.yml, publish.yml, Trusted Publishing, TestPyPI, CHANGELOG, release checklist references/community-docs.md README, docstrings, CONTRIBUTING, SECURITY, anti-patterns, master checklist references/architecture-patterns.md Backend system (plugin/strategy), config layer, transport layer, CLI, backend injection references/versioning-strategy.md PEP 440, SemVer, pre-release, setuptoolsscm deep-dive, flit static, decision engine references/release-governance.md Branch strategy, branch protection, OIDC, tag author validation, prevent invalid tags references/tooling-ruff.md Ruff-only setup (replaces black/isort), mypy config, pre …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/python-pypi-package-builder