Create git branches following naming conventions. Use when creating new feature branches, bug fix branches, or any branch for development work. Defines the branch naming standards used across commit and PR skills.
/plugin marketplace add sontek/agent-skills/plugin install agent-skills@agent-skills-localThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Create git branches following consistent naming conventions.
Branch names should follow the pattern: <type>/<short-description>
The type should match the primary type of work being done (same as commit types).
| Type | When to Use | Example |
|---|---|---|
feat | New feature or functionality | feat/add-user-auth |
fix | Bug fix | fix/null-pointer-error |
ref | Refactoring (no behavior change) | ref/extract-validation |
perf | Performance improvement | perf/optimize-queries |
docs | Documentation changes | docs/update-readme |
test | Adding or correcting tests | test/add-integration-tests |
build | Build system or dependencies | build/upgrade-webpack |
ci | CI/CD configuration | ci/add-github-actions |
chore | Maintenance, cleanup, or housekeeping | chore/update-deps |
style | Code formatting (no logic change) | style/format-components |
The description should be:
feat/add-user-auth # Clear, concise, descriptive
fix/null-pointer-dashboard # Specific about what's being fixed
ref/extract-validation-logic # Clear refactoring goal
test/add-api-tests # Clear testing scope
feature/add-authentication-system-for-users # Too long
fix-bug # Too vague
feat/AddUserAuth # Wrong case (use lowercase)
john/my-work # Personal prefix (not descriptive)
feat_add_auth # Wrong separator (use hyphens)
Before creating a new branch, verify where you are:
# Check current branch
git branch --show-current
# See if you have uncommitted changes
git status
If you have uncommitted changes:
git stash# Create and switch to new branch from current location
git checkout -b <type>/<short-description>
If you need to branch from a specific base (like main or develop):
# Make sure base branch is up to date
git checkout main
git pull
# Create new branch from main
git checkout -b feat/add-user-auth
# Starting from main
git checkout main
git pull
git checkout -b feat/add-oauth
# Verify you're on the new branch
git branch --show-current # Should output: feat/add-oauth
# Starting from develop
git checkout develop
git pull
git checkout -b fix/session-timeout
# Verify
git branch --show-current # Should output: fix/session-timeout
# From current branch (already has related work)
git checkout -b ref/extract-utils
# Verify
git branch --show-current # Should output: ref/extract-utils
# If you need to branch from main/master
git checkout main
git pull
# Create with appropriate type and description
git checkout -b feat/add-feature-name
# Confirm you're on the new branch
git branch --show-current
# Should show: feat/add-feature-name
# Push and set upstream tracking
git push -u origin feat/add-feature-name
| Mistake | Bad Example | Good Example |
|---|---|---|
| Too long | feat/add-user-system | feat/add-user-auth |
| Too vague | fix/bug | fix/null-pointer |
| Wrong case | Feat/AddAuth | feat/add-auth |
| Personal prefix | john/feature | feat/feature-name |
| Wrong separator | feat_add_auth | feat/add-auth |
| No type | add-authentication | feat/add-auth |
Other skills reference these conventions:
<type>/<short-description> formatgit checkout -b <branch-name> to create and switch to new branchgit branch --show-current to verify current branchgit status to check for uncommitted changesgit push -u origin <branch-name> to push new branch and set trackinggit checkout -b with -i or interactive flags (not
supported)