Session Wrap-up Skill
A Claude Code skill that closes out a feature-branch session end-to-end: verify, commit, push, open PR, vote approve, autocomplete, merge, clean up worktrees, and tell you whether it's safe to close the chat. Designed for the many parallel Claude sessions working style where forgetting one step (push? approve? remove worktree?) is the default failure mode.
Skill location (project-level, checked in): .claude/skills/wrap-up/
How to invoke
In any Claude Code session, type:
/wrap-up
Phrases like "wrap up", "close out", "we're done", "finalize and close the chat" also trigger it.
What it does — happy path
When everything is in order (single coherent change, CI green, no merge conflicts, no parallel-session contamination), one invocation produces:
- Audit of all worktrees and open PRs on
fabric_monorepo. - Stage + commit any uncommitted work in the current worktree with a conventional-commit message inferred from the diff (
feat(scope): ...,fix(scope): ..., etc.). - Push the feature branch to
originif not yet pushed. - Open a PR to
main(or update the existing one) with## Summary+## Test planbody. - Vote Approved on the PR.
- Set autocomplete with
mergeStrategy=NoFastForward,deleteSourceBranch=true— matches the existing merge style in this repo. - Remove other stale worktrees whose branches are already merged (no ask required).
- Print a cleanup block for the current worktree that you paste into a terminal opened against the main checkout — the skill can't remove the worktree it's running in.
- Final report with a clear "you can close this chat" line, or an explicit blocker list if there's something that needs your attention.
What it will NOT do without asking
| Situation | What the skill does |
|---|---|
| CI failing on the active PR | Surfaces the failing pipeline + run URL, stops, asks. |
| Uncommitted changes spanning multiple unrelated concerns | Asks whether to split or bundle. |
Merge conflicts on rebase/merge with main | Surfaces conflicts, stops, asks. |
| Reviewer cast a Rejected vote or has unresolved comment threads | Surfaces threads, stops, asks. |
Current branch is main / dev / uat / prod with changes | Surfaces and asks — never auto-commits to protected branches. |
| Another worktree has uncommitted changes or unpushed commits | Leaves it alone. Treated as a parallel session's work. |
User asks for a force-anything (--force, -D, --no-verify, --delete) | Refuses. Surfaces what would normally happen, asks for explicit consent. |
auto_generated: false docs were touched | Includes them in the commit as authored (never regenerates). |
How it differs from related skills
| Skill | What it does | Where it stops |
|---|---|---|
commit-pr | Commits, pushes, opens a PR with summary + test plan | Stops at "PR opened" — does NOT auto-approve, does NOT auto-merge, does NOT clean up worktrees |
superpowers:finishing-a-development-branch | Presents structured options (merge, PR, cleanup) and lets you pick | Decision-making — does NOT execute |
wrap-up | End-to-end execution of the entire close-out chain, autonomous unless a judgment call is needed | Stops only at genuine blockers (failing CI, conflicts, ambiguity); otherwise runs to "you can close this chat" |
The handoff is intentional: /commit-pr is for "open a PR and wait for review"; /wrap-up is for "I'm done thinking about this — finish it for me".
Interaction with the docs auto-update hook
The PreToolUse docs hook (defined in the project CLAUDE.md under "Documentation Rule") regenerates docs-site/content/<section>/ whenever Claude runs git commit against any path in PATH_TO_SECTION. /wrap-up invokes git commit once for any uncommitted work, which fires the hook in the normal way — generated MDX is staged into the same commit, no manual regen needed. If the hook fails (denies the commit), /wrap-up propagates the deny as a blocker in its final report.
Safety guardrails (lifted from .mex/patterns/worktree-lifecycle.md)
The skill obeys the repo's existing worktree lifecycle rules:
- Worktree removal:
git worktree removeonly, never--force. Refusal-on-dirty is treated as the safety net working, not as an error to bypass. - Branch deletion:
git branch -donly, never-D. An unmerged-refusal is surfaced to you. - Remote-branch deletion: never. Autocomplete with
deleteSourceBranch=truehandles the remote side server-side. - Sibling worktrees (
../fabric_monorepo-*) discovered during the audit are left alone but mentioned in the final report — new worktrees only live under.claude/worktrees/<slug>.
Why this exists
Daan runs many Claude Code sessions in parallel, each producing a worktree + feature branch + (usually) a PR. The end-of-feature checklist has six items: commit, push, PR, approve, autocomplete, worktree-cleanup. Multiplied across multiple sessions per day, that's where loose ends pile up. /wrap-up collapses the six steps into a single command, escalating to the user only on the genuine judgment calls — failing tests, ambiguous diffs, hostile reviewers — that actually require human decision.
Files
.claude/skills/wrap-up/SKILL.md— skill metadata (name + description).claude/skills/wrap-up/workflow.md— the procedural instructions Claude follows when the skill is invoked
Both are checked into the repo so the skill is available to every developer using Claude Code, with no per-clone setup. New sessions auto-discover the skill on start.