Publish a new version of klaude-code to PyPI. This skill handles version bumping, changelog updates, git tagging, and package publishing. Use when the user wants to release a new version.
This skill manages the release process for klaude-code, including version management, changelog updates, git tagging, and PyPI publishing.
UV_PUBLISH_TOKEN environment variable must be set for PyPI publishingpnpm must be available (used by scripts/build_web.py to build the web frontend)src/klaude_code/skill/assets)Before starting the release workflow, run:
git submodule sync --recursive
git submodule update --init --recursive
Ask the user which version bump type to apply:
major - Breaking changes (X.0.0)minor - New features, backwards compatible (x.Y.0)patch - Bug fixes, backwards compatible (x.y.Z)Execute the version bump script to update pyproject.toml:
uv run .claude/skills/publish/scripts/bump_version.py <bump_type>
The script will:
pyproject.tomlpyproject.toml with new versionExecute the changelog update script:
uv run .claude/skills/publish/scripts/update_changelog.py <new_version>
The script will:
This project uses jj (Jujutsu) in colocated mode with git. Create a release commit and tag:
# Describe current change as release commit
jj describe -m "chore(release): v<new_version>"
# Create new empty change for future work
jj new
# Get the git commit id of the release commit (jj's @- syntax doesn't work with git)
jj log -r @- -T 'commit_id' --no-graph
# Create tag using the git commit id
git tag v<new_version> <commit_id>
Push the commit and tag to remote:
# Move main bookmark to the release commit, then push
jj bookmark set main -r @-
jj git push
# Push the tag
git push origin v<new_version>
# Ensure submodule commit is reachable to other environments
git submodule update --init --recursive
Build the frontend using the build script, build the Python package, verify the wheel bundles the web assets and system skill assets, then publish to PyPI:
# Build web frontend (pnpm install + pnpm build + verify dist)
uv run python scripts/build_web.py
# Build Python package (sdist + wheel)
uv build
# Verify the wheel contains required bundled assets
uv run python - <<'PY'
from pathlib import Path
from zipfile import ZipFile
wheel = sorted(Path("dist").glob("*.whl"))[-1]
with ZipFile(wheel) as archive:
names = set(archive.namelist())
required = {
"klaude_code/web/dist/index.html",
"klaude_code/skill/assets/web-search/SKILL.md",
}
missing = sorted(required - names)
if missing:
raise SystemExit(f"Wheel is missing bundled assets: {', '.join(missing)}")
print(f"Verified bundled web + skill assets in {wheel.name}")
PY
uv publish
Do not publish if the wheel verification fails. That means the package build no longer includes required bundled assets (web or skills).
scripts/bump_version.py - Handles semantic version bumpingscripts/update_changelog.py - Updates CHANGELOG.md with commits since last tag