| name | read-memories |
| description | Search past Claude Code session logs to recover context. Use proactively when recalling past decisions, patterns, or unresolved work from previous sessions.
|
| argument-hint | <keyword> [--here] |
| allowed-tools | Bash |
Search silently — do NOT narrate to the user.
$0 = keyword. $1 = --here to scope to current project.
Search path
ALL="$HOME/.claude/projects/*/*.jsonl"
CURRENT="$HOME/.claude/projects/$(pixi run python -c "import pathlib,re; print(re.sub(r'[/\\\\_]', '-', str(pathlib.Path.cwd())))")/*.jsonl"
Use $CURRENT if --here, else $ALL.
Query
pixi run duckdb :memory: -c "
SELECT
regexp_extract(filename, 'projects/([^/]+)/', 1) AS project,
strftime(timestamp::TIMESTAMPTZ, '%Y-%m-%d %H:%M') AS ts,
message.role, message.content::VARCHAR AS content
FROM read_ndjson('<PATH>', auto_detect=true, ignore_errors=true, filename=true)
WHERE message::VARCHAR ILIKE '%<KEYWORD>%' AND message.role IS NOT NULL
ORDER BY timestamp LIMIT 40;
"
Large results
If >40 rows, offload to temp DB:
pixi run duckdb ".duckdb-skills/memories.duckdb" -c "CREATE OR REPLACE TABLE memories AS <above query without LIMIT>;"
Internalize
Extract decisions, patterns, conventions, unresolved items. Use to inform current response.