What it does
At the end of a work session — or when the context window is getting long — this skill produces a handoff prompt that captures everything a fresh conversation needs to continue: what was done, what’s pending, key decisions made, and the current state of the codebase.
When to use it
- At the end of every coding session before closing the terminal
- When context is getting stale and you want to start a clean conversation
- Before handing work between team members who use Claude Code
- After completing a PR when the next task depends on decisions made in this session
How it works
Add this instruction to your CLAUDE.md:
## Session Handoff
At the end of every session or PR cycle, produce a self-contained handoff prompt
for a fresh chat window. Include:
- What was accomplished (with file paths and commit hashes)
- What's pending or blocked
- Key decisions made and why
- Current branch and git state
- Any context a new session needs to avoid re-discovering
The agent generates a markdown block you can paste directly into a new conversation as the opening message.
Example output
## Handoff — feat/user-settings branch
### Done
- Added user settings API endpoint (apps/api/src/routes/settings.ts)
- Created settings schema with Drizzle migration (commit abc123)
- Frontend form wired up with React Query mutation
### Pending
- Validation error messages not yet styled (blocked on design review)
- Need to add RLS policy for settings table
### Decisions
- Chose to store settings as JSONB column (not separate table) because
the settings shape is still evolving and migrations are expensive
- Settings are org-scoped, not user-scoped — confirmed with product
### State
- Branch: feat/user-settings (3 commits ahead of main)
- All tests passing, typecheck clean
- PR not yet opened
Why it matters
Claude Code conversations have finite context. When you start fresh, the agent has zero memory of what happened before. Without a handoff, it re-discovers decisions, re-reads files it already analyzed, and may contradict choices from the previous session. A good handoff prompt eliminates that cold-start waste.