/legend-release:release-cleanupfrom legend-release
Inspects a failed Legend release and surgically removes the tag and version-bump commits so the version can be cut again. Useful when a release failed, commits were pushed, or a version bump was unintentional.
Ships in legend-release. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A failed release usually leaves a pushed tag and version-bump commits behind. Both must go before that version can be cut again — but what exactly was left depends on the repo and on how the release failed, so inspect before acting.
Read ../release-preflight/references/repo-matrix.md (relative to this skill's directory) first.
clean-after-failed-release.ymlEvery repo has it, and it is blunt: it deletes git describe's globally
newest tag and runs git reset --hard HEAD~2 && git push --force. That is
correct only when the last two commits really are the release-plugin pair and
the newest tag really belongs to this release. It is wrong when a backport
squashed release commits together with a fix (resetting 2 then deletes real
work), when the repo is legend-shared (one commit, not two), or when any newer
tag exists. Do it properly instead.
200 means that version
is burned permanently — cleanup will not free it, and the user must bump. Also
check whether the run's publish job ever started (0s = never ran).[maven-release-plugin] in
both subjects and bodies — a squash hides them in the body:
git log --format='%H %s%n%b' -15 | grep -n 'maven-release-plugin'
git diff HEAD~1 HEAD --stat | tail -3
git diff HEAD~1 HEAD -- '*pom.xml' | grep -E '^[+-].*<version>' \
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT' | sort | uniq -c
git tag -l '<repo>-<version>'; git ls-remote --tags origin 'refs/tags/<repo>-<version>'
If the release commits are clean and unpushed — git reset --hard to before
them is fine.
If they are pushed, or share a commit with real work — do a forward revert. Restore only the release-plugin artifacts and leave everything else:
git diff HEAD~1 HEAD --name-only -- '*pom.xml' | xargs git checkout HEAD~1 --
git commit -m "Revert maven-release-plugin version changes from #<pr>"
Then confirm the tree differs from the pre-release commit by only the real change:
git diff HEAD~1 --stat
This is the right shape whenever a backport squashed the release commits in with a fix — it keeps the fix and drops only the version churn.
Remember legend-shared has no release-plugin commits at all: its bump is a
<revision> edit in one commit.
git tag -d <repo>-<version>
git push origin :refs/tags/<repo>-<version>
Deleting a published tag is outward-facing: always confirm, and check first whether artifacts for it reached Central. If they did, the tag documents a real published release and deleting it is probably wrong.
Record the SHAs before deleting, so the tag can be recreated:
git rev-parse <repo>-<version> # annotated tag object
git rev-list -n1 <repo>-<version> # the commit it points at
After a squash the tagged commit often exists on no branch at all, so this is the only record of it.
<version>-SNAPSHOT, and no stray new version
anywhere: grep -rl '<wrong-version>' --include=pom.xml . | wc -l should be 0.404 for the version.Then hand to release-preflight to confirm the branch is releasable again.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
release-cleanup, git-undo, maven-release-plugin, version-bump
7 skills in this plugin
/post-release-verifyVerify a Legend release actually completed — artifacts readable on Central, tag correct, branch left at the right next SNAPSHOT, docker images pushed. Use after a release run goes green, or for "did the release work", "check the release landed", "verify 4.143.1"./release-backportBackport a fix to a Legend release branch safely, without dragging maven-release-plugin commits along with it. Use for "backport this to 4.100", "cherry-pick that fix onto the release branch", "get this fix into the release"./release-dispatchDispatch a Legend release workflow and babysit it to completion — picks the right workflow, runs preflight, confirms, triggers, then watches and triages any failure. Use for "release 4.143.1", "cut a release off this branch", "run the release action", "kick off the release".npx claudepluginhub finos/legend-shared --plugin legend-releaseOther plugins' skills for the same job