git-branch
Generates and validates conventional branch names. Use when naming a new branch, renaming an existing branch, or asking "what should I name this branch".
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Git Branch
Before generating a branch name, read:
-
standards/branch.md— format, types, length limit, and constraints
Follow it exactly.
Context
Run scripts/context.sh to gather git context before generating a branch name.
Guards
- If already on main or master, stop:
❌ Cannot rename a protected branch. - If branch name already follows conventions, stop:
✅ Branch name already follows conventions. - If no commits and no args provided, stop:
❌ No commits or description to derive a branch name from.
Response Format
Preview
- Current: <current_branch>
- Suggested: <suggested_name>
- Length: /50
- Status: <LOCAL_ONLY | EXISTS on remote>
- Analysis:
If EXISTS on remote, warn and stop:
⚠️ Branch exists on remote. Rename manually via GitHub UI or gh CLI to avoid breaking open PRs.
Final command
Only output if LOCAL_ONLY:
git branch -m <current> <suggested>
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-03-11
- Index updated
- 2026-03-11
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!