agentleFS
bordenetbordenet/superpowers-plus/skills/engineering/git-branch-conventions/skill.md

git-branch-conventions

Skill8 starsChanged 6 months agoMITView on GitHub

Use when running git checkout -b, git switch -c, git worktree add -b, or any command that creates a new work branch — enforces semantic prefix naming.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask whether there's an associated issue in the project's tracker.

    line 34
  2. Very specific:

    Verify the identifier resolves to a real, open issue via the issue-verify skill before using it in a branch name, commit, or PR — never …

    line 38
  3. Distinctive:

    Mixed-purpose branches: Use the prefix that describes the primary intent.

    line 68
  4. Distinctive:

    After creating a branch, confirm the name matches all format rules:

    line 111

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

git-branch-conventions

Scope: New work branches only — not permanent branches (main, master, develop), release branches, or sync branches. Repos may have their own branch policies that take precedence.

When to Use

  • Running git checkout -b, git switch -c, git branch <name>, or git worktree add -b
  • Choosing a name for a new work branch

Before Naming the Branch

Ask whether there's an associated issue in the project's tracker; if yes, get its identifier from the user.

Headless/unattended fallback: use an identifier already present in the current task/session context if one exists; if none exists, stop and report that no identifier is available rather than fabricating one or proceeding silently — unless this project's own policy doesn't require an identifier at all, in which case proceed without one and say so.

Verify the identifier resolves to a real, open issue via the issue-verify skill before using it in a branch name, commit, or PR — never construct an issue reference from memory.

Case consistency: the branch slug is lowercase per "Branch Name Format" below; the commit and PR title use the tracker's canonical case for the identifier, so all three point at the same issue.

Whether an identifier is mandatory at all is a policy call for the project this skill is installed into (set by that project's own contribution docs) — this skill does not mandate one itself.

Semantic Branch Prefixes (REQUIRED)

New work branches MUST start with one of these prefixes:

PrefixUse ForExamples
feat/New features, user-facing functionalityfeat/scheduler-v3, feat/outbound-calling
fix/Bug fixes, defect correctionsfix/memory-leak-tts, fix/null-check-handler
exp/Experimental, spike, or throwaway workexp/grpc-prototype, exp/redis-caching-spike
doc/Documentation updates onlydoc/api-reference-update, doc/onboarding-guide
perf/Performance and optimization workperf/query-optimization, perf/reduce-cold-start
chore/Non-feature maintenance — deps, CI, config, refactors, test harness, repo housekeepingchore/bump-deps-march, chore/ci-pipeline-fix

Decision Guide

Is it throwaway / exploratory?              → exp/
Is it a bug fix?                            → fix/
Is it only documentation?                   → doc/
Is it only performance / optimization?      → perf/
Is it a new feature or behavior change?     → feat/
Everything else (deps, CI, refactor, tests) → chore/

Mixed-purpose branches: Use the prefix that describes the primary intent.


Branch Name Format

{prefix}/{short-description}

Rules:

  • Lowercase only
  • Hyphens between words (not underscores)
  • Descriptive but concise
  • Include ticket ID when relevant: fix/proj-1189-null-config
# ✅ CORRECT
git checkout -b feat/outbound-calling
git checkout -b fix/proj-1189-null-config
git checkout -b exp/grpc-spike
git checkout -b chore/bump-node-22
git checkout -b chore/refactor-auth-module

# ❌ WRONG — missing prefix
git checkout -b outbound-calling

# ❌ WRONG — non-standard prefix
git checkout -b feature/outbound         # Use feat/
git checkout -b bugfix/null-check        # Use fix/
git checkout -b refactor/auth-module     # Use chore/
git checkout -b test/add-unit-tests      # Use chore/
git checkout -b hotfix/urgent-patch      # Use fix/

# ❌ WRONG — formatting
git checkout -b FEAT/OUTBOUND           # Uppercase
git checkout -b feat/outbound_calling   # Underscores

Verification

After creating a branch, confirm the name matches all format rules:

branch=$(git branch --show-current)
if echo "$branch" | grep -qE '^(feat|fix|exp|doc|perf|chore)/[a-z0-9]+(-[a-z0-9]+)*$'; then
  echo "✅ Valid: $branch"
else
  echo "❌ Invalid: $branch"
  echo "  Required: {prefix}/{lowercase-hyphenated-description}"
  echo "  Prefixes: feat/ fix/ exp/ doc/ perf/ chore/"
fi

Integration

Note: The obra/superpowers using-git-worktrees skill shows feature/auth in its example. That prefix is non-canonical per this convention — use feat/auth instead. This skill takes precedence for branch naming.

Failure Modes

ModeSymptomRecovery
Non-compliant branch namePR rejected by CIFollow type/description pattern
Non-standard prefix usedConfusion in branch listingUse the six canonical prefixes
Skipping prefix on quick branchesInconsistent repoEvery work branch gets a prefix
No issue identifier given, or identifier doesn't resolve via issue-verifyBranch/commit/PR carries a wrong, fabricated, or missing issue referenceAsk the user for a real identifier; headless with one already in context, verify and use it; headless with neither, stop and report rather than fabricate — unless this project's own policy doesn't require one, in which case proceed and say so

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.