finalize-worktreelisted
Install: claude install-skill ostin-pil/claude-plugins
Finalize a session: verify it is clean and mergeable, land it on `main`
through exactly one merge-commit PR, fast-forward the local `main` ref
from `origin/main`, then delete the branch (and, if the session ran in a
worktree, remove the worktree). Handles both shapes a session can take
under `.claude/rules/workflow.md`: an isolated `feature/*` worktree, or a
`feature/*` branch checked out in the primary tree with no worktree.
It never merges locally. It pushes the session branch itself with a normal,
non-force push; the one human checkpoint is an explicit confirmation before
the PR is merged. Everything else goes through `gh`. The fix for the
local-vs-`origin/main` divergence (ISS-W3) is the never-merge-locally
discipline, independent of remote merge strategy: local `main` only ever
fast-forwards from `origin/main` after the remote merge, so it cannot
diverge from the GitHub result. The PR is merged with `--merge` (a merge
commit), which keeps the merged branch tip a real ancestor of
`origin/main` so the local branch deletes with a self-verifying
`git branch -d`, never a forced `-D`.
## Project configuration
The manifest is this skill's configuration. If
`$(git rev-parse --show-toplevel)/.claude/lifecycle-manifest.md` does not exist, the
project has not adopted the kit: say so, offer to create it, and stop. Never infer
the keys and run anyway. The kit ships the template as
`lifecycle-manifest.template.md`; locate the installed copy with
`find ~/.claude/plugins -path '*life