create-feature-branch

tettuan 的头像作者 tettuan

按照 Git Flow 策略创建一个新的功能分支。在开始新功能开发、为问题创建分支或当用户说“创建分支”、“新功能”、“开始解决问题”时使用。

📖 中文导读:按照 Git Flow 策略创建一个新的功能分支。在开始新功能开发、为问题创建分支或当用户说“创建分支”、“新功能”、“开始解决问题”时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: create-feature-branch description: Create a new feature branch following Git Flow strategy. Use when starting new feature development, creating a branch for an issue, or when user says "create branch", "new feature", "start working on issue". allowed-tools: Bash, Read

Create Feature Branch

This skill creates feature branches following the project's Git Flow strategy.

Branch Naming Convention

Prefix Purpose Example
feat/ New feature feat/issue-88-return-mode
fix/ Bug fix fix/stdout-encoding
refactor/ Refactoring refactor/output-processor
update/ Dependency updates update/jsr-packages
remove/ Feature removal remove/deprecated-api

Workflow

1. Ensure clean working directory

git status

If there are uncommitted changes, ask user how to handle them.

2. Update develop branch

git checkout develop
git pull origin develop

3. Create feature branch

Format: {prefix}/issue-{number}-{short-description}

git checkout -b feat/issue-{NUMBER}-{DESCRIPTION}

4. Confirm creation

git branch --show-current

Checklist

  • Working directory is clean
  • develop branch is up to date
  • Branch name follows convention
  • Branch is created from develop

Example

For Issue #88 (add return mode):

git checkout develop
git pull origin develop
git checkout -b feat/issue-88-return-mode

Notes

  • Always branch from develop, not main
  • Include issue number in branch name for traceability
  • Use lowercase with hyphens for descriptions