czsc-release

Automates version bumping, pre-flight checks, and release tagging for the czsc Rust-Python hybrid package.

6.0k|1.7k|Updated Jun 11, 2019
One-click install
npx skills add https://github.com/waditu/czsc --skill czsc-release
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: czsc-release
Source: https://github.com/waditu/czsc/tree/main/.claude/skills/czsc-release
Command: npx skills add https://github.com/waditu/czsc --skill czsc-release

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Releasing the czsc library is error-prone because it is a Rust + Python hybrid package (PyO3 + maturin) that must publish synchronized versions to both crates.io and PyPI, and past releases suffered repeated re-releases due to skipped pre-flight checks. This Skill enforces a disciplined, checklist-driven release workflow with mandatory human authorization before irreversible actions like pushing tags.

Core Features & Use Cases

  • SemVer version recommendation: Reads the workspace Cargo.toml version and CHANGELOG [Unreleased] section to recommend the next rc or stable version, then asks the user to confirm.
  • Full pre-flight validation: Runs cargo fmt/clippy/test, maturin develop, stub generation drift checks, pytest (including slow tests), and ruff before any version bump.
  • CHANGELOG and version bump automation: Updates Cargo.toml workspace and dependency versions, converts [Unreleased] into a dated release section, and commits the bump.
  • Gated irreversible actions: Stops for explicit user authorization before git tag, push to master, and tag pushes that trigger PyPI/crates.io CI publishing, plus CI monitoring and a re-release playbook for failures.
  • Use Case: When you say "prepare czsc 1.0.0-rc.8 release", the Skill verifies the working tree, runs all checks, bumps versions, files the CHANGELOG, and pauses for your approval before pushing the tag that triggers PyPI upload.

Quick Start

Ask the assistant to release czsc by saying "bump czsc to the next rc version and prepare the release", then confirm each gated step as prompted.

Frequently Asked Questions about czsc-release

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I release a new version of a Rust and Python hybrid package?

Use a workflow that keeps a single version source in the workspace Cargo.toml, runs cargo fmt/clippy/test plus pytest pre-flight checks, bumps the CHANGELOG, then pushes a v-prefixed tag to trigger CI publishing to PyPI and crates.io. Always confirm before pushing tags since PyPI version names cannot be reused.

How does the czsc release skill decide the next version number?

It reads the current version from Cargo.toml [workspace.package].version and inspects the CHANGELOG [Unreleased] section. Breaking changes bump the major version, additions bump the minor, fixes bump the patch, and published rc versions require incrementing the rc number.

Can I reuse a version number on PyPI after a failed publish?

No. Once a version number is uploaded to PyPI it is permanently occupied and cannot be reused or force-pushed. If a release fails after the tag was pushed, you must bump to the next patch or rc number and re-release with the fix included.

Why does cargo publish reject my workspace version bump?

Cargo publish fails if you only update [workspace.package].version but forget the version fields of path dependencies in [workspace.dependencies]. All internal crate version references must be updated together so the published crates resolve consistently.

What pre-flight checks run before a czsc release?

The checks include cargo fmt, clippy with all targets, cargo test, maturin develop rebuild, stub generation drift verification via git diff, pytest unit and slow tests, and ruff lint and format checks. Any failure stops the release before version bumping.

Does the skill push release tags automatically?

No. Pushing tags triggers CI that uploads to PyPI and is irreversible, so the skill always pauses and asks for explicit user authorization before running git tag, git push origin master, or git push of the version tag.