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.
/plugin marketplace add laurigates/claude-plugins/plugin install python-plugin@lgates-claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
REFERENCE.mdQuick reference for building and publishing Python packages with UV and modern build tools.
# Build package
uv build
# Build specific formats
uv build --wheel
uv build --sdist
# Output location: dist/
# Publish to PyPI
uv publish
# With token
uv publish --token $PYPI_TOKEN
# To Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/
my-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│ └── my_package/
│ ├── __init__.py
│ ├── __version__.py
│ └── main.py
└── tests/
[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"
[project]
version = "0.1.0" # Manual versioning
# Dynamic versioning (from git tags)
dynamic = ["version"]
[tool.uv]
version-provider = "git"
[project.scripts]
my-cli = "my_package.cli:main"
[project.gui-scripts]
my-gui = "my_package.gui:main"
[project.entry-points."my_plugin"]
plugin1 = "my_package.plugins:plugin1"
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[build-system]
requires = ["hatchling>=1.18"]
build-backend = "hatchling.build"
# 1. Build
uv build
# 2. Check built packages
ls dist/
# 3. Publish
uv publish --token $PYPI_TOKEN
# Publish to Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/ \
--token $TEST_PYPI_TOKEN
# Test installation
pip install --index-url https://test.pypi.org/simple/ my-package
Common classifiers:
classifiers = [
# Development Status
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
# Audience
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
# License
"License :: OSI Approved :: MIT License",
# Python Versions
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# Framework
"Framework :: Django",
"Framework :: FastAPI",
# Topic
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering",
]
Full list: https://pypi.org/classifiers/
uv-project-management - Project setup and dependenciespython-development - Core Python patternsuv-workspaces - Building workspace packagesThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.