name: git-branching description: Creates Git branches following naming conventions (feature/PROJ-123-desc, fix/PROJ-123-desc, refactor/PROJ-123-desc). This skill should be used when creating branches for assigned work, starting work on tickets/issues, or establishing branch naming patterns for feature, fix, refactor, hotfix, docs, or chore branches.
Git Branch Creation
Automatically create properly named Git branches following project conventions.
Use Cases
Why use standardized branch names:
- Team consistency - Everyone follows same pattern; no confusion about branch purpose
- Automation-friendly - CI/CD pipelines can trigger based on prefix (feature/, fix/)
- Traceability - Branch name links directly to ticket/issue for context
- Clear intent -
fix/vsfeature/vsrefactor/signals what changed - Convention over memory - No need to remember project standards; skill enforces them
When to invoke:
- Starting work on assigned tickets
- Creating branches for features, fixes, refactors
- Need to follow team/project naming standards
- Integrating with worktree-manager for full automation
Branch Naming Conventions
Format Patterns
- Features:
feature/PROJ-123-short-description- Example:
feature/AUTH-101-user-login
- Example:
- Bug Fixes:
fix/PROJ-123-short-description- Example:
fix/AUTH-105-session-timeout
- Example:
- Refactoring:
refactor/PROJ-123-short-description- Example:
refactor/AUTH-108-simplify-api
- Example:
- Hotfixes:
hotfix/PROJ-123-short-description- Example:
hotfix/PROD-999-critical-security
- Example:
- Documentation:
docs/short-description- Example:
docs/setup-guide
- Example:
- Chores:
chore/short-description- Example:
chore/update-deps
- Example:
Naming Rules
- Use lowercase only
- Separate words with hyphens (kebab-case)
- Keep descriptions concise but meaningful (3-5 words max)
- Always include ticket number when applicable
- Limit total length to 50 characters
Instructions
When invoked with $ARGUMENTS:
Parse the Input
- Extract ticket number (PROJ-123, JIRA-456, etc.)
- Identify work type (feature, fix, refactor, hotfix, docs, chore)
- Extract description keywords
Determine Branch Type
- If unclear, ask: "Is this a feature, fix, or refactor?"
- Default to
feature/if adding new functionality - Use
fix/for bug fixes - Use
refactor/for code improvements without behavior changes
Create Branch Name
- Format:
TYPE/TICKET-description - Convert description to lowercase with hyphens
- Validate length (50 characters max)
- Format:
Verify Current State
git status git branch --show-currentCreate and Switch to Branch
git checkout -b TYPE/TICKET-descriptionConfirm Creation
git branch --show-current
Examples
Input: "PROJ-123 add user authentication"
git checkout -b feature/PROJ-123-user-authentication
Input: "fix bug JIRA-456 login redirect"
git checkout -b fix/JIRA-456-login-redirect
Input: "refactor AUTH-789 simplify token validation"
git checkout -b refactor/AUTH-789-simplify-token-validation
Error Handling
- Branch already exists: Inform and offer to switch or create with suffix
- Not on main/master: Warn and ask whether to switch first
- Uncommitted changes: Suggest stashing or committing first