From ant-common-kit
Adopt and operate a structure-based MAJOR.MINOR.PATCH versioning scheme computed locally from the git commit graph at build time — no tags, CI, or tokens. MINOR = merge (MR/PR) count, PATCH = direct main commits since the last merge, MAJOR = a human-chosen milestone. Suited to internal/in-house products that need a monotonically increasing version to identify which build is which (for public libraries, prefer standard SemVer). Covers installing version.sh + version.conf, build-system wiring (Make/Go/Node/Python), MAJOR bumps, and tagging vX.Y.Z at actual release. Use when user says /git-versioning, 'set up versioning', 'version scheme', 'how is the version computed', 'bump major', 'tag a release', 'version 붙이기'. 트리거: 버전 관리, 버전 체계, 버전 매기기, 버전 계산, 버전 도입, 메이저 올리기, 릴리스 태그, 버전 스킬.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ant-common-kit:git-versioningThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Adopt and operate a `MAJOR.MINOR.PATCH` version scheme that is **computed locally at
Adopt and operate a MAJOR.MINOR.PATCH version scheme that is computed locally at
build time from the git commit graph. It needs no tags, CI, or tokens, and is
deterministic — the same commit always yields the same version.
MR_BASE → +1 per merge, resets patch to 0MAJOR_BASE (a human-chosen milestone) + overflow carry (effectively never)The number is a monotonically increasing build identifier pointing at "where in git this build sits." For the full rationale and the comparison to the standard, see references/versioning-policy.md.
init./git-versioning -- print the currently computed version (default)
/git-versioning status -- same as above + breakdown (MAJOR/MINOR/PATCH basis)
/git-versioning init -- install version.sh + version.conf + policy doc, then wire the build system
/git-versioning bump-major -- manually bump the MAJOR milestone (edit version.conf)
/git-versioning release -- guide tagging vX.Y.Z at an actual release
/git-versioning explain -- explain what this scheme is and why it differs from the standard
status (default)scripts/version.sh exists at the project root, run it; otherwise run this skill's
scripts/version.sh to print the version.status also shows the breakdown — gather these git facts into a table:
git rev-list --merges --count HEAD → MINOR basis (merge count)git rev-list --count --first-parent <last-merge>..HEAD → PATCH basis (commits since last merge)MAJOR_BASE/MR_BASE from version.confgit diff-index --quiet HEAD → dirty stateversion.sh is not installed yet, recommend init.initInstall the scheme into the project. In order:
scripts/version.sh — copy this skill's scripts/version.sh
to the project's scripts/version.sh and chmod +x. If it already exists, confirm before
overwriting.version.conf (repo root) — defaults during 0.x:
# Build version baseline — read by scripts/version.sh. Policy: <policy doc path chosen in step 4>
MAJOR_BASE=0
MR_BASE=0
{PROJECT}. Decide the destination path by first detecting the project's
doc convention: check CLAUDE.md for a doc-layout convention, or an existing docs folder
(brain/, docs/, para/, …). The default is docs/versioning.md. But always check
whether the destination is .gitignored — e.g. if docs/ is ignored, the policy doc
never gets committed and silently disappears (verify with git check-ignore <path>). In
that case place it on a tracked doc path (e.g. brain/areas/ when the project uses brain),
and match the policy-path mention in the version.conf comment and the version.sh header
accordingly.bash scripts/version.sh and --dev, show that the values are sensible,
and note that a non-shallow clone is required (it counts merges).Outputs are created in the user's project (not inside the skill directory).
bump-majorRaise MAJOR for a milestone (rare). Procedure in versioning-policy.md §4:
git rev-list --merges --count <main-branch> (e.g. origin/main).version.conf — raise MAJOR_BASE to the target major and set MR_BASE to the merge
count above → MINOR resets to 0.<new-major>.0.x.version.sh.releaseTag a QA-passed build as an actual release. Tags are created only at actual releases (policy §3):
-dirty).bash scripts/version.sh → e.g. 0.21.0.git tag v0.21.0
git push origin v0.21.0
explainUsing versioning-policy.md as the basis, explain what this scheme is (§1) and how it differs from standard SemVer (§5), at the user's level. "Why not semantic-release" is §0.
| File | Purpose |
|---|---|
| scripts/version.sh | Single source of version computation (language-agnostic, pure git). init copies it into the project. |
| references/versioning-policy.md | Policy, rationale, comparison to the standard. init copies it to the project's doc-convention path. |
| references/build-wiring.md | Make/Go/Node/Python/generic build-wiring recipes. |
v (0.21.0); only release tags use vX.Y.Z.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub poorants/ant-skills --plugin ant-common-kit