11---
2- description : Generate comprehensive context handoff and copy to clipboard for continuing work
2+ description :
3+ Generate comprehensive context handoff and copy to clipboard for continuing work
34---
45
56# Handoff Context
67
7- Generate a comprehensive context handoff for the current conversation that can be cleanly copied and pasted to continue work in a new session.
8+ Generate a comprehensive context handoff for the current conversation that can be
9+ cleanly copied and pasted to continue work in a new session.
810
911## Instructions
1012
11- 1 . ** Generate the handoff** - Create a complete context handoff following the XML-structured format
13+ 1 . ** Generate the handoff** - Create a complete context handoff following the
14+ XML-structured format
12152 . ** Save to temp file** - Use Write tool to save to ` /tmp/context_handoff.md `
13- 3 . ** Copy to clipboard automatically** - Use ` pbcopy < /tmp/context_handoff.md ` without asking
16+ 3 . ** Copy to clipboard automatically** - Use ` pbcopy < /tmp/context_handoff.md ` without
17+ asking
14184 . ** Show brief confirmation** - Just ` 📋 Copied to clipboard `
1519
1620## Process
1721
1822### Step 1: Generate the Handoff
1923
20- Create the handoff in this exact format (don't output to user yet, you'll save it directly to file):
24+ Create the handoff in this exact format (don't output to user yet, you'll save it
25+ directly to file):
2126
2227``` markdown
2328# Context Handoff
2429
2530<context_handoff>
2631
27- <original_task>
28- [State the original, specific request or task]
29- </original_task>
32+ <original_task> [State the original, specific request or task] </original_task>
3033
31- <work_completed>
32- [List everything successfully accomplished with file paths and line numbers]
33- </work_completed>
34+ <work_completed> [List everything successfully accomplished with file paths and line
35+ numbers] </work_completed>
3436
35- <work_remaining>
36- [Detail work that still needs to be done with priorities]
37+ <work_remaining> [Detail work that still needs to be done with priorities]
3738</work_remaining>
3839
39- <attempted_approaches>
40- [Document approaches that didn't work and why]
40+ <attempted_approaches> [Document approaches that didn't work and why]
4141</attempted_approaches>
4242
43- <critical_context>
44- [Preserve essential technical, project, and business context]
43+ <critical_context> [Preserve essential technical, project, and business context]
4544</critical_context>
4645
47- <current_state>
48- [Describe exact state of deliverables and system]
49- </current_state>
46+ <current_state> [Describe exact state of deliverables and system] </current_state>
5047
5148<recommendations>
5249[Provide actionable next steps in priority order]
@@ -64,20 +61,23 @@ Create the handoff in this exact format (don't output to user yet, you'll save i
64613 . Confirm: ` 📋 Copied to clipboard `
6562
6663** Why Write tool instead of heredoc?**
64+
6765- Avoids triggering git hooks (heredoc with ` << ` can trigger branch protection)
6866- Cleaner, no escaping issues
6967- Faster execution
7068
7169## Important Guidelines
7270
7371** For Clean Copy/Paste:**
72+
7473- Start output with ` # Context Handoff ` and nothing else
7574- End with ` </context_handoff> ` and nothing else
7675- No "Here's your handoff:" or "I've generated:" preambles
7776- No "This handoff documents..." summaries after
7877- Just the pure handoff content
7978
8079** For Comprehensive Documentation:**
80+
8181- Include specific file paths with line numbers (e.g., ` src/auth.ts:45-67 ` )
8282- Document ALL work completed, even minor changes
8383- Include failed attempts to prevent repetition
@@ -86,6 +86,7 @@ Create the handoff in this exact format (don't output to user yet, you'll save i
8686- Include git status and branch info
8787
8888** For Clipboard Operation:**
89+
89901 . Use Write tool to save to ` /tmp/context_handoff.md ` (avoids heredoc hook triggers)
90912 . Run: ` pbcopy < /tmp/context_handoff.md ` (single fast command)
91923 . Show: ` 📋 Copied to clipboard ` (brief confirmation)
@@ -95,6 +96,7 @@ Create the handoff in this exact format (don't output to user yet, you'll save i
9596User: ` /handoff-context `
9697
9798Assistant immediately:
99+
981001 . Generates the handoff content
991012 . Uses Write tool to save to ` /tmp/context_handoff.md `
1001023 . Runs ` pbcopy < /tmp/context_handoff.md `
@@ -110,4 +112,4 @@ No prompts, no asking, just fast automatic clipboard copy.
110112- The new Claude instance should be able to continue work without any additional context
111113- Include the markdown header ` # Context Handoff ` so it renders nicely when pasted
112114- Use pbcopy for Mac clipboard integration (pbpaste can verify if needed)
113- - The temp file ensures clean content without shell escaping issues
115+ - The temp file ensures clean content without shell escaping issues
0 commit comments