技能 finishing-a-development-branch
📦

finishing-a-development-branch

安全 ⚙️ 外部命令📁 檔案系統存取

自信地完成 Git 分支

也可從以下取得: Cycleaddict,obra,davila7,CodingCossack,DYAI2025,ZhanlinCui,Cygnusfear

此技能透過驗證測試通過、呈現清晰的合併/PR 選項,並安全地執行所選工作流程,自動完成功能開發的最後步驟。

支援: Claude Codex Code(CC)
🥉 72 青銅
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」。 選項 2 - 建立 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
內容
32
社群
100
安全
100
規範符合性

你能建構什麼

完成功能分支

完成實作任務後,使用此技能來乾淨地合併或 PR 已完成的工作

清理開發 worktrees

開發完成後使用來移除開發期間建立的暫時 worktrees

標準化團隊分支完成流程

確保團隊成員之間的分支完成工作流程一致

試試這些提示

基本分支完成
我已完成功能了。你能幫我完成這個分支嗎?
建立 PR 並清理
所有測試都通過了。我想要建立 pull request 並清理我的 worktree。
本地合併並驗證
請幫我將我的分支合併到 main 並驗證測試仍然通過。
安全的分支丟棄
我想丟棄這项工作。請在刪除任何東西前確認。

最佳實務

  • 始終在呈現選項前驗證測試通過,以防止合併損壞的程式碼
  • 呈現 exactly 4 個選項且不添加額外說明,以保持使用者選擇清晰
  • 需要輸入 'discard' 確認以防止意外丢失工作

避免

  • 跳過測試驗證直接進行合併或 PR
  • 詢問開放式問題如「我下一步該做什麼?」而非呈現選項
  • 為所有選項自動清理 worktrees(僅對合併和丟棄執行)

常見問題

如果測試失敗會怎麼樣?
技能會停止並顯示測試失敗。它不會進入選項步驟,直到測試通過。
我可以不推送就建立 PR 嗎?
不行。選項 2 需要先推送分支到 origin 才能建立 PR。
什麼是 worktree?
git worktree 讓您可以同時在不同的目錄中檢出多個分支。
此技能會處理合併衝突嗎?
不行。技能會報告衝突並停止。您必須手動解決。
支援哪些 git 主機?
建立 PR 需要 GitHub 和 gh CLI。其他主機僅適用於本地合併。
如果選擇選項 3(保留分支)會怎麼樣?
分支和 worktree 都會保留。不會進行清理。您可以稍後手動處理。

開發者詳情

檔案結構

📄 SKILL.md