Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when implementation and verification are complete and the user needs to finish a development branch by merging locally, creating a PR, keeping the branch, or discarding work. Applies after tests pass and code review is ready.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 143% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 100% | 0% |
Branch completion workflow. The goal is to make the last mile explicit: verify, inspect git state, present safe choices, then execute only what the user selects.
This skill does not implement code, write tests, or review code. Run dev-verify and dev-code-review first unless the user explicitly overrides.
执行前先加载 references/dev-baseline.md。不假设、最小代码、外科手术式改动、可验证成功标准 全程生效。
baseline 与本 skill 的关联:
先确认:
dev-verify 已给出当前回合的 PASS 证据,或你现在运行等价验证。dev-code-review verdict 是 READY,或用户明确接受跳过 review 的风险。git status --short 已读取,知道是否有未提交改动。如果测试或 review 未通过,停止:
不能 finish: <tests/review/status> 未通过。
下一步: 修复后重跑 dev-verify / dev-code-review。运行只读命令:
bashgit status --short git branch --show-current git rev-parse --show-toplevel git rev-parse --git-dir git rev-parse --git-common-dir
判断:
git-dir == git-common-dirgit-dir != git-common-dirgit branch --show-current 为空如果工作区有未提交改动,先问用户是否要 commit / stash / keep uncommitted。不要继续 merge / PR。
优先探测:
bashgit merge-base HEAD main git merge-base HEAD master git remote -v
如果无法判断 base branch,问用户确认。不要默认推送到未知目标。
普通分支输出四选一:
分支已验证。请选择:
1. 本地 merge 回 <base-branch>
2. push 当前分支并创建 PR
3. 保留当前分支,我稍后自己处理
4. 丢弃这个分支的工作
你选哪一个?Detached HEAD 输出三选一:
当前是 detached HEAD。请选择:
1. 新建分支后 push 并创建 PR
2. 保留当前 workspace,我稍后自己处理
3. 丢弃这个 workspace 的工作
你选哪一个?不要在同一步执行动作。等用户选择。
禁止在 merge 成功前删除任何东西。
git push -u origin <branch>报告 branch 和 path。不要清理。
必须要求用户输入精确确认:
这会删除:
- branch: <branch>
- commits: <commit list>
- worktree: <path, if owned>
请输入 discard 确认。没有精确 discard 就停止。
只在用户选择 merge 后清理或 discard 后清理。
只能清理明确由项目拥有的 worktree:
.worktrees/worktrees/~/.config/dev-skills/worktrees/不清理平台 / harness 拥有的 workspace。无法判断归属时保留并报告。
dev-finish is main-agent-controlled because it can merge, push, create PRs, keep branches, or discard work.
Sub-agents may provide verification or review evidence before this phase, but final branch decisions and destructive operations stay with the main agent and the user. Follow ../../docs/multi-agent-policy.md before relying on any delegated verifier or reviewer output.
Other measured skills in the registry, with their headline benchmark lift.