The read-memories skill allows you to search through past Claude Code session logs to recall prior decisions, patterns, or unresolved work. This is useful when you need context from previous conversations or when a user asks about past actions (e.g., "what did we do?").
To use this skill, provide a <keyword> to search for. You can optionally pass the --here flag to scope the search to the current project only.
Search Scopes:
- All projects:
$HOME/.claude/projects/*/*.jsonl - Current project only (
--here): $HOME/.claude/projects/$(echo "$PWD" | sed 's|[/_]|-|g')/*.jsonl
duckdb :memory: -c "
SELECT
regexp_extract(filename, 'projects/([^/]+)/', 1) AS project,
strftime(timestamp::TIMESTAMPTZ, '%Y-%m-%d %H:%M') AS ts,
message.role AS role,
left(message.content::VARCHAR, 500) AS content
FROM read_ndjson('<SEARCH_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;
"