$npx -y skills add PaulRBerg/agent-skills --skill bump-releaseCut a release: bump versions, write changelogs, commit, tag.
| 1 | # Bump Release |
| 2 | |
| 3 | Release one package or several packages with version bumps, changelog entries, commits, and tags. Supports |
| 4 | single-package repositories, workspace monorepos, stable releases, beta releases, and dry runs. |
| 5 | |
| 6 | ## Arguments |
| 7 | |
| 8 | - `packages`: optional package names or directories. Omit in a single-package repository. |
| 9 | - `version`: optional explicit semver. Valid only for one user-selected package. |
| 10 | - `--beta`: create or advance a `-beta.X` prerelease. |
| 11 | - `--dry-run`: preview without modifying files, committing, or tagging. |
| 12 | |
| 13 | ## Helper Interface |
| 14 | |
| 15 | Resolve `<skill-dir>` from this `SKILL.md`. Keep helper stdout as JSON and diagnostics on stderr. |
| 16 | |
| 17 | ```sh |
| 18 | node "<skill-dir>/scripts/plan-release.mjs" \ |
| 19 | [--cwd <repo>] [--beta] [--dry-run] [--version <semver>] \ |
| 20 | [--package <name-or-dir>]... |
| 21 | ``` |
| 22 | |
| 23 | The read-only discovery output has `schemaVersion: 2`. It reports package identity, complete per-package `changedFiles`, |
| 24 | workspace edges and declared ranges, previous-tag facts, selected targets, and worktree state. `changeHints` are |
| 25 | filename-based, explicitly non-authoritative navigation hints. Never use them to decide release relevance or changelog |
| 26 | inclusion. |
| 27 | |
| 28 | After the agent decides every stable patch/minor/major version, write discovery JSON to a temporary file and run: |
| 29 | |
| 30 | ```sh |
| 31 | uv run "<skill-dir>/scripts/finalize-release-plan.py" \ |
| 32 | --discovery <discovery.json> \ |
| 33 | [--version <package>=<semver>]... |
| 34 | ``` |
| 35 | |
| 36 | The finalizer performs beta and explicit-version transitions, stable prerelease promotion, npm-range satisfaction, |
| 37 | simple dependency-range suggestions, and dependency ordering. It reports complex ranges, peer ranges, dependency cycles, |
| 38 | and stable versions not supplied by the agent as unresolved decisions. When an unsatisfied edge adds a dependent, choose |
| 39 | that package's release version and rerun with another `--version` assignment. The finalizer never chooses a regular |
| 40 | release magnitude or dependency policy. |
| 41 | |
| 42 | For every stable changelog written, validate its deterministic structure: |
| 43 | |
| 44 | ```sh |
| 45 | uv run "<skill-dir>/scripts/validate-changelog.py" \ |
| 46 | --file <CHANGELOG.md> --version <semver> --date <YYYY-MM-DD> [--tag <tag>] |
| 47 | ``` |
| 48 | |
| 49 | This checks the expected release and date, heading/category order, allowed categories, list structure, and release-link |
| 50 | tag. It does not judge importance, wording, or semantic category. |
| 51 | |
| 52 | ## Workflow |
| 53 | |
| 54 | 1. Run discovery with the user arguments mapped directly. Exit `2` means the target is not a releasable Git/package |
| 55 | repository; exit `64` means invalid input. Stop on either. |
| 56 | 2. Require `workingTree.clean`. Do not absorb unrelated work. |
| 57 | 3. Resolve unknown or ambiguous package selection. An explicit user version remains single-package only. |
| 58 | 4. Inspect each target's complete `changedFiles` and the net diff from its previous tag. Decide whether the surviving |
| 59 | changes warrant a release. Runtime environments, refactors, documentation, tests, and tooling can all be relevant in |
| 60 | context; filenames never decide this. |
| 61 | 5. For every relevant stable target without an explicit version, choose patch, minor, or major from the consumer-facing |
| 62 | change. For beta releases, let the finalizer compute the mechanical transition. |
| 63 | 6. Run the finalizer. Review unsatisfied workspace edges. Accept its suggestion only for a simple dependency range when |
| 64 | that policy fits; choose peer and complex range policy explicitly. Add dependents and their agent-chosen release |
| 65 | versions, then rerun until the package set and dependency order are resolved. |
| 66 | 7. For a dry run, report the ordered package/version plan, range edits, changelog/tag/commit actions, and agent-decided |
| 67 | skips. Stop before writes. |
| 68 | 8. For a stable release, read `references/common-changelog.md` and write consumer-facing entries from the bounded net |
| 69 | diff. The agent owns entry selection, wording, importance, and category. Beta releases do not update changelogs. |
| 70 | 9. Update manifests and accepted dependency ranges. Validate every stable changelog with the helper. |
| 71 | 10. Format once using the repository's narrowest established command. |
| 72 | 11. Commit and tag dependencies before dependents. Use one commit and one annotated tag per package: |
| 73 | - single-package commit: `docs: release <version>`; |
| 74 | - monorepo commit: `docs: release <package> <version>`; |
| 75 | - single-package tag: follow observed `v<version>` or bare-semver facts; |
| 76 | - monorepo tag: follow observed package tag facts, defaulting to `<package-dir>@<version>`. |
| 77 | 12. Do not push. Recommend the exact `git push origin --tags` command after success. |
| 78 | |
| 79 | ## Safety and Completion |
| 80 | |
| 81 | Helper failures mean malformed input, violated invariants, or failed validation; an agent decision remaining unresolved |
| 82 | is data in the JSON, not a helper failure. Discovery and dry-run are read-only. Do not |