End-of-day session wrap-up. Pushes branches, runs tests, refreshes STATE, offers autonomous session.
Run when the user ends a work session ("done for today", "let's stop", "wrap up").
git log --since="6am" --oneline as starting point.~/.claude/skills/end-session/log-agent-metrics with: <session_id> session <total_tokens> <tool_uses> <duration_ms> <model> <project>. Estimate tokens from conversation length if exact count unavailable.git branch → ensure each non-main branch is pushed to origin.wip: prefix, committed to the current branch, and pushed.ExitWorktree to return to the main working tree. All remaining steps run on main.git worktree list → remove any stale worktrees (git worktree prune)git branch -a → delete stale remote branchesmake check on main. New failures → open ticket. Known failures → confirm ticket still open.git checkout -b housekeeping-state-YYYY-MM-DD main
b. Rewrite STATE: current stats, blockers, next actions, milestones. No changelog.
c. Prune: delete items checked off before this session.
d. Commit, merge to main via fast-forward, delete branch./memory skill (includes staleness check + rule cross-reference)./orchestrator all open if user wants unsupervised work overnight.