一键导入
release-python-package
Prepare and execute a Python package release with verification steps. Use for releasing Python packages with uv and ruff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Prepare and execute a Python package release with verification steps. Use for releasing Python packages with uv and ruff.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Conduct an adaptive interactive interview on any topic and produce a structured markdown report, summary, or implementation plan. Use when the user says "interview me", "interview me about", "run an interview on", "help me think through", or wants guided discovery on any subject. Also triggers on "talk me through", "explore X with me", "help me plan Y", or "walk me through my thinking on Z" when the user wants a guided conversation rather than a direct answer. Applies broadly — career decisions, project ideas, product direction, personal goals, research questions, team problems — not just technical topics.
Execute pending SDD tasks in dependency order with wave-based concurrent execution via subagent dispatch and structured verification. Requires a harness that supports subagent dispatch (parallel task-executor agents). Reads task files from .agents/tasks/ and manages execution sessions in .agents/sessions/. Supports task group filtering and configurable parallelism. Use when user says "execute tasks", "run tasks", "start execution", "work on tasks", or wants to execute generated tasks autonomously.
Execute pending SDD tasks sequentially in Windsurf with direct context management and script-based file operations. Optimized for Windsurf's context behavior — uses deterministic Bash scripts for task file moves and history updates to prevent data loss from context decay. Tasks execute inline through a 4-phase workflow (Understand, Implement, Verify, Complete) with file-based external memory for cross-task knowledge sharing. Reads task files from .agents/tasks/ and manages execution sessions in .agents/sessions/. Supports task group filtering. Use when user says "execute tasks", "run tasks", "start execution", "work on tasks", or wants to execute generated tasks autonomously in Windsurf.
Define and manage implementation tasks using a harness-independent JSON file format. Provides task schema, file-based CRUD operations, state management, dependency tracking, and execution patterns. Use as a reference skill when creating, executing, or managing tasks from specs. Load this skill whenever working with .agents/tasks/ files, decomposing specs into tasks, or coordinating multi-agent task execution.
Analyze an existing specification for requirements completeness, risks, quality issues, and strategic gaps. Generates a scored report with actionable findings and supports auto-fix or interactive review modes. Use when user says "analyze spec", "review spec", "spec analysis", "audit spec", "check spec", "validate requirements", "spec quality", or wants to evaluate, improve, or validate an existing specification.
Create a new specification through an adaptive interview process with proactive recommendations and optional research. Supports high-level, detailed, and full technical documentation depths. Use when user says "create spec", "new spec", "generate spec", "write a spec", "PRD", "product requirements", or wants to start a specification document.
基于 SOC 职业分类
| name | release-python-package |
| description | Prepare and execute a Python package release with verification steps. Use for releasing Python packages with uv and ruff. |
| metadata | {"type":"workflow","agents":[{"name":"changelog-manager","file":"agents/changelog-manager.md","shared":false}]} |
| allowed-tools | Read Edit Bash Glob |
Execute a complete pre-release workflow for Python packages using uv and ruff. This command automates version calculation, changelog updates, and tag creation.
the user's input - Optional version override (e.g., 1.0.0). If not provided, version is calculated from changelog entries.Execute these 9 steps in order. Fail fast: Stop immediately if any verification step fails.
Run these checks and stop if any fail:
# Check current branch
git branch --show-current
main branch. If not, stop and report: "Release must be run from the main branch. Currently on: {branch}"# Check for uncommitted changes
git status --porcelain
# Pull latest changes
git pull origin main
Execute the test suite:
uv run pytest
Execute linting checks:
uv run ruff check
uv run ruff format --check
Build the package:
uv build
All verification checks have passed. Before calculating the version, offer to run the changelog-agent to ensure the [Unreleased] section is up-to-date.
Ask the user:
Would you like to run the changelog-agent to update CHANGELOG.md before proceeding?
This will analyze git commits since the last release and suggest new changelog entries.
Options:
If user selects "Yes":
Spawn a subagent using the changelog-manager instructions from agents/changelog-manager.md:
If user selects "No":
Continue to Step 6 (Calculate Version) without running the changelog-agent.
Read CHANGELOG.md and parse its structure. Look for:
## [Unreleased] section and its subsections## [0.1.0]) to get the current versionCount entries under [Unreleased] by subsection:
### Added - New features### Changed - Changes to existing functionality### Deprecated - Features marked for removal### Removed - Removed features (breaking change)### Fixed - Bug fixes### Security - Security fixesApply semantic versioning rules to the current version (MAJOR.MINOR.PATCH):
| Condition | Bump Type | Example |
|---|---|---|
### Removed present AND current >= 1.0.0 | MAJOR | 1.2.3 → 2.0.0 |
### Removed present AND current < 1.0.0 | MINOR | 0.2.3 → 0.3.0 |
### Added or ### Changed present | MINOR | 0.1.0 → 0.2.0 |
Only ### Fixed, ### Security, or ### Deprecated | PATCH | 0.1.0 → 0.1.1 |
the user's input as the version instead of calculatingAsk the user to confirm the version:
Based on changelog analysis:
- Found: {count} Added, {count} Changed, {count} Fixed, {count} Removed entries
- Current version: {current}
- Suggested version: {suggested} ({bump_type} bump)
Confirm version or provide override:
Options:
Read pyproject.toml and extract the repository URL from [project.urls]:
Repository, repository, Source, source, Homepage, homepageIf no repository URL found, warn but continue (comparison links will be omitted).
Transform the changelog:
Before:
## [Unreleased]
### Added
- New feature X
## [0.1.0] - 2024-01-15
### Added
- Initial release
[Unreleased]: https://github.com/user/repo/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/user/repo/releases/tag/v0.1.0
After (releasing 0.2.0):
## [Unreleased]
## [0.2.0] - {today's date YYYY-MM-DD}
### Added
- New feature X
## [0.1.0] - 2024-01-15
### Added
- Initial release
[Unreleased]: https://github.com/user/repo/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/user/repo/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/user/repo/releases/tag/v0.1.0
Use the Edit tool to update CHANGELOG.md with the transformed content.
Stage and commit the changelog update:
git add CHANGELOG.md
git commit -m "docs: update changelog for v{version}"
git push origin main
Report: "Changelog committed and pushed"
Create an annotated tag and push it:
git tag -a v{version} -m "Release v{version}"
git push origin v{version}
Report success with details:
Release v{version} completed successfully!
- Changelog updated: CHANGELOG.md
- Tag created: v{version}
- Tag URL: {repository_url}/releases/tag/v{version}
Next steps:
- GitHub/GitLab will create a release from the tag
- Publish to PyPI if configured in CI
This skill uses the following agents:
| Agent | File | Dependencies |
|---|---|---|
| changelog-manager | agents/changelog-manager.md | none |
If subagent dispatch is available: Dispatch the changelog-manager as a subagent in Step 5, passing the contents of agents/changelog-manager.md as the task instructions. Wait for the agent to complete before proceeding to Step 6.
If subagent dispatch is not available: Read agents/changelog-manager.md and follow its instructions directly in Step 5. Complete all changelog updates before proceeding to Step 6.
If any step fails after Step 6 (version confirmation):
git checkout CHANGELOG.md - Revert changelog changesgit tag -d v{version} - Delete local tag if createdgit push origin :refs/tags/v{version} - Delete remote tag if pushed