# 安装 git-branch

- 类型: Skill 技能
- 说明: 帮助你创建、切换并检查代码分支，确保实现前遵循正确分支策略。
- 仓库: https://github.com/microsoft/devsquad-copilot
- ⚠ 安全: 这是一个开源的 prompt-only Git 分支管理技能，材料未显示其需要密钥或连接外部服务，整体风险较低。其说明包含本地 git 命令与读取仓库内配置文件的建议，属于开发辅助技能的常规能力，需注意仅在预期仓库上下文中使用。

## 方式一 · 一键代装（复制提示词让 AI 代劳）

### Claude Code
```
请帮我安装 askskill 上的 "git-branch" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md
2. 保存为 ~/.claude/skills/git-branch/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

### Codex
```
请帮我安装 askskill 上的 "git-branch" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md
2. 保存为 ~/.codex/skills/git-branch/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

### Cursor
```
请帮我安装 askskill 上的 "git-branch" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md
2. 保存为 ~/.cursor/skills/git-branch/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

## 方式二 · 命令行安装（原生命令与配置）

### Claude Code
```bash
mkdir -p '~/.claude/skills/git-branch' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md' -o '~/.claude/skills/git-branch/SKILL.md'
```

### Codex
```bash
mkdir -p '~/.codex/skills/git-branch' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md' -o '~/.codex/skills/git-branch/SKILL.md'
```

### Cursor
```bash
mkdir -p '~/.cursor/skills/git-branch' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md' -o '~/.cursor/skills/git-branch/SKILL.md'
```
