← Back to all skills

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.

Markdown workflowYou or your agent

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 skill

Invocation 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 (main or master) before branching
  • Starts from an up-to-date default branch to reduce avoidable merge drift

Install

bash
npx skills@latest add smeltery/skills

Or copy just this skill:

bash
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.md

Usage

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 features
  • fix/<bug-name> - Bug fixes
  • chore/<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:

bash
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

bash
git checkout -b feat/add-user-avatars
git checkout -b fix/plan-export-timeout
git checkout -b chore/update-dependencies

The Smeltery library

Find your next step.

Good places to start

smeltery / skills

A little direction goes a long way

What’s next?