一键导入
release
Prepares a Python package for PyPI release by updating the version, building, and verifying the distribution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Prepares a Python package for PyPI release by updating the version, building, and verifying the distribution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Merges completed work back to main through a protected-branch pull request workflow.
Set up a new git worktree and install dependencies.
Merges completed work back to main through a protected-branch pull request workflow.
Set up a new git worktree and install dependencies.
Prepare a release by updating the version, building, and verifying the distribution.
Verify that the codebase matches the desired end state described in a design document.
| name | release |
| description | Prepares a Python package for PyPI release by updating the version, building, and verifying the distribution. |
Prepare a Python package for PyPI release by updating the version, building, and verifying the distribution.
$ARGUMENTS
Check that the current branch is main and has zero differences from origin:
git checkout main && git diff --exit-code origin/main
If there are any differences:
Releases must start from a clean main branch with no uncommitted or unpushed changes.
Gather the following information from the user-provided context:
0.1.0a1 for first alpha, 0.1.0 for stable)If unclear, look up the current published version on PyPI and suggest the next patch increment (e.g., if 0.1.1 is published, suggest 0.1.2). Ask the user to confirm or provide a different version.
Check for broken external links in documentation:
python scripts/check-external-links.py
If broken links are found:
Every release should be entirely clean and involve only the version number as a change. Do not proceed with the release if there are broken links to fix.
Update pyproject.toml to set the target version in the [tool.poetry] section, then use the committer agent to commit the change.
Create a versioned docs snapshot for this release:
cd docs && pnpm docusaurus docs:version <target-version>
Then update docusaurus.config.ts:
lastVersion to "<target-version>" in the preset's docs optionsversions config object:
"<target-version>": {
label: "v<target-version>",
},
Use the committer agent to commit the snapshot.
Clean previous builds, build fresh distributions, and verify:
rm -rf dist/ && poetry build
Then run verification checks:
ls -lh dist/
tar -tzf dist/*.tar.gz | grep "bundled/scripts/nl.*\.md" | wc -l
tar -tzf dist/*.tar.gz | grep -E "docs/|tests/" && echo "Found excluded files (unexpected)" || echo "No excluded files (correct)"
Tell the user the package is ready and provide these instructions:
To test on TestPyPI first (recommended):
poetry publish -r testpypi
Then install and test:
python -m venv /tmp/test-mekara
source /tmp/test-mekara/bin/activate
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ mekara==<version>
mekara --version
deactivate
rm -rf /tmp/test-mekara
To publish to real PyPI
poetry publish
After the user confirms the package installs and runs correctly from PyPI, create a git tag and GitHub release:
First, find the previous version tag to use as the start of the release notes:
git tag --sort=-version:refname | grep '^v' | sed -n '2p'
Then create the tag and release, scoping notes to only changes since the previous tag:
git tag v<target-version>
git push origin v<target-version>
gh release create v<target-version> --title "v<target-version>" --generate-notes --notes-start-tag v<previous-version>
Wait for the user to confirm successful install before creating the release.