engineering / Git & commits
branch-conventions
Provides conventional-commit branch-name prefixes (feat/, fix/, chore/) and the standard flow for creating a branch from the up-to-date default branch.
Put it to work.
Ask your agent to use branch-conventions, or let it load the skill when your task matches the description.
Use the branch-conventions skillInvocation syntax varies by agent. Use the skill name in your prompt, or your agent’s supported slash command.
About this skill
Standard branch naming and creation flow for feature work.
- Uses conventional prefixes:
feat/,fix/,chore/ - Detects the repo default branch (
mainormaster) before branching - Starts from an up-to-date default branch to reduce avoidable merge drift
Install
npx skills@latest add smeltery/skillsOr copy just this skill:
mkdir -p ~/.claude/skills/branch-conventions
curl -fsSL https://raw.githubusercontent.com/smeltery/skills/main/skills/engineering/branch-conventions/SKILL.md \
-o ~/.claude/skills/branch-conventions/SKILL.mdUsage
Use when creating a new branch for a feature, fix, or maintenance task.
Files
SKILL.md— canonical skill definition.
Read the full SKILL.md
Naming Convention
Branch names follow conventional commit type prefixes:
feat/<feature-name>- New featuresfix/<bug-name>- Bug fixeschore/<maintenance-name>- Maintenance tasks
Creating a Branch
Always create branches from an up-to-date default branch. The default branch is main or master depending on the repo — detect it before checking out:
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
git checkout "$DEFAULT_BRANCH"
git pull origin "$DEFAULT_BRANCH"
git checkout -b <type>/<branch-name>If origin/HEAD isn't set locally, run git remote set-head origin --auto once to populate it, or fall back to git branch -r | grep -E 'origin/(main|master)$' to pick the right one.
Examples
git checkout -b feat/add-user-avatars
git checkout -b fix/plan-export-timeout
git checkout -b chore/update-dependencies