memory-search

memory-search is a skill for Claude Code, Codex from XiaomiMiMo/MiMo-Code. It costs 78 tokens per session (1,953 once invoked), scanned A, original, MIT.

A way to query MiMoCode’s raw SQLite activity database directly. SQLite is a local database format, and the database records sessions, messages, tool calls, statuses, and execution details.

In plain words
What is it for?
Use it to find repeated errors, group or count tool calls, inspect complete session activity, filter events by conditions, and check whether a remembered detail matches the recorded history.
Why use it?
It helps investigate past sessions when ordinary memory or history search is not enough. Structured queries can find patterns, count events, and verify what actually happened.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to find repeated errors, group or count tool calls, inspect complete session activity, filter events by conditions, and check whether a remembered detail matches the recorded history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaomimimo/mimo-code/memory-search
About the project

MiMoCode is a terminal-based AI coding assistant that reads and writes code, runs commands, manages Git, and remembers project context across sessions. Developers use it to work with software projects through a command-line interface and connect it to language-model providers; the catalogue includes skills and instructions for it.

XiaomiMiMo/MiMo-Code · 13,799 stars · on GitHub · mimo.xiaomi.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XiaomiMiMo/MiMo-Code --skill memory-search
Clone the repo
git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/memory-search/github.svg)](https://agentmods.dev/skills/xiaomimimo/mimo-code/memory-search)
Your own site
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/memory-search"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/memory-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaomimimo/mimo-code/memory-search"><img src="https://agentmods.dev/badge/skills/xiaomimimo/mimo-code/memory-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01953
Opus 5.5 $0.00031 $0.00781
Sonnet 5.5 $0.00016 $0.00391
Haiku 4.5 $0.00008 $0.00195

Measured 3mo ago against content hash b0a34e7878f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cli/src/skill/builtin/.bundle/memory-search/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory Search: SQLite Trajectory Database

Direct SQL access to mimocode's trajectory database for structured analysis that the memory (BM25 over curated markdown) and history (FTS over raw messages) tools cannot perform — aggregation, filtering by tool/status/time, cross-session pattern detection, and execution chain inspection.

When to use

  • You need to aggregate or count across sessions (e.g. "which tool fails most often?", "how many sessions touched file X?").
  • You need to filter by structure — tool name, status, agent_id, time range — not just text content.
  • You need to view a complete execution chain for a session (every tool call in order).
  • You need to verify a memory claim against what actually happened (the DB is the source of truth).
  • The memory and history tools returned nothing useful despite multiple query attempts.

Locating the database

# Typically at this path. MIMOCODE_DB env var overrides if set.
sqlite3 -readonly ~/.local/share/mimocode/mimocode.db ".tables"

Always use -readonly or only SELECT queries — never modify the database.

Schema

Table Purpose Key columns
session Session metadata id, project_id, title, time_created, parent_id
message User/assistant turns id, session_id, agent_id, time_created, data (JSON: $.role)
part Message parts (text, tool calls, steps) id, message_id, session_id, time_created, data (JSON)
task Task tree id, session_id, summary, status
task_event Task state transitions id, session_id, task_id, at, kind, summary
actor_registry Subagent/peer history session_id, actor_id, agent, mode, status, description

Part types in part.data

  • {"type":"text","text":"..."} — agent text output
  • {"type":"tool","tool":"<name>","callID":"...","state":{"status":"completed","input":{...},"output":"..."}} — completed tool call
  • {"type":"tool","tool":"<name>","callID":"...","state":{"status":"error","input":{...},"error":"..."}} — failed tool call (no output field; error message in $.state.error)
  • {"type":"step-start"} / {"type":"step-finish","tokens":...} — step boundaries
  • {"type":"compaction","auto":true/false} — compaction boundary
  • {"type":"checkpoint",...} — checkpoint/rebuild boundary

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 166 lines · 78 tokens per session scan A b0a34e7878f7

Subscribe to this mod's changes

memory-search is a skill published in the GitHub repository XiaomiMiMo/MiMo-Code (13,799 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 1,953 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

memory-search compared with skills from other repositories

memory-search next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memory-searchXiaomiMiMo/MiMo-CodeSkill14kyesterdayMITA78Claude Code, Codex
mnemonmnemon-dev/mnemonSkill7538d agoApache-2.0A25Claude Code, Codex
mnemonmnemon-dev/mnemonSkill7538d agoApache-2.0A68Claude Code, Codex
durable-session-stateZaxbyHub/opencode-swarmSkill549todayMITA70Claude Code
brain-ingestmindmuxai/brain.mdSkill72818d agoApache-2.0A48Claude Code, Codex
sivtr-memoryAriestar/sivtrSkill258todayApache-2.0A46Claude Code, Codex
kn-initknowns-dev/knownsSkill257yesterdayMITA23Claude Code, Codex