.claude/skills/session-end/SKILL.md
End a session cleanly — commit, write handoff, report readiness
npx skillsauth add the-agency-ai/the-agency .claude/skills/session-endInstall 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.
Clean session teardown. Commits all work, sends pending dispatches, writes the handoff, and reports readiness. Leave a clean working tree. No asking — just do it.
$ARGUMENTS: Optional trigger reason (e.g., "end-of-day", "switching-context"). Defaults to "session-end".Check for any unsent dispatches. If there are pending dispatches, send them now.
Run git status --porcelain. If the tree is already clean, skip to Step 3.
If there are uncommitted changes (modified, staged, or untracked files):
/git-safe-commit with a descriptive message covering what's being committedgit status --porcelain should return emptyDo not ask. Do not warn and leave dirty. Commit everything and get clean. The next session starts from a clean tree.
Idempotent: Running /session-end multiple times is safe. If already clean, it skips the commit. If a handoff already exists, it archives and writes a fresh one.
./claude/tools/handoff write --trigger session-end
The tool archives the current handoff and reports the path for the new one.
Write the handoff file at the path reported by the tool. Include:
./claude/tools/handoff read
Confirm the handoff was written correctly.
Report to the user:
git branch --show-currentgit log --oneline -1End with a clear directive:
Safe to
/compactand/or/exit.
This tells the user their session state is preserved and they can:
/compact — refresh context and keep working/exit — end the session/compact then /exit — compact first, then endThe handoff is written. Either action is safe.
OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!
business
Sync worktree with master — merge, copy settings, run sandbox-sync, report changes
tools
List all git worktrees with status info (branch, clean/dirty, deps)
tools
Remove a git worktree and optionally delete its branch
development
Create a new git worktree with dedicated branch and bootstrapped dev environment