--- description: Save current progress to HANDOFF.md before /clear --- # Save Progress ## Pre-computed Context **Current Branch:** !`git branch --show-current` **Recent Commits:** !`git log --oneline -5` **Changed Files (uncommitted):** !`git status --porcelain | head -10` **Changed Files (in branch):** !`BASE=$(git remote show origin 2>/dev/null | grep "HEAD branch" | cut -d: -f2 | tr -d ' ' || echo "main"); git diff --name-only origin/$BASE...HEAD 2>/dev/null | head -10` **Existing HANDOFF.md:** !`cat .claude/HANDOFF.md 2>/dev/null || cat HANDOFF.md 2>/dev/null || echo "No existing HANDOFF.md"` --- ## Instructions You are saving the current work context to a HANDOFF.md file so the next session can continue seamlessly. ### Purpose Before running `/clear` to free up context, save important information: - What you were working on - Progress made - Decisions and context - Next steps ### HANDOFF.md Location Save to `.claude/HANDOFF.md` (create `.claude/` directory if needed): ```bash mkdir -p .claude ``` ### Template Create/update `.claude/HANDOFF.md` with this structure: ```markdown # Handoff Document **Branch:** **Last Updated:** **Session Goal:** ## Progress - [x] Completed task 1 - [x] Completed task 2 - [ ] In progress: task 3 - [ ] Not started: task 4 ## Key Decisions - Decision 1: Why we chose approach A over B - Decision 2: Important context about the implementation ## Files Modified - `path/to/file1.ts` - Added feature X - `path/to/file2.ts` - Fixed bug Y ## Current State ## Next Steps 1. First thing to do 2. Second thing to do 3. Third thing to do ## Notes ``` ### Content Guidelines 1. **Be Specific**: Include file paths, function names, error messages 2. **Explain Why**: Document decisions, not just what was done 3. **List Blockers**: Note anything that prevented progress 4. **Include Context**: Add relevant links, issue numbers, PR URLs ### Workflow ``` # End of session /workflow:save # Creates HANDOFF.md /clear # Clears context # Next session /workflow:catchup # Reads HANDOFF.md + changed files ``` --- ## Do NOT Commit HANDOFF.md Add to `.gitignore`: ``` .claude/HANDOFF.md ``` HANDOFF.md is for session continuity, not for version control.