Agent skill · Design & Presentation

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.

GitHub68,948★ · +463/wk · 2 repos on radarProfile →
copilotships scriptsMIT
Install
npx skills add github/awesome-copilot --skill python-pypi-package-builder --agent copilot

Same command for any agent — swap --agent for claude-code, codex, cursor.

Facts
Files in the skill folder: 11
SKILL.md size: 18 KB
Bundled scripts: yes
Path: skills/python-pypi-package-builder/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 37,432 · +281 this week
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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](#1-skill-trigger) | When to load this skill | | [2. Package Type Decision](#2-package-type-decision) | Identify what you are building | | [3. Folder Structure Decision](#3-folder-structure-decision) | src/ vs flat vs monorepo | | [4. Build Backend Decision](#4-build-backend-decision) | setuptools / hatchling / flit / poetry | | [5. PyPA Packaging Flow](#5-pypa-packaging-flow) | The canonical publish pipeline | | [6. Project Structure Templates](#6-project-structure-templates) | Full layouts for every option | | [7.

What's inside
Steps it walks through
  1. Quick Navigation
  2. 1. Skill Trigger
  3. 2. Package Type Decision
  4. Decision Table
  5. Package Naming Rules
  6. 3. Folder Structure Decision
  7. Decision Tree
  8. Quick Rule Summary
  9. 4. Build Backend Decision
  10. Backend Comparison
  11. 5. PyPA Packaging Flow
  12. Key PyPA Concepts
  13. 6. Project Structure Templates
  14. A. src/ Layout (Recommended default for new projects)
Ships with 10 files
  • references/architecture-patterns.md
  • references/ci-publishing.md
  • references/community-docs.md
  • references/library-patterns.md
  • references/pyproject-toml.md
  • references/release-governance.md
  • references/testing-quality.md
  • references/tooling-ruff.md
  • references/versioning-strategy.md
  • scripts/scaffold.py
Commands it runs
How it works:
git tag v1.0.0          →  installed version = 1.0.0
git tag v1.1.0          →  installed version = 1.1.0
In code — NEVER hardcode when using setuptools_scm:
from importlib.metadata import version, PackageNotFoundError
__version__ = version("your-package")
except PackageNotFoundError:
__version__ = "0.0.0-dev"    # Fallback for uninstalled dev checkouts
git add CHANGELOG.md
git commit -m "chore: prepare release vX.Y.Z"
More from awesome-copilot
All skills →
About this skill
What does the python-pypi-package-builder skill do?

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.

How do I install it?

Run `npx skills add github/awesome-copilot --skill python-pypi-package-builder --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going