From python-plugin
Deep guidance for publishing Python packages to PyPI. Use when preparing a release, configuring `[project]` metadata for distribution, building wheels with `uv build`, publishing with `uv publish`, setting up Trusted Publishers / OIDC in GitHub Actions, picking version bump strategy, dealing with name collisions, or recovering from a botched release. Pairs with the unified `python` skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/python-plugin:python-pypiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use uv for build + publish. No twine, no flit-publish, no setup.py
Use uv for build + publish. No twine, no flit-publish, no setup.py upload.
pyproject.toml must declare:
[project]
name = "your-package" # PyPI-unique; check availability first
version = "0.1.0" # PEP 440
description = "..." # one line, shown on PyPI listing
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "...", email = "..." }]
keywords = ["..."]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.urls]
Homepage = "https://github.com/owner/repo"
Source = "https://github.com/owner/repo"
Issues = "https://github.com/owner/repo/issues"
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
uv build # writes wheel + sdist to dist/
ls dist/ # sanity-check filenames
unzip -l dist/*.whl # eyeball wheel contents
uv publish # reads UV_PUBLISH_TOKEN or --token
Get a project-scoped token at https://pypi.org/manage/account/token/.
Store as UV_PUBLISH_TOKEN in your shell, never commit.
jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv build
- run: uv publish --trusted-publishing always
No tokens, no secrets. OIDC handshake authenticates the runner.
[project].version and tag the commit vX.Y.Z.MAJOR.MINOR.PATCH. Pre-releases: 0.1.0a1, 0.1.0rc1.bumpver or hatch version if manual bumping gets tedious.PyPI names are globally unique and case-insensitive. Check availability before you write the package:
curl -s https://pypi.org/pypi/<name>/json | head -c 200
If 404 the name is free. Common collision: anything resembling a
well-known framework. Pick a distinctive prefix
(<org>-<thing>, claude-<thing>).
pypi.org -> Manage -> Yank)
and publish a clean bump. Yank ≠ delete; the file remains downloadable
for users who pinned it.uv build succeeds, wheel + sdist look right.uv run python -m pytest green.uv run python -m mypy green.python -m readme_renderer).v<version>.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub cjhowe-us/marketplace --plugin python-plugin