Skip to main content

Release plugin

Writes release notes and cuts a release one step at a time: the prechecks, the changelog entry, the version bump, the pull request and its checks, the merge, the wait for the merged commit to go green, and the tag that publishes. It stops at the first refusal and says what refused.

A release that goes wrong is on a registry forever, so nothing here is improvised. What each step needs comes from .releasetools.yaml, which means the same command releases a Python package, a Rust crate and one plugin of a monorepo.

GitHub Repository

The steps are commands, not a script​

Each one is a command you can read the output of. An agent that runs them says what went wrong; a script that wraps them turns a failure into an exit code and a person into a reader of logs. That is the whole reason this is a plugin.

1rt release::prechecks: version shape, clean tree, tag free, after the newest release, on the branch, not on the registry
2branch from origin/<branch>, /release:prepare, rt version::bump, commit, push
3the pull request, with the changelog entry as its body, and its checks watched
4merge, pull, and wait for the merged commit to go green
5tag, push, and watch the publish workflow

What the repository declares​

projects:
- path: ./
manifest: pyproject.toml
changelog: CHANGELOG.md
bump: uv version {version}

release:
branch: main
merge: squash
checks: tests.yml
publish: publish.yml
registry: https://pypi.org/pypi/my-package/{version}/json
keywhat it isdefault
branchwhat a release is cut frommain
mergehow the pull request lands: squash, rebase or mergesquash
checksthe workflow that must be green on the merged commitnone, and the wait is skipped
publishthe workflow the tag starts, watched to the endnone, and it stops at the push
taggingwho creates release tags: manual, workflow, or after-mergemanual
registrya URL that must 404 before releasingnone

Those keys are the releasetools conventions rather than this plugin's own, so the versions guard and the release read the same file. {version} is the bare version everywhere, with no v.

registry names the distribution as the registry knows it, which is not always the repository's name or the package a reader imports. A URL built from the wrong one checks somebody else's package and passes.

A single project defaults to v{version}. Repositories with several projects declare a tag template per project, such as {project}/v{version}. The full release procedure supports the root template for every tagging policy. Its workflow dispatch requires a single declared project. In a multi-project repository, version and commit alone cannot identify which project to publish, even when the selected project has an unprefixed tag. The full procedure checks the policy and project namespace on the fetched release branch before preparation and at the landed SHA before publication. Use the tag command for project-prefixed tags after confirmed merges.

Tag confirmed merges​

Use /release:tag in Claude Code or $release:tag in Codex. Before merge, impact --base TARGET_SHA --commit REVIEW_SHA reads the prospective merge tree. Under after-merge, changesVersion tells whether the review adds or increases a project version relative to its target. It needs both commits locally and Git 2.38 or later. A review with unchanged versions can merge without publisher permission.

With release.tagging: after-merge, plan --commit SHA shows which versions changed. publish --commit SHA --repository URL signs and pushes their tags. Repeat --commit to publish several confirmed merges atomically. Use the target repository URL recorded with the merge. The helper checks the selected remote's fetch and push destinations and locks each signed tag through the atomic push. Each tag points to the commit that introduced its version. If a GitHub workflow publishes on tag push, the command refuses a batch with more than three new remote tags before signing. GitHub push event limits

With manual, a release requires an explicit request. With workflow, the named publishing workflow owns the tag. Shipping a review under either policy leaves publication to its owner. For a single project, the audit matches dispatch runs titled Release vVERSION at SHA to the exact release. Older version-only titles can report an observed workflow outcome while the release stays unconfirmed.

Use missing --since SHA --until SHA to audit the first-parent history between two release commits. The audit excludes the starting commit and includes the ending commit.

Why the merge defaults to a squash​

It is the only strategy a protected branch always takes. GitHub replays the author's commits unsigned on a rebase merge, so a branch requiring signed commits refuses it, and a branch requiring linear history refuses a merge commit. A squash is one commit, signed by GitHub's web-flow key, and its subject is the pull request's.

Declare rebase where you want the branch's own commits and their messages, or merge where you want the branch kept as a branch, and where the branch protections allow either.

The tag lands after the merge, not before​

A merged commit is a tree neither the branch nor the base has tested on its own. So step 4 waits for checks to finish on that commit, and only then does step 5 tag it.

That is the difference between a tag that names a commit somebody proved and one that names a commit somebody hoped about. The pull request's last green check was about a different tree.

Nothing here parses a manifest​

Every ecosystem ships the command that sets a version, so the project declares which one it is and releasetools/cli runs it:

bump: uv version {version}
bump: npm version {version} --no-git-tag-version
bump: cargo set-version {version}

rt version::bump substitutes {version}, runs it, and refuses where the manifest did not take it. A manifest already declaring the version is left alone, so a resumed release does not double-bump.

Install​

Claude Code and Codex install it from the marketplace:

claude plugin marketplace add releasetools/agent-plugins
claude plugin install release@release-tools
codex plugin marketplace add releasetools/agent-plugins
codex plugin add release@release-tools

Hermes and Antigravity clone the repository and read plugin.json at the plugin root, so neither needs a marketplace:

hermes plugins install releasetools/agent-plugins/plugins/release
agy plugin install https://github.com/releasetools/agent-plugins

Add --scope project to the Claude Code commands to declare the plugin in the repository rather than in your own configuration, so the next person to cut a release is offered the same one.

What it needs​

releasetools/cli v0.4.0 or newer, which is where version::bump arrived:

brew install releasetools/tap/releasetools-cli

gh, authenticated, for the pull request and the workflows. Node.js 24 or newer runs the bundled release-note helper, which step 2 uses for the changelog entry.

Commands​

Claude CodeCodexWhat it does
/release:write [--pr <number>]$release:write [--pr <number>]Write one change's note into its PR and changelog
/release:prepare <version> [--path <dir>]$release:prepare <version> [--path <dir>]Collate a release's changelog entry
/release:tag$release:tagCheck a review's release impact, publish confirmed release tags, or audit a history range
/release:release <version> [--path <dir>]$release:release <version> [--path <dir>]Run the full release workflow
/release:setup [trigger]$release:setup [trigger]Configure the publish workflow through a pull request
/release:preflight [user | project]$release:preflight [user | project]Configure publishing permissions for the installed helper
/release:help$release:helpExplain the available skills

write and prepare read the shared note rules internally. The rules have no slash command. preflight runs only when called by name and shows the exact rules and asks before changing the selected client’s settings.

Asking for a release in plain words, such as "cut a release, version 1.2.3", runs release in either client. setup runs only when called by name, since it opens a pull request that changes the publish workflow. Its trigger is tag, dispatch or both, and with none it asks.

--path <dir> names which project of a monorepo is being released. A repository declaring several releases one of them at a time.

The version is yours to give, bare: 1.2.3. v1.2.3 is its tag, and given one, it asks for 1.2.3. With none, it asks, and it never guesses one from the commits: a version guessed wrong is a version somebody has to notice.

What it will not do​

Move a tag. A tag names one commit forever, and a version that needs a second attempt gets the next number. Where a publish workflow fails after it has already uploaded, re-run that workflow rather than re-tagging.

Force anything, stash your work, delete an unmerged branch, retry a failed check in the hope that it passes, or release a version nobody named.