Run the local git-side workflow for a coco RC release. This skill prepares the
release commit and tag only; npm publish happens later when a GitHub prerelease
is created for the tag.
-
Decide whether this is dry-run mode.
-
Confirm the worktree is clean:
git status -sb
-
Confirm or create the prerelease branch.
If already on release/X.Y.Z-rc, continue. If starting a new RC cycle from
master, sync master and create the prerelease branch:
git fetch origin master --tags
git switch master
git pull --ff-only origin master
git switch -c release/X.Y.Z-rc
If the current worktree is not a dedicated release worktree, create a new
worktree instead of switching a feature worktree in place.
-
Confirm there are pending changesets:
find .changeset -maxdepth 1 -type f -name '*.md' ! -name 'README.md' | sort
If this is empty, stop unless the user explicitly asked for a no-change RC.
-
Enter prerelease mode only when needed:
test -f .changeset/pre.json || bunx changeset pre enter rc
If .changeset/pre.json exists, inspect it before continuing. It must have
mode: "pre" and tag: "rc".
-
Generate prerelease versions and changelogs:
bunx changeset version
-
Derive release metadata from the versioned files:
eval "$(.agents/skills/cut-rc-release/scripts/derive-rc-release-metadata.sh)"
printf '%s\n' "$NEW_PACKAGE_VERSION" "$NEW_RELEASE_TAG" "$RELEASE_BRANCH" "$COMMIT_MESSAGE"
-
Validate the committed release state and build:
env RELEASE_TAG="$NEW_RELEASE_TAG" RELEASE_PRERELEASE=true PRERELEASE_TAG=rc \
bun scripts/check-release.ts
bun install --frozen-lockfile
bun run build
-
Review the diff before committing:
git diff --name-only
git diff --stat
Expect only .changeset/, packages/*/package.json, and
packages/*/CHANGELOG.md release-file changes. Stop if unrelated files
changed.
-
Commit and tag:
git add .changeset packages/*/package.json packages/*/CHANGELOG.md
git commit -m "$COMMIT_MESSAGE"
git tag "$NEW_RELEASE_TAG"
-
Finish.
Normal mode:
git push --atomic origin "$RELEASE_BRANCH" "refs/tags/$NEW_RELEASE_TAG"
Dry-run mode:
git status -sb
git log --decorate --oneline -1
git show --stat --decorate --no-patch HEAD
git tag --list "$NEW_RELEASE_TAG"
-
Report the package version, tag, release branch, commit SHA, and whether the
branch/tag were pushed or intentionally left local.