Python Packaging Skill for Claude: Build and Publish a Package to PyPI
Gives Claude a guide to structuring, building and publishing Python packages with pyproject.toml, from layout to PyPI upload.
- Installs
- 13.2K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 2
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
python-packaging is a guide Claude reads when you want to distribute Python code. SKILL.md covers package layout (src, flat and multi-package), pyproject.toml standards, build backends (setuptools, hatchling, flit, poetry) and a minimal working example. It points Claude to two reference files for the long worked patterns.
The references cover a full pyproject.toml, dynamic versioning, CLIs built with Click or argparse, building with build and twine, publishing to TestPyPI and PyPI, and a GitHub Actions release workflow. They also cover data files, namespace packages, C extensions, wheels for several architectures and private indexes. It bundles no scripts, but the commands it teaches install tools and upload to PyPI.
Good for
- Python developers turning a library or CLI into an installable package
- Maintainers setting up versioning, wheels and automated PyPI releases
- Teams publishing to a private package index
Install python-packaging
Claude Code
- 1
Copy this prompt.
Install the python-packaging skill in Claude Code. Run this command: /plugin marketplace add wshobson/agents /plugin install python-development@claude-code-workflows Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route. The plugin routes install the whole python-development plugin: 3 agents, 1 command and 16 skills (counted from the plugin folder in the repo tree, which has no hooks or MCP config files). The skills-only routes install just this skill, with no agents or commands. The commands the skill teaches use pip, build and twine in your own project.
From the project README. Source.
What's in the skill
When it loads
Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.
Sections in SKILL.md
- When to Use This Skill
- Core Concepts
- 1. Package Structure
- 2. Modern Packaging Standards
- 3. Build Backends
- 4. Distribution
- Quick Start
- Minimal Package Structure
- Minimal pyproject.toml
- Package Structure Patterns
- Pattern 1: Source Layout (Recommended)
- Pattern 2: Flat Layout
- Pattern 3: Multi-Package Project
- Detailed patterns and worked examples
Key facts
- Author
- wshobson (repo owner)
- License
- MIT
- Installs on skills.sh
- 13,187 as of 2026-11-02
- GitHub stars
- 42,081 for the whole repo
- Last commit to the repo
- 2026-10-30
- Files in the skill
- 3 files including SKILL.md: references/details.md and references/advanced-patterns.md
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
What it includes
Package layouts, packaging standards, build backends and distribution targets.
Names PEP 517/518, PEP 621 and PEP 660, compares setuptools, hatchling, flit and poetry, and lists PyPI, TestPyPI and private repositories.
Read ·
Core conceptsA minimal package tree and pyproject.toml.
Gives a src layout with tests and a setuptools-based pyproject.toml.
Try: “Package this folder as a Python library with a pyproject.toml and a src layout.”
Read ·
Quick startSource layout (recommended), flat layout and multi-package projects.
Explains why the source layout prevents accidental imports from the working directory.
Read ·
Package structure patterns (1-3)Full pyproject.toml, dynamic versioning, CLIs, building and publishing.
Includes pip install build twine, twine check, twine upload to TestPyPI then PyPI, API tokens in ~/.pypirc and a GitHub Actions publish workflow using a PyPI token secret.
Runs code ·
references/details.md (patterns 4-10)Data files, namespace packages, C extensions, versioning, wheels, private indexes.
Includes editable installs, testing a wheel in a throwaway virtual environment, cibuildwheel for multi-architecture wheels and uploading to a private index.
Runs code ·
references/advanced-patterns.md (patterns 11-20)A .gitignore, a MANIFEST.in and a publishing checklist.
Starter files and a list to run through before a release.
Read ·
File templates and checklist
From the official docs
Permissions
Medium risk
The skill is guidance, but the commands it teaches install packages and upload releases with your PyPI token. Publish to TestPyPI first, and keep tokens out of the chat.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It teaches uploading releases with your token
The references show twine upload to TestPyPI and PyPI with an API token in ~/.pypirc or a CI secret. A release cannot be unpublished cleanly, so publish to TestPyPI first and keep the token out of the chat. github.com
A private index can be confused with the public one
The advanced reference warns that pip treats every index as equal and installs the highest version it finds. Pin your index and reserve your package names if you use a private index. github.com
It runs pip installs and removes a test folder
The references install build and twine with pip, and a test-install example ends with rm -rf test-env. Check the paths before approving those commands. github.com
The plugin route adds more than this skill
The python-development plugin also installs 3 agents (django-pro, fastapi-pro, python-pro), 1 command (python-scaffold) and 15 other skills. The repo tree shows no hooks or MCP config files in it. The skills CLI route installs only this skill. github.com
Technical details
| Talks to | pypi.org and test.pypi.org (as named in the references). a private index URL if you use one |
|---|---|
| Sign-in and keys | The references show a PyPI API token stored in ~/.pypirc or in a CI secret (PYPI_API_TOKEN). |
| Scopes |
|
Questions
What does the python-packaging skill do?
It gives Claude a guide to making a Python library or CLI installable: project layout, pyproject.toml, build backends, versioning, building wheels and publishing to PyPI or a private index.
How do I install python-packaging?
Use the install box above. The skills CLI command installs only this skill, a folder of three markdown files with no scripts. The plugin route installs the whole python-development plugin, with its agents, command and 15 other skills.
Does it upload to PyPI for me?
It teaches Claude the commands, including twine upload, and shows how to keep a PyPI token in ~/.pypirc or a CI secret. It has no script of its own, so an upload only happens if you let Claude run those commands.
Is python-packaging safe?
The skill is guidance, but the commands it teaches install packages, upload releases and use a PyPI token. Read each command before Claude runs it, publish to TestPyPI first as the guide suggests, and keep tokens out of chat.
Which build backend does it recommend?
It lists setuptools (traditional), hatchling (modern, opinionated), flit (lightweight, pure Python) and poetry (dependency management plus packaging). Its quick start uses setuptools, and it recommends the src layout.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/python-development/skills/python-packaging
Sources
Docs, issue trackers and discussions this page is built from.
Show all 6Hide
- python-packaging SKILL.md · github.com
- wshobson/agents README · github.com
- python-development plugin.json · github.com
- SKILL.md · github.com
- details.md · github.com
- advanced-patterns.md · github.com