Solves the context reset problem when you run /new or switch sessions. You get scripts to append to daily logs (what you built, decisions you made, bugs you fixed), extract summaries from session JSONL files before wiping state, and search through past logs when you need to remember "how did I solve that GraphQL caching issue last month." The weekly extraction workflow is smart: pull patterns that show up 3+ times or took over an hour to solve into a curated MEMORY.md, skip the one-off hacks. Honestly feels like something you'd build yourself after the third time you lost important context mid-project, except someone already wrote the tooling.
npx -y skills add irangareddy/openclaw-essentials --skill memory-curator --agent claude-codeInstalls into .claude/skills of the current project.
Systematic memory management for agents through daily logging, session preservation, and knowledge extraction.
# Append to today's log
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Implemented user authentication with JWT" \
--category "Key Activities"
# Show today's log
python scripts/daily_log.py --workspace ~/.openclaw/workspace --show
# Search all memory files
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "GraphQL"
# Search recent logs only (last 7 days)
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "authentication" \
--days 7
# Show recent logs
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
# Generate summary from current session
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output session-summary.md
When: Before ending work session or switching contexts
Steps:
Review what was accomplished:
Append to daily log:
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Fixed race condition in payment processing - added mutex lock"
Add structured entries for important work:
## Key Activities
- [14:30] Implemented user profile dashboard with GraphQL
- [16:00] Fixed infinite re-render in UserContext - memoized provider value
## Decisions Made
- Chose Apollo Client over React Query - better caching + type generation
- Decided to use JWT in httpOnly cookies instead of localStorage
## Learnings
- Apollo requires `__typename` field for cache normalization
- React.memo doesn't prevent re-renders from context changes
See: patterns.md for what to log in different scenarios
When: Before running /new, /reset, or ending conversation
Steps:
Extract session summary:
# Get current session ID from system prompt or openclaw status
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output ~/session-summary.md
Review summary and edit Key Learnings section
Save to daily log:
# Append key points to today's log
cat ~/session-summary.md >> ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
Extract critical context to MEMORY.md if needed:
When: End of week (Friday/Sunday) or monthly
Steps:
Search for patterns in recent logs:
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 7
Look for extraction signals:
Extract to MEMORY.md:
Clean up MEMORY.md:
See: extraction.md for detailed extraction patterns
For rapid context capture during work:
# Quick note
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "TIL: DataLoader batches requests into single query"
# Decision
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Using Zustand for client state - simpler than Redux" \
--category "Decisions Made"
# Problem solved
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "CORS + cookies: Enable credentials on client + server, Allow-Origin can't be *"
memory/YYYY-MM-DD.md)Purpose: Chronological activity tracking
Content:
Retention: Keep recent logs accessible, optionally archive logs >90 days
When to use:
Purpose: Curated long-term knowledge
Content:
Organization: Topic-based, not chronological
When to use:
See: organization.md for structure patterns
Always log:
Don't log:
See: patterns.md for comprehensive logging guidance
During work:
daily_log.py --entryEnd of day:
End of week:
Extract to MEMORY.md when:
Don't extract:
Problem-Solution Structure:
## [Technology/Domain]
### [Problem Title]
**Problem:** [Clear description]
**Cause:** [Root cause]
**Solution:** [How to fix]
**Code:**
```js
// Example implementation
Prevention: [How to avoid] Context: [When this applies]
**See:** [extraction.md](references/extraction.md) for detailed extraction workflow
## Scripts Reference
### daily_log.py
Create or append to today's daily log.
```bash
# Append entry
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Your log entry" \
[--category "Section Name"]
# Create from template
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--template
# Show today's log
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--show
Extract summary from session JSONL.
python scripts/extract_session.py \
--session ~/.openclaw/agents/<id>/sessions/<session>.jsonl \
[--output summary.md]
Outputs:
Search across all memory files.
# Search with query
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--query "search term" \
[--days 30]
# Show recent logs
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 5
Before /new or /reset:
After major work:
See: organization.md for detailed structure guidance
Search daily logs first:
python scripts/search_memory.py --workspace ~/.openclaw/workspace --query "decision keyword"
Search MEMORY.md:
grep -i "keyword" ~/.openclaw/workspace/MEMORY.md
Search session logs:
rg "keyword" ~/.openclaw/agents/<id>/sessions/*.jsonl
Archive old daily logs (>90 days):
mkdir -p memory/archive/2025-Q1
mv memory/2025-01-*.md memory/archive/2025-Q1/
Split MEMORY.md by domain if >1000 lines:
memory/domains/
├── react.md
├── graphql.md
└── database.md
Link from main MEMORY.md:
## Domain Knowledge
- [React Patterns](memory/domains/react.md)
- [GraphQL Patterns](memory/domains/graphql.md)
See: patterns.md for comprehensive logging patterns
Quick rule: If you spent >15 minutes on it or learned something non-obvious, log it.
Located at: assets/templates/daily-log.md
Structure:
Located at: assets/templates/MEMORY-template.md
Structure:
Create a hook to auto-log major events:
// ~/.openclaw/hooks/memory-logger/index.js
export default {
name: 'memory-logger',
async onToolCall({ tool, agent }) {
if (tool === 'write' || tool === 'edit') {
// Log file modifications
await exec(`python scripts/daily_log.py --workspace ${agent.workspace} --entry "Modified ${tool.input.file_path}"`)
}
}
}
Add to AGENTS.md:
## Before /new or /reset
Always preserve context:
1. Extract session summary
2. Add to daily log
3. Save critical decisions to MEMORY.md
openclaw cron add \
--name "weekly-memory-review" \
--at "Sunday 18:00" \
--system-event "Time for weekly memory review and knowledge extraction"
juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills