一键导入
bump-version
Bump version for kumiki and/or kigumi, commit to main, create release tags, and push.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Bump version for kumiki and/or kigumi, commit to main, create release tags, and push.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Trigger GitHub Actions publish workflows for kumiki and/or kigumi without changing versions.
Check whether the current workspace is a kumiki project, initialize it if not, and confirm the setup is ready.
基于 SOC 职业分类
| name | bump-version |
| description | Bump version for kumiki and/or kigumi, commit to main, create release tags, and push. |
Use this skill when asked to bump version(s) for kumiki and/or kigumi and publish git tags.
patch unless user specifies minor or major.main.kumiki-v<version>kigumi-v<version>kumiki and kigumi must share the same major.minor version at all times. kigumi enforces this at runtime and will refuse to start if they diverge.
0.3.1, 0.3.2, …) are independent — only bump the project that changed.minor/major bump, always target both.target: kumiki, kigumi, or bothbump: patch | minor | major (default patch)explicit_version: optional exact version string (e.g. 0.3.0) — when set, skip the bump arithmetic and write this version directly. Requires target=both if used for a minor/major sync.git status --porcelainmain:
git checkout maingit pull --ff-onlyminor/major: update hardcoded kumiki version fixtures in kigumi tests (see below) and
run cd kigumi && npm run test:unit to confirm.CHANGELOG.md (see below).main.If explicit_version is provided, use it directly instead of running bump arithmetic.
Files to update:
pyproject.toml field project.versionkumiki/__init__.py field __version__Suggested command:
python3 - <<'PY'
import re
from pathlib import Path
bump = "patch" # replace at runtime, or set new = "X.Y.Z" directly
explicit = "" # replace with explicit_version if provided
pyproject = Path("pyproject.toml")
text = pyproject.read_text(encoding="utf-8")
m = re.search(r'(?m)^version = "([^"]+)"$', text)
current = m.group(1)
if explicit:
new = explicit
else:
major, minor, patch = map(int, current.split("."))
if bump == "major":
major, minor, patch = major + 1, 0, 0
elif bump == "minor":
minor, patch = minor + 1, 0
else:
patch += 1
new = f"{major}.{minor}.{patch}"
text = re.sub(r'(?m)^version = "[^"]+"$', f'version = "{new}"', text, count=1)
pyproject.write_text(text, encoding="utf-8")
init_py = Path("kumiki/__init__.py")
init_text = init_py.read_text(encoding="utf-8")
init_text = re.sub(r'(?m)^__version__\s*=\s*"[^"]+"$', f'__version__ = "{new}"', init_text, count=1)
init_py.write_text(init_text, encoding="utf-8")
print(new)
PY
Tag: kumiki-v<new_version>
File to update:
kigumi/package.json field versionSuggested command:
node - <<'NODE'
const fs = require('fs');
const p = 'kigumi/package.json';
const bump = 'patch'; // replace at runtime
const explicit = ''; // replace with explicit_version if provided
const pkg = JSON.parse(fs.readFileSync(p, 'utf8'));
let newVersion;
if (explicit) {
newVersion = explicit;
} else {
let [major, minor, patch] = pkg.version.split('.').map(Number);
if (bump === 'major') {
major += 1; minor = 0; patch = 0;
} else if (bump === 'minor') {
minor += 1; patch = 0;
} else {
patch += 1;
}
newVersion = `${major}.${minor}.${patch}`;
}
pkg.version = newVersion;
fs.writeFileSync(p, `${JSON.stringify(pkg, null, 2)}\n`, 'utf8');
console.log(pkg.version);
NODE
Tag: kigumi-v<new_version>
When bumping minor or major (i.e. the shared major.minor changes), kigumi's
installOrUpdateKumiki version-coupling check will reject any test fixture that hardcodes a
kumiki version from the old major.minor line. This has caused CI failures before (kigumi
0.4.0 release: tests mocked a python -c ... m.version("kumiki") response of 0.3.2/0.3.0,
which failed the coupling check against the new 0.4 line).
Before committing, on any minor/major bump:
grep -rn "m\.version(\"kumiki\")" -A3 kigumi/__tests__/ | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"
This surfaces version strings returned by mocked spawn/subprocess calls simulating an
installed kumiki (typically in kigumi/__tests__/project-initializer.test.js, near
createMockChildProcess({ stdoutText: '<version>\n' }) following a
snippet.includes('m.version("kumiki")') check). Any fixture version whose major.minor doesn't
match the new kumiki version must be bumped to the new major.minor line (e.g. 0.3.2 →
0.4.0), preserving relative ordering where a test asserts an upgrade from one version to a
later one (e.g. 0.3.0 → 0.3.2 becomes 0.4.0 → 0.4.1, not both the same value, if the
test is specifically checking that an upgrade path works).
After editing, run the kigumi unit tests locally before committing:
cd kigumi && npm run test:unit
This check is a no-op (nothing to change) for patch-only bumps, since patch bumps don't change the major.minor line the coupling check keys off of.
CHANGELOG.md follows Keep a Changelog. One shared
changelog covers both projects; each release entry has ### kumiki / ### kigumi
subsections (omit whichever project wasn't part of this release).
git tag --list 'kumiki-v*' 'kigumi-v*' --sort=-creatordate | head -1
git log --oneline <last_tag>..HEAD -- kumiki/ tests/ patterns/
git log --oneline <last_tag>..HEAD -- kigumi/
[Unreleased] section in CHANGELOG.md. The user may have already hand-written
entries there for important changes — do not duplicate anything already listed. Summarize only
what's not already covered.Added, Changed,
Fixed, Removed, Deprecated, Security). It's fine to omit minor/internal changes — capture
the major points: new features, notable fixes, and especially breaking changes.
CHANGELOG.md:
[Unreleased] content into a new dated section: ## [X.Y.Z] - YYYY-MM-DD
(use today's date). If both projects bumped to different versions in a patch-only release,
title the section after whichever bump is the "headline" one, or use both, e.g.
## [kumiki 0.3.7 / kigumi 0.3.6] - YYYY-MM-DD — use judgment; most releases bump both to the
same version and a single version number in the header is fine.## [Unreleased] section above it (just the heading, no subheadings —
add those only when something is actually added there).Before committing, always regenerate the bundled usage instructions:
cat docs/agent_usage_instructions.md > kigumi/.generated/bundled-usage-instructions.md
Single commit message when both are bumped:
Release kumiki vX.Y.Z and kigumi vA.B.CSingle-target messages:
Release kumiki vX.Y.ZRelease kigumi vA.B.CCommands:
git add pyproject.toml kumiki/__init__.py kigumi/package.json kigumi/.generated/bundled-usage-instructions.md CHANGELOG.md
# also add kigumi/__tests__/project-initializer.test.js (or wherever fixtures were updated) if this was a minor/major bump
git commit -m "<message>"
git tag -a "kumiki-vX.Y.Z" -m "Release kumiki vX.Y.Z"
git tag -a "kigumi-vA.B.C" -m "Release kigumi vA.B.C"
git push origin main
git push origin <tag1> <tag2>
Only create/push relevant tag(s) for selected targets.
git show --name-only --stat HEADgit tag --list 'kumiki-v*' 'kigumi-v*' --sort=-creatordate | headDo not trigger publishing in this skill. Pushing the tags is sufficient — release.yml triggers automatically on tag push and routes jobs by tag prefix (kumiki-v* → kumiki jobs, kigumi-v* → kigumi jobs). Do NOT manually dispatch the workflow after pushing tags; doing so duplicates the publish step and causes a failure.