Agent Skillsumbraco/Umbraco-CMS › umb-bump-version

umb-bump-version

GitHub

自动更新 Umbraco CMS 项目中多个关键文件的版本号,包括 version.json、package.json 及 lock 文件。支持版本校验、变更检测与提交,适用于发布前的版本升级场景。

.claude/skills/umb-bump-version/SKILL.md umbraco/Umbraco-CMS

Trigger Scenarios

用户要求提升或设置 Umbraco 版本号 执行发布流程中的版本更新步骤

Install

npx skills add umbraco/Umbraco-CMS --skill umb-bump-version -g -y
More Options

Non-standard path

npx skills add https://github.com/umbraco/Umbraco-CMS/tree/main/.claude/skills/umb-bump-version -g -y

Use without installing

npx skills use umbraco/Umbraco-CMS@umb-bump-version

指定 Agent (Claude Code)

npx skills add umbraco/Umbraco-CMS --skill umb-bump-version -a claude-code -g -y

安装 repo 全部 skill

npx skills add umbraco/Umbraco-CMS --all -g -y

预览 repo 内 skill

npx skills add umbraco/Umbraco-CMS --list

SKILL.md

Frontmatter
{
    "name": "umb-bump-version",
    "description": "Bump the Umbraco CMS version across all required files. Use when the user asks to bump, update, or set the version number — e.g., \"bump version to 17.3.4\", \"set version to 18.0.0-rc\", \"update version\". Accepts the target version as an argument.",
    "argument-hint": "<version> (e.g., 17.3.4, 18.0.0-rc)"
}

Bump Version - Umbraco CMS

Updates the Umbraco CMS version string across all files that track it.

Do NOT use AskUserQuestion if a version argument is provided. Only ask if $ARGUMENTS is empty or cannot be parsed as a version.

Arguments

  • $ARGUMENTS - Required: the target version string (e.g., 17.3.4, 18.0.0-rc)

Files to Update

The following 5 files must be updated with the new version:

# File Field
1 version.json "version"
2 src/Umbraco.Web.UI.Client/package.json "version"
3 src/Umbraco.Web.UI.Client/package-lock.json top-level "version" AND packages[""].version
4 tests/Umbraco.Tests.AcceptanceTest/package.json "version"
5 tests/Umbraco.Tests.AcceptanceTest/package-lock.json top-level "version" AND packages[""].version

Note: For major version bumps (e.g., 17.x to 18.x), src/Umbraco.Web.UI.Login/package.json has a caret-ranged dependency on @umbraco-cms/backoffice (e.g., ^17.2.0) that will need manual updating. This skill does not handle that — major bumps involve many other changes beyond version strings.

Instructions

1. Parse and Validate the Version

Extract the version from $ARGUMENTS. It must be a valid semver-like string (e.g., 17.3.4, 18.0.0-rc, 17.4.0-preview.1). If no version is provided or it cannot be parsed, ask the user for the target version.

2. Read the Current Version

Read version.json and extract the current "version" value. If the current version already equals the target version, report that the version is already set and stop — do not edit, stage, or commit anything.

Otherwise, display both versions:

Bumping version: {current} -> {target}

3. Update All Files

Update each of the 5 files listed above, replacing the old version with the new version. For each file:

  • version.json: Replace the "version" value.
  • package.json files: Replace the "version" value (near the top of the file).
  • package-lock.json files: Replace BOTH the top-level "version" value AND the "version" inside the "packages": { "": { ... } } block. These are always in the first ~10 lines of the file.

Use targeted edits — do NOT rewrite entire files. Be precise to avoid changing version strings in dependency entries.

4. Verify

After all edits, grep for the target version value across the 5 files to confirm all updates landed correctly:

grep -n "\"version\": \"{version}\"" version.json src/Umbraco.Web.UI.Client/package.json src/Umbraco.Web.UI.Client/package-lock.json tests/Umbraco.Tests.AcceptanceTest/package.json tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Expect exactly 7 matches (one per package.json and version.json, two per package-lock.json).

5. Stage and Commit

Stage only the 5 changed files:

git add version.json src/Umbraco.Web.UI.Client/package.json src/Umbraco.Web.UI.Client/package-lock.json tests/Umbraco.Tests.AcceptanceTest/package.json tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Then commit with the message Bump version to {version}. — replacing {version} with the target version:

git commit -m "Bump version to {version}."

6. Report

Output a summary:

Version bumped to {version} in:
- version.json
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- tests/Umbraco.Tests.AcceptanceTest/package.json
- tests/Umbraco.Tests.AcceptanceTest/package-lock.json

Changes staged and committed.

Version History

  • c1fa32e Current 2026-08-20 13:47

Same Skill Collection

.claude/skills/umb-release-notes/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/core-add-module/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-add-localization/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-add-value-type/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-condition/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-extension-type/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-kind/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-package/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-repository/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-create-workspace/SKILL.md
src/Umbraco.Web.UI.Client/.claude/skills/general-deprecate-api/SKILL.md
.claude/skills/umb-review/SKILL.md
.claude/skills/umb-update-openapi/SKILL.md
.claude/skills/umb-update-server-dependencies-for-minor/SKILL.md

Metadata

Files
0
Version
c1fa32e
Hash
2b2a92f0
Indexed
2026-08-20 13:47

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-28 10:33
浙ICP备14020137号-1 $방문자$