prepare-release

Prepare a patch/minor/major version release for all Momentum CMS packages. Bumps versions, generates changelogs, verifies builds/tests, adds new packages to Nx release config, and commits. Triggers include "prepare release", "bump version", "release patch", or "/prepare-release".

6 stars

Best use case

prepare-release is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Prepare a patch/minor/major version release for all Momentum CMS packages. Bumps versions, generates changelogs, verifies builds/tests, adds new packages to Nx release config, and commits. Triggers include "prepare release", "bump version", "release patch", or "/prepare-release".

Teams using prepare-release should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/prepare-release/SKILL.md --create-dirs "https://raw.githubusercontent.com/DonaldMurillo/momentum-cms/main/.claude/skills/prepare-release/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/prepare-release/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prepare-release Compares

Feature / Agentprepare-releaseStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Prepare a patch/minor/major version release for all Momentum CMS packages. Bumps versions, generates changelogs, verifies builds/tests, adds new packages to Nx release config, and commits. Triggers include "prepare release", "bump version", "release patch", or "/prepare-release".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Prepare Release Skill

Prepare a new version release for all `@momentumcms/*` packages in the monorepo using `nx release`.

## Inputs

- **bump type**: `patch` (default), `minor`, or `major` from the argument
- If no argument provided, default to `patch`

## Step 1: Verify Git Tags Exist

Nx Release resolves the current version from git tags matching `v{version}`. Verify the latest tag matches the current package version:

```bash
git tag -l 'v*' | sort -V | tail -1
grep '"version"' libs/core/package.json
```

If the latest tag doesn't match the current version (e.g., packages are at `0.5.3` but latest tag is `v0.5.0`), create the missing tag on the correct commit:

```bash
git log --all --oneline | grep "bump version to X.Y.Z"
git tag vX.Y.Z <commit-hash>
```

**This is critical** — without the correct tag, Nx Release will calculate the wrong next version.

## Step 2: 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:

```bash
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:

1. Add them to the `release.projects` array in `nx.json`
2. Verify the package's `project.json` has an `nx-release-publish` target:
   ```json
   "nx-release-publish": {
       "options": {
           "packageRoot": "dist/{projectRoot}",
           "access": "public"
       }
   }
   ```

## Step 3: Dry Run

Run `nx release` in dry-run mode to preview version bumps and changelogs:

```bash
npx nx release --specifier=<bump> --dry-run --skip-publish 2>&1
```

Check the output for:

- **Correct base version** — should resolve from the latest git tag
- **Correct new version** — patch/minor/major applied correctly
- **Changelog entries** — features, fixes, and contributors look right
- **Errors** — especially peer dependency range issues (e.g., `preserveMatchingDependencyRanges` failures). Fix any range issues in the relevant `package.json` before proceeding.

## Step 4: Run Full Test Suite

Run the full test suite to verify nothing is broken:

```bash
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. Run in background since it takes a while.

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 5: Execute Release

Once dry run and tests look good, run for real:

```bash
npx nx release --specifier=<bump> --skip-publish
```

This will:

1. **Build all packages** (via `preVersionCommand`)
2. **Bump versions** in all `package.json` files (source and dist)
3. **Update internal dependency versions** automatically
4. **Generate per-project changelogs** from conventional commits
5. **Stage, commit, and tag** with `chore(release): publish X.Y.Z` and `vX.Y.Z`

## Step 6: Verify

```bash
git log --oneline -3
git tag -l 'v*' | sort -V | tail -3
grep '"version"' libs/core/package.json dist/libs/core/package.json
```

## Step 7: Summary

Print a summary:

- Old version → New version
- Number of packages bumped
- Any new packages added to release config
- Test results (or note if still running)
- Reminder: `npx nx release publish` to publish to npm (do NOT run this automatically)
- Reminder: `git push --follow-tags` to push the release commit and tag

## Important Notes

- **Never run `npx nx release publish`** without explicit user confirmation
- **Never run `git push`** without explicit user confirmation
- All packages use lockstep versioning (same version number)
- The root `package.json` version (`0.0.0`) is intentionally static and should NOT be bumped
- Nx Release handles version bumping, dependency updates, changelogs, commit, and tagging — do NOT do these manually
- The `nx.json` config has `conventionalCommits: true` so changelogs are generated from commit messages automatically
- `manifestRootsToUpdate` includes `dist/{projectRoot}` so dist versions are updated too

Related Skills

headless-ui

6
from DonaldMurillo/momentum-cms

Use @momentumcms/headless inside generated Momentum apps. Use when building custom public UI, composing accessible primitives, configuring global styles for hdl-* elements, or adding app-level tests around headless interactions.

ui-audit

6
from DonaldMurillo/momentum-cms

Comprehensive UI component audit for Momentum CMS. Use when asked to audit, review, check, or validate a UI component. Checks Storybook stories, interaction tests, variants, kitchen sink integration, admin dashboard usage, accessibility, and responsive design (mobile-first). AUTOMATICALLY FIXES issues found and verifies with visual inspection. Triggers include "audit button", "review the card component", "check accessibility of tabs", or "/ui-audit <component-name>".

test-all

6
from DonaldMurillo/momentum-cms

Run the FULL Momentum CMS test suite — every single suite, no skips. Triggers on "test all", "test everything", "run all tests", "run the test all script", "test-all script", "run the full suite", "run every test", "test the whole thing", "make sure everything passes", "run test:all", or ANY variation asking to run all/every/full tests. Also triggers on typos like "test al", "tets all", "tes all". NEVER skip suites unless the user EXPLICITLY names suites to skip.

stroll-test

6
from DonaldMurillo/momentum-cms

End-to-end CLI stroll test of npm-published Momentum CMS packages. Scaffolds a fresh project with create-momentum-app, adds all plugins, runs migrations, starts server, and verifies everything works. Triggers include "stroll test", "cli stroll", "test published packages", or "/stroll-test".

skill-improve

6
from DonaldMurillo/momentum-cms

Self-improving skill loop. Analyzes eval failures, rewrites the skill, re-evaluates, and repeats until convergence. Run after /skill-eval produces baseline results.

skill-eval

6
from DonaldMurillo/momentum-cms

Run structured evaluations comparing skill vs no-skill performance. Measures assertion pass rates, timing, and output quality to systematically improve skills.

momentum-api

6
from DonaldMurillo/momentum-cms

Work with Momentum API for data operations in Angular components

migrations

6
from DonaldMurillo/momentum-cms

Run migrations, generate schemas, and manage code generation for Momentum CMS. Use when working with database migrations, Drizzle schema generation, type generation, or Angular schematics.

mcp-setup

6
from DonaldMurillo/momentum-cms

Set up the Momentum CMS MCP server plugin and generate Claude Code MCP config for AI tool integration. Use when connecting Claude Code (or any MCP client) to a Momentum CMS instance.

SYSTEM ROLE & BEHAVIORAL PROTOCOLS

6
from DonaldMurillo/momentum-cms

**ROLE:** Senior Frontend Architect & Avant-Garde UI Designer.

headless-primitive

6
from DonaldMurillo/momentum-cms

Author, extend, or repair primitives in libs/headless. Use when adding a new headless primitive, changing its accessibility contract, updating slots/state attrs, wiring overlay behavior, or expanding the example styling lab and tests.

e2e-test

6
from DonaldMurillo/momentum-cms

Write and validate Playwright E2E tests for Momentum CMS features. UI tests ALWAYS start from /admin dashboard and navigate via sidebar/dashboard — never go directly to deep URLs. Always starts the server and inspects the actual UI before writing assertions. Triggers include "write e2e tests for...", "add e2e tests", "test the admin UI for...", or "/e2e-test <feature>".