技能 finishing-a-development-branch
📦

finishing-a-development-branch

安全 ⚙️ 外部命令📁 文件系统访问

自信地完成 Git 分支

也可从以下获取: CodingCossack,ZhanlinCui,Cycleaddict,davila7,DYAI2025,Cygnusfear,obra

此技能通过验证测试通过、提供清晰的合并/PR 选项并安全执行所选工作流,自动化了功能开发的最后步骤。

支持: Claude Codex Code(CC)
🥉 75 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“finishing-a-development-branch”。 我完成了我的功能。你能帮我完成这个分支吗?

预期结果:

Running test suite...

✓ All tests pass (42 passed, 0 failed)

Implementation complete. What would you like to do?

1. Merge back to main locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work

Which option?

正在使用“finishing-a-development-branch”。 Option 2 - create a PR

预期结果:

✓ Pushed branch 'feature/add-user-auth'
✓ Created PR #42: Add user authentication
✓ Removed worktree at '/Users/dev/project/.git/worktrees/feature-add-user-auth'

Branch complete! Pull request created and worktree cleaned up.

安全审计

安全
v1 • 2/25/2026

All static findings are false positives. The 23 external command detections are legitimate git operations (checkout, branch, merge, push, worktree) that form the core functionality of this git workflow skill. The 2 filesystem detections are standard shell redirection and git worktree management. The high-severity crypto flags are false positives from text pattern misidentification.

1
已扫描文件
206
分析行数
2
发现项
1
审计总数
审计者: claude

质量评分

38
架构
100
可维护性
85
内容
50
社区
100
安全
100
规范符合性

你能构建什么

完成功能分支

完成实现任务后,使用此技能可以干净地合并或 PR 已完成的工作

清理开发 worktree

在开发完成后使用,删除开发过程中创建的临时 worktree

标准化团队分支完成

确保团队成员之间一致的分支完成工作流

试试这些提示

基础分支完成
我完成了我的功能。你能帮我完成这个分支吗?
创建 PR 并清理
所有测试都通过了。我想创建一个拉取请求并清理我的 worktree。
本地合并并验证
请将我的分支合并到 main 本地并验证测试仍然通过。
安全分支丢弃
我想丢弃这个工作。请在删除任何内容之前确认。

最佳实践

  • 在向用户展示选项之前始终验证测试是否通过,以防止合并损坏的代码
  • 恰好提供 4 个选项,无需额外说明,以保持用户选择清晰
  • 需要输入 'discard' 确认以防止意外丢失工作

避免

  • 跳过测试验证直接进行合并或 PR
  • 提出开放式问题如'我接下来应该做什么?'而不是提供选项
  • 为所有选项自动清理 worktree(仅对合并和丢弃执行)

常见问题

如果测试失败会发生什么?
技能会停止并显示测试失败。在测试通过之前不会继续进入选项步骤。
我可以在不推送的情况下创建 PR 吗?
不可以。选项 2 需要在创建 PR 之前将分支推送到 origin。
什么是 worktree?
git worktree 允许你在单独的目录中同时检出多个分支。
此技能会处理合并冲突吗?
不可以。技能会报告冲突并停止。你必须手动解决它们。
支持哪些 git 主机?
PR 创建需要 GitHub 和 gh CLI。其他主机仅支持本地合并。
如果我选择选项 3(保留分支)会怎样?
分支和 worktree 会被保留。不会进行清理。你稍后手动处理。

开发者详情

文件结构

📄 SKILL.md