git-flow-branch-creator
它能做什么
这个 AI 助手可以帮你按照 Git Flow 模型,在编程项目中创建新的“分支”(branch)。它会分析你最近的改动,建议最合适的分支类型和名称,帮你把工作整理清楚。
适用场景
- ✓开始开发新功能时。
- ✓需要准备新版本的程序时。
- ✓发现需要立即修复的严重 bug 时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/git-flow-branch-creator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为新的用户登录功能创建一个分支。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会检查你修改了哪些文件以及怎么修改的。据此判断你是在添加新内容(feature)、准备发布(release),还是在紧急修复 bug(hotfix),然后创建一个名称清晰的分支。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Instructions
<instructions>
<title>Git Flow Branch Creator</title>
<description>This prompt analyzes your current git changes using git status and git diff (or git diff --cached), then intelligently determines the appropriate branch type according to the Git Flow branching model and creates a semantic branch name.</description>
<note>
Just run this prompt and Copilot will analyze your changes and create the appropriate Git Flow branch for you.
</note>
</instructions>
Workflow
Follow these steps:
- Run
git statusto review the current repository state and changed files. - Run
git diff(for unstaged changes) orgit diff --cached(for staged changes) to analyze the nature of changes. - Analyze the changes using the Git Flow Branch Analysis Framework below.
- Determine the appropriate branch type based on the analysis.
- Generate a semantic branch name following Git Flow conventions.
- Create the branch and switch to it automatically.
- Provide a summary of the analysis and next steps.
Git Flow Branch Analysis Framework
<analysis-framework>
<branch-types>
<feature>
<purpose>New features, enhancements, non-critical improvements</purpose>
<branch-from>develop</branch-from>
<merge-to>develop</merge-to>
<naming>feature/descriptive-name or feature/ticket-number-description</naming>
<indicators>
<indicator>New functionality being added</indicator>
<indicator>UI/UX improvements</indicator>
<indicator>New API endpoints or methods</indicator>
<indicator>Database schema additions (non-breaking)</indicator>
<indicator>New configuration options</indicator>
<indicator>Performance improvements (non-critical)</indicator>
</indicators>
</feature>
<release>
<purpose>Release preparation, version bumps, final testing</purpose>
<branch-from>develop</branch-from>
<merge-to>develop AND master</merge-to>
<naming>release-X.Y.Z</naming>
<indicators>
<indicator>Version number changes</indicator>
<indicator>Build configuration updates</indicator>
<indicator>Documentation finalization</indicator>
<indicator>Minor bug fixes before release</indicator>
<indicator>Release notes updates</indicator>
<indicator>Dependency version locks</indicator>
</indicators>
</release>
<hotfix>
<purpose>Critical production bug fixes requiring immediate deployment</purpose>
<branch-from>master</branch-from>
<merge-to>develop AND master</merge-to>
<naming>hotfix-X.Y.Z or hotfix/critical-issue-description</naming>
<indicators>
<indicator>Security vulnerability fixes</indicator>
<indicator>Critical production bugs</indicator>
<indicator>Data corruption fixes</indicator>
<indicator>Service outage resolution</indicator>
<indicator>Emergency configuration changes</indicator>
</indicators>
</hotfix>
</branch-types>
</analysis-framework>
Branch Naming Conventions
<naming-conventions>
<feature-branches>
<format>feature/[ticket-number-]descriptive-name</format>
<examples>
<example>feature/user-authentication</example>
<example>feature/PROJ-123-shopping-cart</example>
<example>feature/api-rate-limiting</example>
<example>feature/dashboard-redesign</example>
</examples>
</feature-branches>
<release-branches>
<format>release-X.Y.Z</format>
<examples>
<example>release-1.2.0</example>
<example>release-2.1.0</example>
<example>release-1.0.0</example>
</examples>
</release-branches>
<hotfix-branches>
<format>hotfix-X.Y.Z OR hotfix/critical-description</format>
<examples>
<example>hotfix-1.2.1</example>
<example>hotfix/security-patch</example>
<example>hotfix/payment-gateway-fix</example>
<example>hotfix-2.1.1</example>
</examples>
</hotfix-branches>
</naming-conventions>
Analysis Process
<analysis-process>
<step-1>
<title>Change Nature Analysis</title>
<description>Examine the types of files modified and the nature of changes</description>
<criteria>
<files-modified>Look at file extensions, directory structure, and purpose</files-modified>
<change-scope>Determine if changes are additive, corrective, or preparatory</change-scope>
<urgency-level>Assess if changes address critical issues or are developmental</urgency-level>
</criteria>
</step-1>
<step-2>
<title>Git Flow Classification</title>
<description>Map the changes to appropriate Git Flow branch type</description>
…
常见问题
什么是“分支”?
你可以把分支理解为项目的一个独立副本,在里面尝试新想法或做修复,而不影响主版本。之后可以再把改动合并回去。
什么是“Git Flow”?
它是一套在 Git 中使用分支的规则和约定,有助于保持项目井然有序,在团队协作中尤其有用。
如果改动类型混合在一起怎么办?
AI 会尽量优先考虑最重要的改动类型,或者建议把工作拆分到不同的分支中。
详情
作者的原始描述
Intelligent Git Flow branch creator that analyzes git status/diff and creates appropriate branches following the nvie Git Flow branching model.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7223
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。