with one click
create-branch
// Creates a Git feature branch from local main with standard naming. Use when the user wants to create a branch, start a feature branch, check out a new branch for a ticket, or begin work on a Jira issue.
// Creates a Git feature branch from local main with standard naming. Use when the user wants to create a branch, start a feature branch, check out a new branch for a ticket, or begin work on a Jira issue.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | create-branch |
| description | Creates a Git feature branch from local main with standard naming. Use when the user wants to create a branch, start a feature branch, check out a new branch for a ticket, or begin work on a Jira issue. |
| allowed-tools | Bash, AskUserQuestion |
Create a properly named Git feature branch from the local main branch and switch to it.
The user may provide a ticket key, a description, or both. Parse what's available:
PROJ-123, TEA-42 — an uppercase project prefix, hyphen, and numberIf the ticket key is missing, ask the user with AskUserQuestion:
"What's the Jira ticket key? (e.g., PROJ-123)"
If the description is missing, ask the user with AskUserQuestion:
"Give a short description for the branch (2-4 words, e.g., 'add product rating')"
Format: feature/<ticket-key>-<short-description>
Normalize the description:
a-z, 0-9, hyphens)Examples:
PROJ-42 + "Add Product Search Bar" → feature/PROJ-42-add-product-search-barPROJ-123 + "Fix the cart total bug!!" → feature/PROJ-123-fix-the-cart-totalRun:
git status --porcelain
If there are uncommitted changes, warn the user:
"You have uncommitted changes. These will carry over to the new branch. Continue?"
Use AskUserQuestion with options "Continue" and "Cancel". If cancelled, stop.
Determine whether the local repository uses main or master:
git rev-parse --verify main 2>/dev/null && echo main || echo master
Create the branch from the local default branch (do not fetch or pull from remote):
git checkout -b feature/<ticket-key>-<description> <default-branch>
If the branch name already exists, inform the user and ask if they want to switch to the existing branch or choose a different name.
Report the result:
Branch created: feature/<ticket-key>-<description>
Based on: <default-branch>