Agent skill
prepare-release
Prepare a patch/minor/major version release for all Momentum CMS packages. Bumps versions, verifies builds/tests, adds new packages to Nx release config, and commits. Triggers include "prepare release", "bump version", "release patch", or "/prepare-release".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/prepare-release
SKILL.md
Prepare Release Skill
Prepare a new version release for all @momentumcms/* packages in the monorepo.
Inputs
- bump type:
patch(default),minor, ormajorfrom the argument - If no argument provided, default to
patch
Step 1: Determine Current Version
Find the current version from any lib's package.json:
grep '"version"' libs/core/package.json
All packages share the same version (lockstep versioning).
Step 2: Calculate New Version
Given current version X.Y.Z:
patch->X.Y.(Z+1)minor->X.(Y+1).0major->(X+1).0.0
Step 3: Verify New Packages Are in Nx Release Config
Read nx.json and check the release.projects array. Every library in libs/ and libs/plugins/ that has a package.json with @momentumcms/ name MUST be in this array.
To find all publishable packages:
grep -r '"@momentumcms/' libs/*/package.json libs/plugins/*/package.json apps/create-momentum-app/package.json | grep '"name"'
Compare against release.projects in nx.json. If any are missing:
- Add them to the
release.projectsarray innx.json - Verify the package's
project.jsonhas annx-release-publishtarget:json"nx-release-publish": { "options": { "packageRoot": "dist/{projectRoot}", "access": "public" } }
Step 4: Bump All Versions
Replace the old version with the new version in ALL publishable package.json files. This includes:
- The
"version"field - Any
"@momentumcms/*"dependency references
find libs apps/create-momentum-app -name "package.json" -not -path "*/node_modules/*" -exec grep -l "OLD_VERSION" {} \; | while read f; do
sed -i '' "s/OLD_VERSION/NEW_VERSION/g" "$f"
done
Verify no old version references remain:
grep -r "OLD_VERSION" libs/*/package.json libs/plugins/*/package.json apps/create-momentum-app/package.json
Step 5: Run Full Test Suite
Run the full test suite to verify nothing is broken:
npm run test:all -- --skip cli-scaffold
The CLI scaffold test is slow and unrelated to library code; skip it unless the release includes CLI template changes.
Check results:
- Unit Tests: Must pass (0 failures)
- Angular E2E: Must pass
- Analog E2E: Must pass (flaky tests that retry and pass are OK)
- Migration Tests: Must pass
Step 6: Build All Packages
npx nx run-many -t build
All packages must build successfully.
Step 7: Verify Dist Versions
Spot-check that dist output has the correct version:
grep '"version"' dist/libs/core/package.json dist/libs/plugins/redirects/package.json
Step 8: Commit
Stage and commit with a conventional commit message:
chore(release): bump version to X.Y.Z
Bump all @momentumcms/* packages from OLD to NEW.
[Include any notable additions like new packages]
Step 9: Summary
Print a summary:
- Old version -> New version
- Number of packages bumped
- Any new packages added to release config
- Test results
- Reminder:
npx nx release publishto publish to npm (do NOT run this automatically)
Important Notes
- Never run
npx nx release publishwithout explicit user confirmation - All packages use lockstep versioning (same version number)
- The root
package.jsonversion (0.0.0) is intentionally static and should NOT be bumped conventionalCommits: truein nx.json means Nx Release can auto-determine version bumps from commit messages, but this skill does manual bumps for explicit control- Always verify the
nx-release-publishtarget exists in new packages'project.jsonbefore releasing
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?