Bump version

From gaogg521/1ONE-ClaudeCode · View interactive version

Bump version is an AI agent skill from the GitHub repository gaogg521/1ONE-ClaudeCode. Use when bumping the 1ONE ClaudeCode version: update package.json, run checks, branch, commit, push, create PR, wait for merge, tag release.

How to use this skill

Skill file

Bump Version

Automate the 1ONE ClaudeCode version bump workflow: update version → quality checks → branch → commit → push → PR → tag.

Usage: /bump-version [version]

Workflow

Step 1: Pre-flight Checks

git branch --show-current
git status --short

Step 2: Pull Latest

git pull --rebase origin main

Fails → Stop: "Failed to pull latest code. Please resolve conflicts or network issues first."

Step 3: Determine Target Version

Read package.json → extract version field.

Display: "Bumping version: {current} → {target}"

Release line policy: GitHub tags follow package.json only. npm run dist:win does not bump version. After GitHub v1.22.0, main continues at 1.23.0+ (1.16.x was an internal patch line; use 1.23.0+ for public releases).

Step 4: Update package.json

Use Edit tool to replace:

Step 5: Quality Checks

bun run lint
bun run format
bunx tsc --noEmit

Step 6: Run Tests

bunx vitest run

Fails → Stop: "Tests failed. Please fix failing tests before bumping the version."

Step 7: Branch, Commit, Push

git checkout -b chore/bump-version-{target}
git add -A
git commit -m "chore: bump version to {target}"
git push -u origin chore/bump-version-{target}

Step 8: Create PR

gh pr create --base main \
  --title "chore: bump version to {target}" \
  --body "Bump version to {target}"

Display PR URL. Then pause:

"PR created: {URL}. Please notify a team member to merge it, then confirm to continue."

Wait for user confirmation before proceeding.

Step 9: Cleanup After Merge

git checkout main
git pull --rebase origin main
git branch -d chore/bump-version-{target}

Check if remote branch still exists:

git ls-remote --heads origin chore/bump-version-{target}

Step 10: Create and Push Tag

git tag v{target}
git push origin v{target}

Display: "Tag v{target} created and pushed. Version bump complete!"

Quick Reference

1. Must be on clean main
2. git pull --rebase
3. Determine target version
4. Edit package.json
5. lint + format + tsc
6. vitest run
7. branch chore/bump-version-{target} → commit → push
8. gh pr create → wait for merge
9. checkout main → pull → delete branch
10. git tag v{target} && git push origin v{target}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.