skills/finish/SKILL.md
Branch finalization. Validate, squash-merge, PR, keep, or discard. Clean state enforced. Triggers on: /godmode:finish, "done with branch", "merge this", "finalize", "wrap up".
npx skillsauth add arbazkhan971/godmode finishInstall 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.
/godmode:finish, "done", "merge", "finalize"Routes here when:
git log main..HEAD --oneline returns 1+ commits
AND user says "done", "merge", "finish"/godmode:build completes all tasks/godmode:finishbranch=$(git branch --show-current)
commits=$(git log main..HEAD --oneline | wc -l | tr -d ' ')
files_changed=$(git diff main..HEAD --stat | tail -1)
echo "Branch: $branch | $commits commits | $files_changed"
# Check if on main
if [ "$branch" = "main" ]; then
echo "ERROR: Already on main. Nothing to finish."
exit 1
fi
staged=$(git diff --cached --name-only)
unstaged=$(git diff --name-only)
untracked=$(git ls-files --others --exclude-standard)
IF staged non-empty: STOP — commit or stash first
IF unstaged non-empty: STOP — commit, stash, or discard
IF untracked files: WARN — won't be in merge
build_cmd && lint_cmd && test_cmd
THRESHOLDS:
Build: must exit 0
Lint: must exit 0 with --max-warnings=0
Tests: 100% pass rate required
IF any failure: STOP, run /godmode:fix first
IF no test runner: WARN, continue
git fetch origin main
git merge-tree \
$(git merge-base HEAD origin/main) origin/main HEAD
IF conflicts: print files, recommend rebase.
PRIORITY (first match wins):
DISCARD: user says "discard", "abandon" (confirm)
KEEP: user says "keep", "not yet", "park it"
MERGE: user says "merge" OR PR approved
PR: default when checks pass
MERGE:
git checkout main && git pull origin main
git merge --squash {branch}
git commit -m "feat({module}): {title}
Squashed {N} commits from {branch}."
git branch -d {branch}
PR:
gh pr create --title "feat({module}): {title}" \
--body "## Changes
$(git log main..HEAD --format='- %s')
## Guard Results
Build: PASS | Lint: PASS | Tests: PASS"
DISCARD: Require confirmation, then git branch -D.
IF MERGE: run build+test on main.
IF fails: git revert HEAD immediately.
IF PR: watch CI checks with gh pr checks.
IF DISCARD: verify branch is gone.
Append to .godmode/finish-results.tsv.
[finish:snapshot] Branch: {branch} | {N} commits
[finish:worktree] Clean worktree confirmed
[finish:guard] Build: PASS | Lint: PASS | Tests: PASS
[finish:preflight] No merge conflicts
[finish:outcome] Outcome: {PR|MERGE|KEEP|DISCARD}
[finish:execute] {result URL or status}
[finish:verify] {verification result}
timestamp branch outcome commits_squashed files_changed tests_result guard_status pr_url
FOR EACH dimension in [tests, coverage, lint, pr]:
tests: full suite pass, new code has tests
coverage: overall >= 80%, changed files >= 60%
lint: zero violations, no TODO/FIXME in diff
pr: rebased on main, diff < 400 lines
DECISION: ALL PASS → ship. ANY FAIL → block.
<!-- tier-3 -->
Never ask to continue. Loop autonomously until done.
KEEP if: all guard checks pass AND outcome valid
DISCARD if: guard fails OR post-merge tests fail
On discard: git revert HEAD for merges.
STOP when FIRST of:
- Branch finalized (MERGED, PR, KEPT, DISCARDED)
- Guard suite re-run 3 times with no improvement
- > 5 failed finalization attempts
development
Web performance optimization. Lighthouse, bundle analysis, code splitting, image optimization, critical CSS, fonts, service workers, CDN.
development
Webhook design, delivery, retry, HMAC verification, event subscriptions, dead letter queues.
development
Vue.js mastery. Composition API, Pinia, Vue Router, Nuxt SSR/SSG, Vite optimization, testing.
development
Evidence gate. Run command, read full output, confirm or deny claim. No trust, only proof.