| name | wrap-up-session |
| description | Use at the end of a work session to verify local main is in sync with origin/main, no leaked stashes/branches/worktrees, and any session WIP is either committed or consciously preserved. Closes the loop on git hygiene. |
/wrap-up-session — End-of-session consolidation checklist
This repo accumulates clutter quickly because cron commits race against local
work. Run this skill before closing a session to reach a known-clean state.
1. Branch + worktree alignment
git -C /Users/brynjolfurjonsson/sports fetch origin --prune
git -C /Users/brynjolfurjonsson/sports worktree list
git -C /Users/brynjolfurjonsson/sports branch -vv
Expected: one worktree (the main checkout), one local branch (main), tracking
origin/main with no [ahead N] or [behind N] markers (pure tracking
arrow). Anything else is residue.
If main is behind: invoke /sync-main.
If main is ahead: investigate. Commits ahead are usually duplicates of
something already on origin (will be skipped on next rebase as
"previously applied"), but verify with
git log --oneline origin/main..HEAD first.
2. Stash inventory
git -C /Users/brynjolfurjonsson/sports stash list
For each stash, decide:
- Mine, transient (e.g. "WIP pre-sync 2026-XX-XX"): drop after confirming
pop succeeded earlier in the session.
- Older, content already on main:
git stash show --stat stash@{N} then
spot-check that each text-file delta has an equivalent on main (grep for
symbols, roxygen tags). If subsumed, drop.
- Older, contains unique unmerged work: extract via PR (see
.claude/rules/git-hygiene.md for the cherry-pick-from-stash pattern), then
drop.