From memu
Use when needing to retrieve information from past sessions, conversations, or stored knowledge. Triggers on questions that could benefit from historical context including user preferences, past discussions, workflows, coding patterns, or any query where previous session information would be helpful. Activates broadly for retrieval queries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/memu:recall-memoryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Retrieve information stored across sessions using memU's agentic memory framework.
Retrieve information stored across sessions using memU's agentic memory framework.
This skill retrieves information from memU - a three-layer memory hierarchy that processes conversations into structured knowledge:
How it works: Conversations are automatically memorized when sessions end (via SessionEnd hook). This skill retrieves that stored knowledge when needed.
IMPORTANT: Always use full paths to call scripts. Do NOT use cd to change to the scripts directory.
The skill is located at: Base directory for this skill (shown when skill loads)
To call scripts, concatenate:
/scripts/ + script nameExample:
# If skill base is: /home/user/.claude/plugins/memu/skills/recall-memory
# Then memu.py is at:
/home/user/.claude/plugins/memu/skills/recall-memory/scripts/memu.py
In examples below, we use scripts/memu.py as shorthand, but replace scripts/ with the full path based on the skill's base directory.
memU supports two retrieval methods - choose based on query complexity:
When to use: Specific factual queries, direct questions, known topics
Example:
scripts/memu.py retrieve --query "What coding style do I prefer?" --method rag
When to use: Complex queries, ambiguous questions, need deep understanding
Example:
scripts/memu.py retrieve --query "What patterns do I use in React components?" --method llm
Choosing: Start with RAG (faster). If results are insufficient or query is complex, use LLM.
Follow these steps to retrieve memory:
Convert user's question into a clear query string:
User asks: "What do you know about my testing approach?"
Query: "What is the user's testing approach?"
User asks: "How do I usually name variables?"
Query: "How does the user name variables?"
Call the script with appropriate method:
scripts/memu.py retrieve --query "your query here" --method rag
or
scripts/memu.py retrieve --query "your query here" --method llm
The script returns JSON with this structure:
{
"status": "ok",
"data": {
"categories": [
{
"name": "Coding Preferences",
"summary": "User prefers TypeScript with strict typing..."
}
],
"items": [
{
"memory_type": "preference",
"summary": "Prefers TypeScript over JavaScript"
}
],
"resources": [
{
"modality": "conversation",
"url": "session-2024-01-15"
}
]
}
}
Extract relevant information from the response:
categories for high-level summariesitems for specific facts/preferences| Command | Purpose | Speed |
|---|---|---|
scripts/memu.py retrieve --query "..." --method rag | Fast retrieval (default) | <2s |
scripts/memu.py retrieve --query "..." --method llm | Deep semantic retrieval | 5-10s |
Required parameters:
--query: The question/search query (string)--method: Either rag or llm (default: rag)Output: JSON to stdout with status and data fields
{
"status": "ok",
"data": {
"categories": [/* category objects */],
"items": [/* item objects */],
"resources": [/* resource objects */]
}
}
{
"status": "error",
"error": "Error message here"
}
Common errors:
MEMU_API_KEY environment variable not set - User needs to configure API keyAPI request failed - Network issue or API downUser asks: "What languages do I prefer?"
Process:
scripts/memu.py retrieve --query "What programming languages does the user prefer?" --method rag
Response:
{
"status": "ok",
"data": {
"items": [
{"memory_type": "preference", "summary": "Prefers TypeScript over JavaScript"},
{"memory_type": "preference", "summary": "Uses Python for scripting"}
]
}
}
Your response to user: "Based on our previous discussions, you prefer TypeScript over JavaScript for application development, and you use Python for scripting tasks."
User asks: "How do I usually approach refactoring?"
Process:
scripts/memu.py retrieve --query "How does the user approach refactoring code?" --method llm
Response:
{
"status": "ok",
"data": {
"categories": [
{
"name": "Refactoring Patterns",
"summary": "User follows a systematic approach: write tests first, refactor in small steps, run tests after each change. Prefers extracting functions over inline complexity."
}
]
}
}
Your response to user: "You typically follow a systematic refactoring approach: you start by writing tests to ensure behavior is preserved, then refactor in small incremental steps, running tests after each change. You prefer extracting functions rather than leaving complex logic inline."
User asks: "What do you know about my deployment process?"
Process:
scripts/memu.py retrieve --query "What is the user's deployment process?" --method rag
Response:
{
"status": "ok",
"data": {
"categories": [],
"items": [],
"resources": []
}
}
Your response to user: "I don't have any stored information about your deployment process yet. We haven't discussed this in previous sessions."
| Scenario | Method | Query Example |
|---|---|---|
| Specific preference | RAG | "What editor does the user prefer?" |
| Yes/no fact | RAG | "Does the user use TypeScript?" |
| Open-ended pattern | LLM | "How does the user structure React components?" |
| Complex workflow | LLM | "What is the user's testing strategy?" |
| No prior discussion | Either | (Will return empty results) |
Remember: Conversations are auto-memorized at session end, so knowledge accumulates over time.
npx claudepluginhub asermax/claude-plugins --plugin memuStores and retrieves persistent knowledge across Claude Code sessions, including memory search, recall, and session history.
Searches past conversations before answering, guessing, or treating topics as new. Avoids reinventing solutions by recalling prior decisions, patterns, and gotchas.
Retrieves patterns and lessons from past sessions to reuse fixes, avoid mistakes, and recover context after compaction.