Branch: Create Feature Branch from Main
Instruction Claude Claude Haiku
Creates a new branch from main with conventional commit-style naming based on a task description
- π‘ Use Case:
- Starting new features, bug fixes, or refactoring work with properly named branches
- π€ Expected Output:
- A new branch created and checked out following type/description naming convention
Prompt Content
description: Create a new branch from main with conventional commit-style naming
argument-hint:
allowed-tools: Bash(git status), Bash(git fetch), Bash(git checkout), Bash(git pull), Bash(git branch)
model: haiku
Create Feature Branch
Context
<git_status>
!git status
</git_status>
<current_branch>
!git branch --show-current
</current_branch>
<recent_branches>
!git branch --sort=-committerdate | head -5
</recent_branches>
Task Description
$ARGUMENTS
Instructions
-
Parse the task description above to understand what needs to be done.
-
Generate a branch name following conventional commit style:
<type>/<short-description>Types:
feat,fix,docs,style,refactor,perf,test,build,ci,choreRules:
- Lowercase only
- Replace spaces with hyphens
- Keep concise (3-5 words max)
- Examples:
feat/add-dark-mode,fix/sidebar-scroll-issue,refactor/extract-utils
-
Switch to main and pull latest:
git checkout main && git pull origin main -
Create and switch to the new branch:
git checkout -b <branch-name> -
Confirm with
git branch --show-current. -
Summarize the branch name and what task itβs for.