A Claude Code slash command for creating and managing hotfix branches with release workflow.
# Clone to your preferred location
git clone git@github.com:claude-commands/command-hotfix.git <clone-path>/command-hotfix
# Symlink (use full path to cloned repo)
ln -s <clone-path>/command-hotfix/hotfix.md ~/.claude/commands/hotfix.md/hotfix 1.2.1 # Create hotfix branch for version 1.2.1
/hotfix 1.2.1 --from=v1.2.0 # Branch from specific tag
/hotfix patch # Auto-increment patch version
/hotfix --list # Show active hotfix branches
/hotfix --finish # Merge and tag current hotfix
- Creates hotfix branch from release tag
- Guides through fix implementation
- Updates version and changelog
- Merges to main and release branches
- Creates release tag and cleans up
main ─────●─────────────●─────────
│ │
hotfix/1.2.1 └──●──●──●────┘
│ │
fix1 fix2 merge
Tags: v1.2.0 ──────────────────── v1.2.1
Hotfix Complete
Version: 1.2.1
Tag: v1.2.1
Changes Included:
| Commit | Message |
| ------- | ----------------------------- |
| abc1234 | fix: auth crash |
| def5678 | chore: bump version to 1.2.1 |
Merges:
- main: Merged successfully
- release/1.2.x: Merged successfully
| Option | Description |
|---|---|
--from |
Source tag to branch from |
--list |
Show active hotfix branches |
--finish |
Complete current hotfix |
--abort |
Abort current hotfix |
--no-tag |
Skip tagging |
- Git
- Claude Code with Opus 4.5 model access
cd <clone-path>/command-hotfix && git pull