finishing-a-development-branch
自信地完成 Git 分支
也可从以下获取: CodingCossack,ZhanlinCui,Cycleaddict,davila7,DYAI2025,Cygnusfear,obra
此技能通过验证测试通过、提供清晰的合并/PR 选项并安全执行所选工作流,自动化了功能开发的最后步骤。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“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.
安全审计
安全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.
风险因素
⚙️ 外部命令 (6)
📁 文件系统访问 (2)
质量评分
你能构建什么
完成功能分支
完成实现任务后,使用此技能可以干净地合并或 PR 已完成的工作
清理开发 worktree
在开发完成后使用,删除开发过程中创建的临时 worktree
标准化团队分支完成
确保团队成员之间一致的分支完成工作流
试试这些提示
我完成了我的功能。你能帮我完成这个分支吗?
所有测试都通过了。我想创建一个拉取请求并清理我的 worktree。
请将我的分支合并到 main 本地并验证测试仍然通过。
我想丢弃这个工作。请在删除任何内容之前确认。
最佳实践
- 在向用户展示选项之前始终验证测试是否通过,以防止合并损坏的代码
- 恰好提供 4 个选项,无需额外说明,以保持用户选择清晰
- 需要输入 'discard' 确认以防止意外丢失工作
避免
- 跳过测试验证直接进行合并或 PR
- 提出开放式问题如'我接下来应该做什么?'而不是提供选项
- 为所有选项自动清理 worktree(仅对合并和丢弃执行)