一键导入
finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work — merge, PR, or cleanup
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work — merge, PR, or cleanup
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | finishing-a-development-branch |
| description | Use when implementation is complete, all tests pass, and you need to decide how to integrate the work — merge, PR, or cleanup |
| tags | ["git","workflow","completion"] |
| triggers | ["work complete","ready to merge","create PR","finish branch","integration"] |
| chains_to | ["verification-before-completion"] |
| priority | core |
| gate | false |
When work is done and verified: present the user with integration options (merge, PR, keep branch). Don't auto-merge or auto-push. The user decides.
Before presenting options, confirm:
Check:
# What branch are we on?
git branch --show-current
# How many commits ahead of main?
git log main..HEAD --oneline
# Any remote tracking?
git remote -v
Offer the user these choices:
Option A: Merge to main
git checkout main
git merge --no-ff <branch-name> -m "Merge: <description>"
Best for: local work, solo projects, small features.
Option B: Create a PR
git push -u origin <branch-name>
gh pr create --title "<title>" --body "<body>"
Best for: team projects, changes that need review, anything going to production.
Option C: Keep the branch Leave it as-is. User will handle integration later. Best for: when the user wants to review more, or is waiting on something.
Only proceed with the option the user chose.
For merge:
git branch -d <branch-name>git worktree remove <path>For PR:
For keep:
After merge:
| Anti-Pattern | Why It's Wrong |
|---|---|
| Auto-merging without asking | The user decides when to merge |
| Auto-pushing without asking | Pushing affects shared state |
| Merging with failing tests | Fix tests first |
| Forgetting cleanup | Stale branches and worktrees accumulate |
| Force-pushing | Destroys history. Only with explicit user approval. |
REQUIRED: syntaxninja-dojo:verification-before-completion (must be done before this skill)
Use when a structured PRD document is needed for the ralph loop — generates prd.json and progress.txt
Use when task scope exceeds one context window and decomposes into independent pass/fail stories with clean iteration boundaries
Use when starting feature work that needs isolation from the current workspace or before executing plans that could leave the branch in a broken state
Use when a hard problem was just solved and the solution should be captured as a learning for future reference
Use when 3+ distinct occurrences suggest a skill should be updated with a new trigger, anti-pattern, or verification step
Use when creating a new skill or pattern for the dojo — guides the SKILL.md and PATTERN.md format, CSO lint rules, and index registration