context-recovery
npx machina-cli add skill chrismbryant/claude-journal-mcp/context-recovery --openclawContext Recovery Skill
You have the ability to recover working context from the journal to restore continuity after context loss.
When to Use This Skill
Use this skill automatically and proactively when:
-
After
/clearcommand- User cleared conversation history
- Need to restore what they were working on
- Should happen immediately without asking
-
Session start questions
- "What was I working on?"
- "Where did we leave off?"
- "What did I do yesterday?"
- "Catch me up"
-
Context seems lost
- User references past work you don't have context for
- Conversation appears to resume mid-task
- User seems to expect you to remember something
-
Beginning of new work
- User wants to continue previous project
- Need to understand recent changes
- Planning next steps based on past work
How to Recover Context
Step 1: Fetch recent entries
journal_list_recent(
limit=10 # Adjust based on need
)
Step 2: Analyze and summarize
- Identify the most recent project
- Determine what was accomplished
- Note any in-progress work
- Highlight blockers or open questions
Step 3: Present concisely Show the user:
- What they were working on (project/feature)
- What was completed recently
- What might be next
- Key context or decisions
Presentation Format
**Recent Work Context**
You were working on [project name], focusing on [main task].
Recent accomplishments:
- [Most recent significant work]
- [Previous work]
- [Earlier work]
Last activity: [What happened most recently]
Ready to continue? [Natural follow-up question]
Examples
Example 1: After /clear
[User runs /clear command]
→ journal_list_recent(limit=10)
→ "You were working on my-api, implementing OAuth2 authentication.
Last thing was configuring JWT token expiration.
Ready to continue with the auth flow?"
Example 2: Session start
User: "What was I doing yesterday?"
→ journal_time_query(time_expression="yesterday")
→ "Yesterday you worked on:
- Fixed cache memory leak in api-service
- Started implementing Redis integration
- Reviewed and merged 2 PRs
Want to continue with the Redis work?"
Example 3: Project context
User: "Let's continue with the mobile app"
→ journal_list_recent(project="mobile-app", limit=15)
→ "For mobile-app, you recently:
- Implemented push notifications
- Fixed iOS crash on startup
- Updated dependencies
All tests passing. What's next?"
Example 4: Lost context reference
User: "Update that authentication thing we did"
→ journal_search(query="authentication", limit=5)
→ "Found your OAuth2 implementation from [date]:
[Brief summary of what was done]
What updates are needed?"
Advanced Recovery
Time-based recovery:
journal_time_query(
time_expression="last week",
query="optional search term"
)
Search-based recovery:
journal_search(
query="specific feature or technology",
limit=10
)
Project statistics:
journal_stats() # Get overview of all work
Best Practices
- Be proactive: Don't wait for user to ask
- Be concise: Summarize, don't dump raw entries
- Be relevant: Focus on most recent/important work
- Be actionable: Suggest next steps
- Be smart: Use time queries when appropriate
What to Avoid
Don't:
- Show raw entry dumps (always summarize)
- Overwhelm with too much history
- Recover context when not needed
- Ask if they want context (just provide it)
- Forget to check project filters
Integration with Other Skills
Combine with:
- journal-capture: After recovering context and completing new work
- find-related-work: When user needs deeper history on a specific topic
Source
git clone https://github.com/chrismbryant/claude-journal-mcp/blob/main/skills/context-recovery/SKILL.mdView on GitHub Overview
Context-Recovery automatically fetches recent journal entries to restore continuity after context loss. It identifies the active project, what was accomplished, what's in progress, and blockers, then presents a concise summary to help you pick up where you left off.
How This Skill Works
It runs automatically and proactively after /clear or at session start and when asked. Step 1: Fetch recent entries with journal_list_recent(limit=10). Step 2: Analyze and summarize to identify the active project, completed work, in-progress tasks, and blockers. Step 3: Present concisely in a Recent Work Context block that highlights next steps.
When to Use It
- After /clear command
- At the start of a new session
- When the user asks what they were working on
- When context seems lost or the conversation resumes mid-task
- Beginning of a new or continuing project and you need past changes
Quick Start
- Step 1: Fetch recent entries with journal_list_recent(limit=10)
- Step 2: Analyze and summarize to identify the active project, completed work, in-progress tasks, and blockers
- Step 3: Present concisely using the Recent Work Context format
Best Practices
- Be proactive: Don't wait for user to ask
- Be concise: Summarize, don't dump raw entries
- Be relevant: Focus on most recent/important work
- Be actionable: Suggest next steps
- Be smart: Use time queries when appropriate
Example Use Cases
- After /clear: journal_list_recent(limit=10) reveals you were working on my-api with OAuth2; last task was configuring JWT token expiration. Ready to continue with the auth flow?
- Session start: If you ask what was I doing yesterday, journal_time_query with last week returns: Yesterday you worked on fixing a cache memory leak in the api-service, starting Redis integration, and merging two PRs. Want to continue with the Redis work?
- Project context: You say Let's continue with the mobile app; journal_list_recent(project=mobile-app, limit=15) shows you recently implemented push notifications, fixed iOS crash on startup, updated dependencies, and all tests passing. What's next?
- Lost context reference: Update that authentication thing we did; journal_search(query=authentication, limit=5) returns a summary of the OAuth2 implementation and asks what updates are needed.
- Time-based recovery: Use journal_time_query(time_expression=last week) or journal_search(query=specific feature) to refresh context when mid-week work is ambiguous.