nx/skills/finishing-branch/SKILL.md
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
npx skillsauth add hellblazer/nexus finishing-branchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify tests → present options → execute choice → clean up.
uv run pytest # or project-appropriate command
If tests fail: stop. Fix before proceeding.
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
Implementation complete. Options:
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is
4. Discard this work
git checkout <base-branch>
git pull
git merge <feature-branch>
# verify tests on merged result
git branch -d <feature-branch>
git push -u origin <feature-branch>
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<bullets>
## Test plan
- [ ] <steps>
EOF
)"
Report location. Don't clean up worktree.
Require user to type discard to confirm. Do not accept "yes" or "ok".
git checkout <base-branch>
git branch -D <feature-branch>
Detect whether running in a worktree:
git worktree list | grep "$(pwd)"
| Option | Clean worktree? | Clean branch? | |---|---|---| | 1. Merge | Yes | Yes | | 2. PR | Yes | No | | 3. Keep | No | No | | 4. Discard | Yes | Yes (force) |
If in a worktree (options 1, 2, 4):
cd <base-worktree>
git worktree remove <path>
If beads are active, close related beads before or after merge:
/beads:close <bead-id> --reason="Merged to <base-branch>"
If beads are active, push state to remote after closing:
bd dolt push
Pairs with: /nx:git-worktrees for initial workspace setup.
development
Use when critiquing / auditing / reviewing a change set against decision history — tries the review plan library first (catalog lookup → decision-evolution traversal → extract → compare), falls through to /nx:query if nothing matches
documentation
Use when doing design / architecture / planning work that walks from prose (RDRs, docs, knowledge) into the modules implementing a concept
development
Use when surveying the plan library's runtime metrics to propose plans for promotion to a higher scope — advisory-only; dispatches the plan-promote-propose meta-seed (no lifecycle ops — those ship in RDR-079)
business
Use when inspecting plan runtime metrics or enumerating dimension-registry usage — dispatches plan_match with dimensions={verb:plan-inspect}; strategy:default reports per-plan metrics, strategy:dimensions reports registry usage counts