memory-curator
Manage agent memory through daily logs, session preservation, and knowledge extraction. Use when (1) logging work at end of day, (2) preserving context before /new or /reset, (3) extracting patterns from daily logs to MEMORY.md, (4) searching past decisions and learnings, (5) organizing knowledge for long-term retention. Essential for continuous improvement and avoiding repeated mistakes.
What this skill does
# Memory Curator
Systematic memory management for agents through daily logging, session preservation, and knowledge extraction.
## Quick Start
### Log Today's Work
```bash
# 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 Memory
```bash
# 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
```
### Extract Session Summary
```bash
# Generate summary from current session
python scripts/extract_session.py \
--session ~/.openclaw/agents/<agent-id>/sessions/<session-id>.jsonl \
--output session-summary.md
```
## Core Workflows
### End of Day: Log Activities
**When:** Before ending work session or switching contexts
**Steps:**
1. **Review what was accomplished:**
- Features implemented
- Bugs fixed
- Decisions made
- Learnings discovered
2. **Append to daily log:**
```bash
python scripts/daily_log.py \
--workspace ~/.openclaw/workspace \
--entry "Fixed race condition in payment processing - added mutex lock"
```
3. **Add structured entries for important work:**
```markdown
## 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](references/patterns.md) for what to log in different scenarios
### Before Context Switch: Preserve Session
**When:** Before running `/new`, `/reset`, or ending conversation
**Steps:**
1. **Extract session summary:**
```bash
# 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
```
2. **Review summary and edit Key Learnings section**
3. **Save to daily log:**
```bash
# Append key points to today's log
cat ~/session-summary.md >> ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md
```
4. **Extract critical context to MEMORY.md if needed:**
- Non-obvious solutions
- Important decisions
- Patterns worth remembering
### Weekly Review: Extract Knowledge
**When:** End of week (Friday/Sunday) or monthly
**Steps:**
1. **Search for patterns in recent logs:**
```bash
python scripts/search_memory.py \
--workspace ~/.openclaw/workspace \
--recent 7
```
2. **Look for extraction signals:**
- Repeated issues (3+ occurrences)
- High-cost learnings (>1 hour to solve)
- Non-obvious solutions
- Successful patterns worth reusing
3. **Extract to MEMORY.md:**
- Add new sections or update existing ones
- Use problem-solution format
- Include code examples
- Add context for when to use
4. **Clean up MEMORY.md:**
- Remove outdated information
- Consolidate duplicate entries
- Update code examples
- Improve organization if needed
**See:** [extraction.md](references/extraction.md) for detailed extraction patterns
### Daily: Quick Logging
**For rapid context capture during work:**
```bash
# 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 Structure
### Daily Logs (`memory/YYYY-MM-DD.md`)
**Purpose:** Chronological activity tracking
**Content:**
- What was done (timestamped)
- Decisions made
- Problems solved
- Learnings discovered
**Retention:** Keep recent logs accessible, optionally archive logs >90 days
**When to use:**
- "What did I do on [date]?"
- "When did I implement X?"
- Session history
- Activity tracking
### MEMORY.md
**Purpose:** Curated long-term knowledge
**Content:**
- Patterns and best practices
- Common solutions
- Mistakes to avoid
- Useful references
**Organization:** Topic-based, not chronological
**When to use:**
- "How do I solve X?"
- "What's the pattern for Y?"
- Best practices
- Reusable solutions
**See:** [organization.md](references/organization.md) for structure patterns
## Memory Logging Patterns
### What to Log
**Always log:**
- Key implementation decisions (why approach X over Y)
- Non-obvious solutions
- Root causes of bugs
- Architecture decisions with rationale
- Patterns discovered
- Mistakes and how they were fixed
**Don't log:**
- Every file changed (git has this)
- Obvious implementation details
- Routine commits
- Project-specific hacks
**See:** [patterns.md](references/patterns.md) for comprehensive logging guidance
### When to Log
**During work:**
- Quick notes with `daily_log.py --entry`
- Capture decisions as made
- Log problems when solved
**End of day:**
- Review what was accomplished
- Structure important entries
- Add context for tomorrow
**End of week:**
- Extract patterns to MEMORY.md
- Consolidate learnings
- Clean up outdated info
## Knowledge Extraction
### Extraction Criteria
**Extract to MEMORY.md when:**
- Pattern appears 3+ times
- Solution took >1 hour to find
- Solution is non-obvious
- Will save significant time in future
- Applies across multiple projects
- Mistake was costly to debug
**Don't extract:**
- One-off fixes
- Project-specific hacks
- Obvious solutions
- Rapidly changing APIs
### Extraction Format
**Problem-Solution Structure:**
```markdown
## [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_session.py
Extract summary from session JSONL.
```bash
python scripts/extract_session.py \
--session ~/.openclaw/agents/<id>/sessions/<session>.jsonl \
[--output summary.md]
```
Outputs:
- User requests summary
- Tools used
- Files touched
- Template for key learnings
### search_memory.py
Search across all memory files.
```bash
# 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
```
## Best Practices
### Daily Discipline
1. **Start of day:** Review yesterday's log, plan today
2. **During work:** Quick notes for decisions and learnings
3. **End of day:** Structure important entries, add context
4. **End of week:** Extract patRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.