git-branch

GitHub

用于创建符合规范的开发分支,通过命名规则、安全检查和基准验证防止错误操作。

.agents/skills/git-branch/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

需要创建新的开发分支 用户指定了 Issue ID 或描述

Install

npx skills add Terry-Mao/AICodingFlow --skill git-branch -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/git-branch -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@git-branch

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill git-branch -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

SKILL.md

Frontmatter
{
    "name": "git-branch",
    "description": "Create repository-compliant development branches with minimal safety checks."
}

git-branch

Create a new branch without overwriting work or choosing an unsafe base.

Naming

  • Issue-backed work: <type>/<short-desc>-<issueID>.
  • Other work: <type>/<user-provided-name>; never invent an issue ID.
  • Valid types are feat, fix, refactor, docs, test, perf, and chore. Preserve a valid user type, otherwise infer one and default to chore.
  • Keep the description short, lowercase, English, hyphen-separated, and valid for Git. Remove punctuation, filler, and repeated separators.

When an issue ID is provided, use one gh issue view <issueID> --json title,body,number call for naming context. If it fails, continue only when the request is enough and report that the issue was not verified.

Create

Check the current worktree, branch, and target branch first. Stop if the worktree intent is ambiguous, the target already exists, or the current/base branch is unsafe. Validate the name with:

git check-ref-format --branch <branch-name>

Use the repository's documented base, otherwise main. In the same repository prefer origin/<base> over upstream/<base>; use upstream only for a fork or explicit guidance. Fetch or compare freshness only when it can change the choice of base. If creating from a stale local base, confirm before updating or use a freshly fetched remote base and report that the local base was unchanged.

git switch -c <branch-name> <base>
git switch --no-track -c <branch-name> origin/<base>

Verify the resulting branch. Do not switch to an existing branch, overwrite, reset, stash, delete, or force anything without explicit user intent. Do not create protected/shared base branches.

Version History

  • d3fef11 Current 2026-09-03 03:51

    精简本地开发与 spec 工作流指引

  • e53c5ac 2026-07-24 11:35

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-commit/SKILL.md
.agents/skills/git-push/SKILL.md
.agents/skills/git-worktree/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-product-spec/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
d3fef11
Hash
219ac68a
Indexed
2026-07-24 11:35

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-03 19:23
浙ICP备14020137号-1 $bản đồ khách truy cập$