Build and publish Python packages with uv and modern build tools. Covers uv build, uv publish, pyproject.toml, versioning, entry points, and PyPI publishing. Use when user mentions building packages, publishing to PyPI, uv build, uv publish, package distribution, or Python wheel/sdist creation.
View on GitHublaurigates/claude-plugins
python-plugin
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/laurigates/claude-plugins/blob/main/python-plugin/skills/python-packaging/SKILL.md -a claude-code --skill python-packagingInstallation paths:
.claude/skills/python-packaging/# Python Packaging
Quick reference for building and publishing Python packages with UV and modern build tools.
## When This Skill Applies
- Building Python packages (wheels, sdists)
- Publishing to PyPI or private indexes
- Package versioning
- Build system configuration
- Editable installations
## Quick Reference
### Building Packages
```bash
# Build package
uv build
# Build specific formats
uv build --wheel
uv build --sdist
# Output location: dist/
```
### Publishing
```bash
# Publish to PyPI
uv publish
# With token
uv publish --token $PYPI_TOKEN
# To Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/
```
### Package Structure
```
my-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│ └── my_package/
│ ├── __init__.py
│ ├── __version__.py
│ └── main.py
└── tests/
```
## pyproject.toml Configuration
```toml
[project]
name = "my-package"
version = "0.1.0"
description = "A great package"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "you@example.com"}
]
keywords = ["python", "package"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"requests>=2.31.0",
]
[project.optional-dependencies]
dev = ["pytest", "ruff", "mypy"]
[project.urls]
Homepage = "https://github.com/user/my-package"
Documentation = "https://my-package.readthedocs.io"
Repository = "https://github.com/user/my-package.git"
Issues = "https://github.com/user/my-package/issues"
[project.scripts]
my-cli = "my_package.cli:main"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
```
## Versioning
```toml
[project]
version = "0.1.0" # Manual versioning
# Dynamic versioning (from git tags)
dynamic = ["version"]
[tool.uv]
version-provider = "git"
```
## Entry Points
```toml
[project.scri