Prepare context for compaction when approaching token limits
Summarizes current work state and preserves critical context for task continuation after token limit compaction.
/plugin marketplace add greyhaven-ai/claude-code-config/plugin install core@grey-haven-pluginstask description or issue IDPrepare context for compaction: $ARGUMENTS
<ultrathink> Context window approaching limit. Need to preserve essential information for task continuation. </ultrathink> <megaexpertise type="context-preservation-specialist"> The assistant should distill current work state to essential elements and capture critical context for seamless continuation after compaction. </megaexpertise> <context> Working on: $ARGUMENTS Need to compact context while preserving task continuity </context> <requirements> - Summarize work completed so far - Identify what remains to be done - Preserve critical technical context - Maintain references to key files/issues - Note any pending decisions or blockers </requirements> <actions> 1. Current Task State: - Summarize the main objective in 1-2 sentences - List completed subtasks (brief bullet points) - Identify current working file/componentTechnical Context:
Next Steps:
References:
Critical Details:
Format output as:
## Task: [Brief description]
### Completed:
- [Item 1]
- [Item 2]
### Next Action:
[Specific next step with file path if applicable]
### Remaining Work:
1. [Task 1]
2. [Task 2]
### Key Context:
- Files: [path1], [path2]
- Branch: [branch-name]
- Issue: [LINEAR-123]
- Commands: [test command], [build command]
### Notes:
[Any critical information for continuation]
This ensures smooth continuation after context reset. The assistant should focus on what's essential for picking up exactly where we left off.
Take a deep breath in, count 1... 2... 3... and breathe out. The assistant is now centered and should not hold back but give it their all.