Slash Command

/bump

Increment semantic version and create git tag with changelog

From versioning
Install
1
Run in your terminal
$
npx claudepluginhub vanman2024/dev-lifecycle-marketplace --plugin versioning
Details
Argument[major|minor|patch] [--dry-run] [--force]
Command Content

๐Ÿšจ EXECUTION NOTICE FOR CLAUDE

When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.

YOU are the executor. This is NOT an autonomous subprocess.

  • โœ… The phases below are YOUR execution checklist
  • โœ… YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
  • โœ… Complete ALL phases before considering this command done
  • โŒ DON't wait for "the command to complete" - YOU complete it by executing the phases
  • โŒ DON't treat this as status output - it IS your instruction set

Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.

See @CLAUDE.md section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.


Security Requirements

CRITICAL: All generated files must follow security rules:

@docs/security/SECURITY-RULES.md

Key requirements:

  • Never hardcode API keys or secrets
  • Use placeholders: your_service_key_here
  • Protect .env files with .gitignore
  • Create .env.example with placeholders only
  • Document key acquisition for users

Arguments: $ARGUMENTS

Goal: Increment semantic version (major/minor/patch), update version files, generate changelog, and create annotated git tag

Core Principles:

  • Parse bump type from arguments
  • Validate git repository state
  • Delegate version bump execution to agent
  • Provide push instructions or auto-push

Available Skills

This commands has access to the following skills from the versioning plugin:

  • version-manager:

To use a skill:

!{skill skill-name}

Use skills when you need:

  • Domain-specific templates and examples
  • Validation scripts and automation
  • Best practices and patterns
  • Configuration generators

Skills provide pre-built resources to accelerate your work.


Phase 1: Parse Arguments and Validate

Parse bump type and flags:

Actions:

  • Extract bump type from first argument: major, minor, or patch
  • Check for --dry-run flag (preview only, no changes)
  • Check for --force flag (auto-push without confirmation)
  • If no bump type provided, default to patch
  • Validate bump type is one of: major, minor, patch

Validate prerequisites:

  • Verify git repository: !{bash git rev-parse --git-dir}
  • Check working tree is clean: !{bash git status --porcelain}
    • If dirty, exit with error: "Uncommitted changes detected. Commit or stash first."
  • Verify VERSION file exists: !{bash test -f VERSION && echo "exists" || echo "missing"}
    • If not found, exit with error: "Run /versioning:setup first"
  • Verify git user configured: !{bash git config user.name && git config user.email}

Phase 2: Read Current Version

Load current version:

Actions:

  • Read VERSION file: @VERSION
  • Parse JSON to extract current version string
  • Validate version format matches semantic versioning: MAJOR.MINOR.PATCH
  • Display current version: "Current version: X.Y.Z"

Phase 3: Execute Version Bump via Agent

Delegate to version-bumper agent:

Actions:

  • Invoke version-bumper agent with parameters:
    • bump_type: major|minor|patch
    • current_version: from Phase 2
    • dry_run: true|false
    • force_push: true|false
  • Agent will:
    • Calculate new version
    • Generate changelog from commits
    • Update VERSION, pyproject.toml, package.json
    • Create git commit and tag
    • Handle push (if --force) or return status

Use Task() to invoke agent:

Task(agent="version-bumper", parameters={
  "bump_type": "<major|minor|patch>",
  "current_version": "<current_version>",
  "dry_run": <true|false>,
  "force_push": <true|false>
})

Phase 4: Display Results

Show results based on agent status:

Actions:

  • Parse agent response JSON
  • Display results based on status:

If status is "dry_run_complete":

DRY RUN - No changes made

Would bump: <old_version> โ†’ <new_version>

Changelog Preview:
<changelog>

If status is "pushed":

โœ… Version bumped and pushed: <old_version> โ†’ <new_version>

Tag: <tag_name>
Commit: <commit_hash>

Monitor release: gh run list --workflow=version-management.yml

If status is "ready_to_push":

โœ… Version bumped: <old_version> โ†’ <new_version>

๐Ÿ“ Changes:
  - VERSION: โœ“
  - pyproject.toml: โœ“ (if exists)
  - package.json: โœ“ (if exists)
  - Commit: <commit_hash>
  - Tag: <tag_name>

๐Ÿ“‹ Changelog:
<changelog>

๐Ÿš€ To complete the release:

1. Push changes and tags:
   git push && git push --tags

2. GitHub Actions will:
   - Create GitHub release
   - Publish to PyPI/npm (if configured)
   - Update CHANGELOG.md

3. Monitor release:
   gh run list --workflow=version-management.yml

๐Ÿ“Œ Rollback (if needed):
   /versioning:rollback <new_version>

If status is "error":

  • Display error message
  • Provide suggested fixes based on error type

Error Handling

Handle failures from agent:

  • Working tree dirty โ†’ Exit with uncommitted changes error
  • VERSION file missing โ†’ Exit with "run /versioning:setup" error
  • Invalid bump type โ†’ Exit with valid options (major/minor/patch)
  • Git tag already exists โ†’ Exit with "tag v<version> already exists"
  • No commits since last tag โ†’ Exit with "no changes to release"

Display error context and suggested fixes for each error type.

Stats
Parent Repo Stars1
Parent Repo Forks0
Last CommitNov 17, 2025