Prepare a restart prompt when context is running low - captures everything needed to continue in a new session
Saves your current session state to a restart prompt file when context runs low. Use this before ending a session to capture all progress, next steps, and key insights so you can seamlessly continue in a new session without losing context.
/plugin marketplace add bennoloeffler/maude-claude-vunds-plugins/plugin install prompt-for-restart@maude-claude-vunds-pluginsYou are running low on context. Before the session ends, you MUST capture everything needed to continue this work in a new Claude Code session.
Create a comprehensive restart prompt file at restart-prompt.md in the project root that contains ALL information needed to seamlessly continue this work.
Write a precise, unambiguous description of the current task:
Define clear acceptance criteria:
Document what has been accomplished:
List remaining work in priority order:
Capture important discoveries:
List all relevant files:
@path/to/file1.swift - why it's relevant
@path/to/file2.ts - why it's relevant
External docs that were helpful:
Extract all pending items:
How to verify the work:
The prompt to paste into a new session:
I'm continuing work on [TASK].
Please read @restart-prompt.md for full context.
The immediate next step is: [SPECIFIC ACTION]
Write to restart-prompt.md using this template:
# Restart Prompt: [Brief Task Title]
Generated: [timestamp]
Session context: ~[X]% remaining when saved
---
## Task Definition
[Precise description]
## Job-Done Definition
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Current Progress
### Completed
- [x] Item 1
- [x] Item 2
### Files Modified
- `path/to/file.swift` - [what changed]
## Next Steps
1. **IMMEDIATE**: [Very specific next action]
2. [Step 2]
3. [Step 3]
## Key Insights
- **Insight 1**: [Description]
- **Insight 2**: [Description]
## File References
Read these files for context:
- @path/to/key/file1
- @path/to/key/file2
## Documentation References
- [Doc Name](url) - why relevant
- @docs/relevant-doc.md
## TODOs
- [ ] TODO 1
- [ ] TODO 2
## Testing Hints
```bash
# How to test
./run-tests.sh
Expected behavior: [description]
Copy this to start the new session:
I'm continuing work on [TASK].
Read @restart-prompt.md for full context including:
- Task definition and acceptance criteria
- Current progress and next steps
- Key insights and file references
The immediate next action is: [SPECIFIC ACTION]
Start by reviewing the restart prompt, then proceed with the next step.
## Important
- Be THOROUGH - the new session has ZERO context
- Be SPECIFIC - vague descriptions waste the new session's context
- Include PATHS - exact file paths, not just names
- Capture DECISIONS - why things were done a certain way
- Note BLOCKERS - anything that needs resolution
After creating the file, tell the user:
1. The restart prompt has been saved
2. How to use it in a new session
3. Remind them to commit it if they want to preserve it