Semver parser and bumper
Skill kjuhwa/skills-hub/skills/release/semver-parser-and-bumper
Parse semantic version strings and bump major/minor/patch componentsFrom its SKILL.md
npx -y skills add kjuhwa/skills-hub --skill semver-parser-and-bumperAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.2 KB, 223 tokens by cl100k_base, as published. Nobody here has run it
Minimal semver parse + bump
Avoid pulling semver just to bump a version. A 10-line helper covers the 99% case.
Mechanism
function parseSemver(v) {
const m = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(v);
if (!m) throw new Error(`Not semver: ${v}`);
return { major: +m[1], minor: +m[2], patch: +m[3] };
}
function bumpSemver(v, level) {
const s = parseSemver(v);
if (level === 'major') return `${s.major + 1}.0.0`;
if (level === 'minor') return `${s.major}.${s.minor + 1}.0`;
return `${s.major}.${s.minor}.${s.patch + 1}`;
}
When to reuse
Release automation, changelog generators, plugin version managers — anywhere a single-purpose tool shouldn't carry a dependency graph.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.