mcpField
G
git-branch-format

git-branch-format

github.com/somnio-softwareDevelopment8116 installsUpdated 6d ago
Repository

About git-branch-format

git-branch-format is a skill that turns a change description into a Git branch name. It selects a type and applies a snake_case naming convention, with an optional ticket number.

Key features

  1. 01Infers branch type from changes
  2. 02Formats descriptions as snake_case
  3. 03Supports optional ticket numbers
  4. 04Limits descriptions to three words

Use cases

  1. 01Naming a branch for a new feature
  2. 02Creating a bug-fix branch name
  3. 03Formatting a branch name linked to a ticket

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/somnio-software/somnio-ai-tools --skill git-branch-format

After installing, type/git-branch-formatin Claude Code to confirm it loaded.

Details

From the project README

Git Branch Format Skill

Generates a branch name from a description of changes.


Convention

With ticket number
{type}/{TICKET_NUMBER}_{short_description}
  • TICKET_NUMBER is uppercase as provided by the user (e.g. PROJ-548)
  • short_description is snake_case, max 3 words — prefer 1–2
  • Example: feat/TICKET-548_flutter_upgrade
Without ticket number
{type}/{short_description}
  • short_description is snake_case, max 3 words — prefer 1–2
  • Example: feat/flutter_upgrade

Never use placeholders like NO-TICKET. If there's no ticket, just omit that part entirely.


Type Selection Guide

TypeWhen to use
featNew functionality
fixBug fix
refactorCode change with no behavior change
choreConfig, deps, tooling, maintenance
testAdding or updating tests
docsDocumentation only
styleFormatting, whitespace
perfPerformance improvement
ciCI/CD changes
buildBuild system changes
revertReverting a previous commit

Workflow

  1. Read the user's description of changes.
  2. Ask: "Do you have a ticket number for this?" — if the user doesn't provide one, proceed without it.
  3. Infer the correct type from the nature of the changes.
  4. Generate the branch name following the convention above.

Examples

User: "I'm adding dark mode support" — Ticket: PROJ-312

feat/PROJ-312_dark_mode_support

User: "fixing a crash on the payment screen" — No ticket

fix/payment_screen_crash

User: "upgrading Flutter and fixing deprecated APIs" — Ticket: PROJ-548

feat/PROJ-548_flutter_upgrade

Comments

Markdown supported