Back to Skills

python-packaging

verified

Configure Python package metadata, setup.py, and pyproject.toml for distribution using UV or setuptools. Use when setting up Python packages, configuring build systems, or preparing projects for PyPI publication.

View on GitHub

Marketplace

fastagent-marketplace

armanzeroeight/fastagent-plugins

Plugin

python-toolkit

Python Development

Repository

armanzeroeight/fastagent-plugins
20stars

plugins/python-toolkit/skills/python-packaging/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/armanzeroeight/fastagent-plugins/blob/main/plugins/python-toolkit/skills/python-packaging/SKILL.md -a claude-code --skill python-packaging

Installation paths:

Claude
.claude/skills/python-packaging/
Powered by add-skill CLI

Instructions

# Python Packaging

Configure Python package metadata and build configuration for distribution.

## Quick Start

Create pyproject.toml with UV or setuptools configuration for package distribution.

## Instructions

### Choosing Build System

**Use UV with pyproject.toml (recommended) when:**
- Starting new projects
- Want fast, modern tooling
- Need dependency management + packaging
- Building libraries for PyPI
- Want PEP 621 compliance

**Use setuptools (pyproject.toml + setup.py) when:**
- Maintaining existing projects
- Need compatibility with older tools
- Require custom build steps
- Complex C extensions

**Use setuptools (pyproject.toml only) when:**
- Modern setuptools-only approach
- No custom build logic
- Want declarative configuration
- PEP 621 compliance

### UV Configuration (Recommended)

Create `pyproject.toml` with UV (PEP 621 standard):

```toml
[project]
name = "my-package"
version = "0.1.0"
description = "Package description"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
    {name = "Your Name", email = "you@example.com"}
]
keywords = ["keyword1", "keyword2"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
]
dependencies = [
    "requests>=2.28.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "black>=23.0.0",
    "mypy>=1.0.0",
]

[project.scripts]
my-cli = "my_package.cli:main"

[project.urls]
Homepage = "https://github.com/username/my-package"
Repository = "https://github.com/username/my-package"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
```

**Key fields:**
- `name`: Package name (use hyphens, will be converted to underscores for import)
- `version`: Semantic versioning (MAJOR.MINOR.P

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9198 chars