with one click
release-crate
// Publish a crate release to crates.io with changelog, git tag, and GitHub release. Use when releasing a new version of any workspace crate.
// Publish a crate release to crates.io with changelog, git tag, and GitHub release. Use when releasing a new version of any workspace crate.
Apply private modules with public re-exports (barrel export) pattern for clean API design. Includes conditional visibility for docs and tests. Use when creating modules, organizing mod.rs files, or before creating commits.
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
Write and format Rust documentation correctly. Apply proactively when writing code with rustdoc comments (//! or ///). Covers voice & tone, prose style (opening lines, explicit subjects, verb tense), structure (inverted pyramid), intra-doc links (crate:: paths, reference-style), constant conventions (binary/byte literal/decimal), and formatting (cargo rustdoc-fmt). Also use retroactively via /fix-intradoc-links, /fix-comments, or /fix-md-tables commands.
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.
Analyze log files by stripping ANSI escape sequences first. Use when asked to process, handle, read, or analyze log files that may contain terminal escape codes.
Core design principles for the codebase - cognitive load, progressive disclosure, type safety, abstraction worth. Use when designing APIs, modules, or data structures.
| name | release-crate |
| description | Publish a crate release to crates.io with changelog, git tag, and GitHub release. Use when releasing a new version of any workspace crate. |
/release <crate>build-infra, tui, cmdr,
analytics_schema
r3bl- prefix for binary crates and r3bl_ prefix for
library crates - the prefix is applied to the folder name of the crate (e.g.,
r3bl_tui crate is in tui folder, and r3bl-cmdr crate is in the cmdr folder).Before starting a release, verify:
./check.fish --full passes (or equivalent checks have been run recently)Follow these steps in order. Reference docs/release-guide.md for canonical examples.
<crate>/Cargo.toml to find the current versionbuild-infra, cmdr) or library crate (tui, analytics_schema)<crate>/Cargo.tomlversion field to the new versionCHANGELOG.md### vX.Y.Z (YYYY-MM-DD) with summary, Fixed/Added/Changed sectionsdocs/release-guide.md./check.fish --full
Or if check.fish is unavailable, run manually:
cd <crate>
cargo build && cargo test && cargo doc --no-deps && cargo clippy --fix --allow-dirty --allow-staged && cargo fmt --all
cd <crate> && cargo readme > README.md
Note: If cargo-readme is not installed, skip this step and inform the user.
cd <crate> && cargo publish --dry-run --allow-dirty --no-verify
The --no-verify flag skips re-compilation of the packaged tarball, which fails with the
wild linker configured in .cargo/config.toml. The build/test/clippy checks in step 5
already verify correctness.
Verify the dry-run succeeds before proceeding.
IMPORTANT: Use AskUserQuestion to ask the user for explicit permission before running
cargo publish. This is a non-reversible action that publishes to crates.io.
Present:
git add -A
git commit -m "vX.Y.Z-<crate>"
git tag -a vX.Y.Z-<crate> -m "vX.Y.Z-<crate>"
Note: Do NOT use -S for signing - follow the project's git workflow conventions.
cd <crate> && cargo publish --no-verify --allow-dirty
git push && git push --tags
Use gh release create with release notes following the structure in docs/release-guide.md:
gh release create vX.Y.Z-<crate> --title "vX.Y.Z-<crate>" --notes "$(cat <<'EOF'
<release notes>
EOF
)"
Release notes structure:
[Crate description]. Install with `cargo install <crate-name>`.
- tool-highlight - Brief description.
## vX.Y.Z (YYYY-MM-DD)
[One-liner summary from CHANGELOG]
**Fixed:**
- Item 1
**Added:**
- Item 1
## Full Changelog
- [crate vX.Y.Z](https://github.com/r3bl-org/r3bl-open-core/blob/main/CHANGELOG.md#anchor)
Crate-specific notes:
build-infra, cmdr): Include install instructions (cargo install <crate>)tui): No install instructions neededFor binary crates (build-infra, cmdr):
cargo install --path <crate> --force
Cargo.tomlCHANGELOG.md updated (entry + TOC)docs/release-guide.md updated (version in script block)cargo publish/release - Explicitly invokes this skill