with one click
publish
// Publish a new version of the crate to crates.io and GitHub. Bumps version, updates CHANGELOG, creates PR, publishes, tags, and creates a GitHub release. Proceeds cautiously with user confirmation at each major step.
// Publish a new version of the crate to crates.io and GitHub. Bumps version, updates CHANGELOG, creates PR, publishes, tags, and creates a GitHub release. Proceeds cautiously with user confirmation at each major step.
Reviews a GitHub pull request for correctness, architecture, security, backward compatibility, and test coverage. Fetches PR data, checks out the branch, diagnoses CI failures, and walks the maintainer through the review interactively.
Update cargo dependencies to their latest major versions one at a time, verifying each with check/build/test and committing individually. Invoke with /update-deps.
| name | publish |
| description | Publish a new version of the crate to crates.io and GitHub. Bumps version, updates CHANGELOG, creates PR, publishes, tags, and creates a GitHub release. Proceeds cautiously with user confirmation at each major step. |
| argument-hint | <version> |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Bash Read Grep Glob Edit Write Agent AskUserQuestion TaskCreate TaskUpdate TaskList WebSearch WebFetch LSP NotebookEdit |
| effort | high |
You are a release assistant. Your job is to walk the user through publishing version $0 of this
crate. You are writing to crates.io and GitHub ā proceed cautiously and ask the user before every
externally-visible action.
Read AGENTS.md at the repo root before starting.
gh repo view --json nameWithOwner ā never hardcode
owner/repo.$0 looks like a valid semver (x.y.z). If not, stop.Cargo.toml and confirm the current version is less than $0.git status --porcelain. If dirty, stop and tell the user.git fetch origin main.git rev-parse --short HEAD)origin/main (git rev-parse origin/main)release/v$0 from the current commit.Cargo.toml: change the version field to "$0".cargo check to regenerate Cargo.lock.Cargo.toml and Cargo.lock, then commit: bump version to $0cargo update.Cargo.lock changed with git diff --quiet Cargo.lock.run cargo updateThis is the most important phase. Follow these instructions precisely.
CHANGELOG.md in full.gh repo view --json url --jq .url## [x.y.z] entry
after ## [Unreleased].git log -1 --format=%ai v{previous_version}
gh pr list --state merged --base main --json number,title,mergedAt,body,labels \
--jq '.[] | select(.mergedAt > "{previous_tag_date}")' \
--limit 100
gh pr diff {number} --name-only
Categorize each PR into Keep a Changelog categories:
Only include categories that have entries. Skip PRs that are purely internal tooling (CI config, editor config, AI agent instructions) unless they meaningfully affect the project. Use your judgment ā when in doubt, include rather than exclude, and let the user decide.
Write a draft CHANGELOG entry following the exact style of existing entries in the file:
## [$0] - {YYYY-MM-DD} (today's date)### Changed, ### Fixed, etc.- Description of change. [#nn] where nn is the PR number[#nn]: {repo_url}/pull/nnExample:
## [$0] - 2026-04-09
### Changed
- Update dependencies including a major version change (toml v0.8 to v1). [#124]
### Added
- Add documentation for AI agents. [#123]
[#124]: https://github.com/webern/cargo-readme/pull/124
[#123]: https://github.com/webern/cargo-readme/pull/123
Show the complete draft entry to the user and ask for approval. The user may want to:
Incorporate all feedback. Do NOT write to CHANGELOG.md until the user approves the entry.
Once approved, update CHANGELOG.md:
Insert the new version section immediately after the ## [Unreleased] line:
## [Unreleased] header with a blank line after itUpdate the reference links at the bottom of the file. These are the [unreleased]: and
[x.y.z]: comparison links at the very end. Write them as if the release tag already exists
(it will be created later):
[unreleased] link to compare from the new version tag:
[unreleased]: {repo_url}/compare/v$0...HEAD[$0]: {repo_url}/compare/v{previous_version}...v$0The final link block should look like:
[unreleased]: {repo_url}/compare/v$0...HEAD
[$0]: {repo_url}/compare/v{previous_version}...v$0
[{previous_version}]: {repo_url}/compare/v{even_earlier}...v{previous_version}
...existing links...
Stage and commit: update CHANGELOG for $0
make publish-dry-run. This runs the full CI suite plus cargo publish --dry-run.git status --porcelain. If dirty, stop and ask the user.git push -u origin release/v$0gh pr create --title "release v$0" --body "$(cat <<'PREOF'
## Release v$0
- Bump version to $0
- Update CHANGELOG
PREOF
)"
gh pr checks release/v$0
cargo publishgit tag -a v$0 -m v$0
git push origin v$0
gh pr merge release/v$0 --merge
## [$0] and the next ## [)
to use as the release body. Include the category headers and items but NOT the PR reference
links at the bottom of the section (GitHub will auto-link #nn references).gh release create v$0 --title "v$0" --notes "$(cat <<'RELEOF'
{changelog entry content here}
RELEOF
)"
Summarize what was done: