sync-version
August 22, 2026 · View on GitHub
sync-version
Category: config · Alpha: state · Invocation: /dev-kit:sync-version [vX.Y.Z] (human-invoked)
Sync local .claude-plugin/plugin.json:version to origin/main (or an explicit target). Same operation the pre-push hook runs automatically; use this skill when you want the sync committed before you push, when pre-push is not installed, or when a CI run reports a stale branch.
When to use it
- A PR is "behind" main by N bumps and the user wants to rebase without leaving the editor.
- A CI run failed
Version freshnessonHEAD < BASE. - The user wants to verify the local branch's version matches
origin/mainwithout pushing.
How it works
A 3-step deterministic sync:
- Read — resolve the current
plugin.json:versionand the target (default =origin/mainresolved viagit fetch origin main). - Compare — if local already equals target, exit 0 with
nothing to sync. If local is ahead, refuse (local is newer than origin — bump, don't sync). If local is behind by N>1, printbehind=Nand refuse (multiple-bump race; pull first). - Patch + verify — update only the
versionfield, validateplugin.jsonis still parseable, and printsynced old → new.
Backed by bin/sync-version.sh; the pre-push hook calls the same script with local < origin/main as the trigger. The hook refuses to push when plugin.json has uncommitted edits (avoids losing in-flight work).
Usage
# Default: sync to origin/main
/dev-kit:sync-version
# Explicit target
/dev-kit:sync-version v0.3.301
# Verify only (no write)
/dev-kit:sync-version --check
# Force-write when local has uncommitted edits (rare)
/dev-kit:sync-version --force
# Raw script
bin/sync-version.sh
bin/sync-version.sh --check
Related
/dev-kit:bump— the inverse operation (bump local ahead oforigin/main, push achore/bump-vX.Y.Zbranch).hooks/HOOK-REFERENCE.md§ pre-push — the auto-SYNC half of the pre-push hook.bin/sync-version.sh— the script the skill wraps.skills/sync-version/SKILL.md— full algorithm body.