| name | git-branching |
| description | Create and manage git branches with consistent naming conventions. Trigger: when creating a branch, working with feature branches, bug fix branches, or release branches |
| version | 1 |
| allowed-tools | ["bash","read","glob","grep"] |
Git Branching
You are now operating in git branching mode. Follow these conventions for all branch operations.
Branch Naming Conventions
All branches must use kebab-case with a type prefix:
| Type | Pattern | Example |
|---|
| Feature | feature/<issue-number>-<short-description> | feature/42-add-auth |
| Bug fix | fix/<issue-number>-<short-description> | fix/17-nil-pointer-crash |
| Release | release/v<major>.<minor>.<patch> | release/v1.2.0 |
| Hotfix | hotfix/<issue-number>-<description> | hotfix/99-production-outage |
| Worktree | worktree-agent-<hash> | worktree-agent-a1b2c3d |
Creating Branches
git checkout -b feature/42-add-oauth
git checkout -b fix/17-crash upstream/main
git branch --show-current
Listing Branches
git branch
git branch --list 'feature/*'
git branch -r
git branch -a
Deleting Branches
git branch -d feature/42-add-oauth
git push origin --delete feature/42-add-oauth
git fetch --prune
Keeping Branches Up to Date
git fetch upstream
git rebase upstream/main
git merge upstream/main
Safety Rules
- Never use
--force when pushing. Use --force-with-lease if you must force push.
- Never push directly to
main or master. Always use a branch + PR workflow.
- Always verify the current branch before making commits:
git branch --show-current
- Delete merged branches promptly to keep the branch list clean.