# Publish Python

> Prepares and triggers a new Python package release: runs cleanup, validates semantic versioning, updates pyproject.toml and docs, builds with uv, creates a GitHub release, and monitors the publishing workflow. Supports patch/minor/major auto-increment. Use when the user wants to cut a release, bump the version, or publish a new Python package version.

- Skill: `open-agent-tools/publish-python` (Agent Skill)
- Install (CLI): `npx skillmds@latest add open-agent-tools/publish-python`
- Raw SKILL.md: https://api.skillmd.com/api/skills/open-agent-tools/publish-python/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: Open-Agent-Tools (https://skillmd.com/u/open-agent-tools)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/open-agent-tools/publish-python

---


Prepare and trigger a new release for version: $ARGUMENTS

Follow these steps:

**Output Format**: Use clear section headers, timestamps for each step, and progress indicators for release operations.

**Tool Validation**: First verify that required tools are installed (uv, gh, git) and the project has proper release configuration.

**Version Validation**: Validate that the provided version follows semantic versioning format (e.g., 1.2.3, 1.0.0-alpha.1).

1. **Run cleanup first**: Execute all cleanup steps (linting, formatting, type checking)
2. **Version increment options**: Support auto-increment with 'patch', 'minor', or 'major' keywords instead of explicit version numbers
3. **Update pyproject.toml**: Update the version field in pyproject.toml with the new version number
4. **Update version in docs**: Update all references to the next version based on the provided version number
5. **Check version**: Verify version in pyproject.toml and __init__.py match the target version and are greater than the current version
6. **Build test**: Run `uv build` to ensure the package builds correctly
7. **Create release**: Use `gh release create` with the appropriate version tag and release notes
8. **Monitor**: Track the publishing workflow with `gh run list` to ensure it completes successfully

**Error Handling**: If any step fails, attempt to fix the issue automatically. If unable to fix, report the specific error and suggested solutions before proceeding.

