Skip to content

Memory Search (SQLite Trajectory DB)

Lets an agent run read-only SQL against its past session database to find patterns, errors and past decisions.

Stars
13,743
Licence
MIT
Files
1 file

What it does

This skill teaches an AI coding agent to query the local database where it stores records of past sessions, including tool calls, errors and messages. Instead of only searching text, the agent can count repeated failures, group tool usage, and check what was actually executed against what it remembers. It comes with the database schema and ready-made SQL templates, and the skill asks the agent to keep queries read-only.

Great for

  • Developers using the MiMo Code CLI who want the agent to analyse its own past sessions
  • People debugging recurring tool failures across many sessions
  • Teams verifying whether a remembered decision or command was really run

Skip it if

  • Users who do not run MiMo Code, since the database path and schema are specific to it
  • Anyone wanting to change or clean up stored history, because the skill forbids writes and is not a management tool
  • Sensitive projects where past session content (which may include secrets typed or printed in tool output) should not be queried by an agent

Try asking

  • “Which tool has failed most often in the last week, and in which sessions?”
  • “Find every time I told you a rule starting with 'always' or 'never' in past sessions”
  • “Show me the full list of tool calls made in session ses_xxx”
  • “Check whether the command the memory notes say was run actually executed”
Step-by-step guide: how to use Memory Search (SQLite Trajectory DB)Install, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    memory-search.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip memory-search.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip memory-search.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Ask for a specific goal (failures, a keyword, one session) so the agent picks the right template rather than scanning everything.
  • Check the SQL the agent runs before accepting results, and confirm it uses -readonly or SELECT only.
  • Be aware that past tool outputs may contain sensitive data; avoid pasting those results into shared channels.

What's inside

  • SKILL.md

Redistributed unmodified from XiaomiMiMo/MiMo-Code under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.