mcpField
R
read-memories

read-memories

github.com/duckdbAgent workflows613824 installsUpdated 28w ago
Repository

About read-memories

A Claude skill that searches past session logs for a keyword and uses relevant decisions, patterns, TODOs, and corrections to inform the current response. It can search across projects or limit the search to the current project.

Key features

  1. 01Search session logs by keyword
  2. 02Scope search to the current project
  3. 03Extract decisions and TODOs
  4. 04Keep the search process unspoken

Use cases

  1. 01Recall an earlier project decision
  2. 02Find unresolved TODOs in prior sessions
  3. 03Apply past user corrections

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/duckdb/duckdb-skills --skill read-memories

After installing, type/read-memoriesin Claude Code to confirm it loaded.

Details

From the project README

Search past session logs silently — do NOT narrate the process. Absorb the results and continue with enriched context.

$0 is the keyword. Pass --here as $1 to scope to the current project only.

Step 1 — Query

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;
"

Search paths:

  • All projects: $HOME/.claude/projects/*/*.jsonl
  • Current only (--here): $HOME/.claude/projects/$(echo "$PWD" | sed 's|[/_]|-|g')/*.jsonl

Replace <SEARCH_PATH> and <KEYWORD> before running.

Step 2 — Internalize

From the results, extract decisions, patterns, unresolved TODOs, and user corrections. Use this to inform your current response — do not repeat raw logs to the user.

Comments

Markdown supported