Add Memory Kind
EverMind-AI/EverOS
Walks through adding a new persisted memory kind to EverOS: choose storage among Markdown, SQLite and LanceDB, pick a Markdown strategy, then wire schemas, repos and writers.
Queries MiMoCode's raw trajectory SQLite database for cross-session analysis such as repeated errors, tool-call patterns and verifying what was actually run.
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code memory-search --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .claude/skills/memory-search && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .claude/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-searchType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code memory-search --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .agents/skills/memory-search && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .agents/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code memory-search --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .cursor/skills/memory-search && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .cursor/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/XiaomiMiMo/MiMo-Code.git --path packages/cli/src/skill/builtin/.bundle/memory-search--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code memory-search --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .gemini/skills/memory-search && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .gemini/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install XiaomiMiMo/MiMo-Code memory-searchInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .github/skills/memory-search && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .github/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install XiaomiMiMo/MiMo-Code memory-search --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/XiaomiMiMo/MiMo-Code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/cli/src/skill/builtin/.bundle/memory-search .opencode/skills/memory-search && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "memory-search" agent skill from https://github.com/XiaomiMiMo/MiMo-Code/tree/main/packages/cli/src/skill/builtin/.bundle/memory-search into .opencode/skills/memory-search/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "memory-search", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
memory-searchQueries MiMoCode's raw trajectory SQLite database for cross-session analysis such as repeated errors, tool-call patterns and verifying what was actually run.
When the built-in memory tool (search over curated Markdown) and history tool (full-text search over raw messages) cannot answer a question, this skill goes straight to the trajectory database. It suits aggregating or counting across sessions, filtering by tool, status, agent or time range, viewing every tool call of one session in order, and checking a memory claim against what really happened. The database is opened with `sqlite3 -readonly`, and only SELECT queries are allowed, so it is never modified.
The skill documents the schema: session, message, part, task, task_event and actor_registry tables, plus the JSON shapes stored in part data for text, completed and failed tool calls, step boundaries, compaction and checkpoints. The default location is under `~/.local/share/mimocode/`, and the `MIMOCODE_DB` environment variable overrides it. Ready-made query templates and strategies for different goals are mentioned in the description, but the excerpt is cut off before they appear.
Read from SKILL.md and the folder at commit 6babeb0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
sqlite3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Memory Search with SQL loads about 1.8k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 444 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from XiaomiMiMo/MiMo-Code at commit 6babeb0, republished under its MIT licence (© XiaomiMiMo). 444 words, ~1,846 tokens.
.claude/skills/memory-search/SKILL.md (or your agent's skills folder).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.
memory and history tools returned nothing useful despite multiple query attempts.# 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.
| 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.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 boundaryagent_id = 'main' = main agent; other values = subagent (e.g. "explore-1", "general-1").$.state.output only exists when $.state.status = "completed". Failures store the message in $.state.error.time_created is Unix milliseconds.List recent sessions for this project:
SELECT id, title, time_created,
datetime(time_created/1000, 'unixepoch', 'localtime') as created
FROM session
WHERE project_id = '<PROJECT_ID>'
AND parent_id IS NULL
ORDER BY time_created DESC
LIMIT 20;Find user messages containing a keyword:
SELECT m.session_id, m.id,
substr(json_extract(p.data, '$.text'), 1, 200) as preview
FROM message m
JOIN part p ON p.message_id = m.id AND p.session_id = m.session_id
WHERE json_extract(m.data, '$.role') = 'user'
AND json_extract(p.data, '$.type') = 'text'
AND json_extract(p.data, '$.text') LIKE '%keyword%'
ORDER BY m.time_created DESC
LIMIT 10;Find tool calls by tool name:
SELECT m.session_id, m.id, m.agent_id,
json_extract(p.data, '$.tool') as tool,
json_extract(p.data, '$.state.status') as status,
substr(COALESCE(json_extract(p.data, '$.state.output'), json_extract(p.data, '$.state.error')), 1, 300) as result_preview
FROM message m
JOIN part p ON p.message_id = m.id AND p.session_id = m.session_id
WHERE json_extract(m.data, '$.role') = 'assistant'
AND json_extract(p.data, '$.type') = 'tool'
AND json_extract(p.data, '$.tool') = '<TOOL_NAME>'
AND m.session_id = '<SESSION_ID>'
ORDER BY m.time_created DESC
LIMIT 20;View a session's full execution chain:
SELECT m.id, m.agent_id,
json_extract(p.data, '$.type') as part_type,
json_extract(p.data, '$.tool') as tool,
substr(p.data, 1, 800) as preview
FROM message m
JOIN part p ON p.message_id = m.id AND p.session_id = m.session_id
WHERE m.session_id = '<SESSION_ID>'
AND json_extract(m.data, '$.role') = 'assistant'
ORDER BY m.time_created, p.time_created;Find repeated stdout errors (completed bash calls, last 7 days):
SELECT substr(json_extract(p.data, '$.state.output'), 1, 200) as error_output,
COUNT(*) as occurrences,
GROUP_CONCAT(DISTINCT m.session_id) as sessions
FROM part p
JOIN message m ON m.id = p.message_id AND m.session_id = p.session_id
WHERE json_extract(p.data, '$.type') = 'tool'
AND json_extract(p.data, '$.tool') = 'bash'
AND json_extract(p.data, '$.state.status') = 'completed'
AND json_extract(p.data, '$.state.output') LIKE '%error%'
AND m.time_created > (strftime('%s', 'now') - 7*86400) * 1000
GROUP BY substr(json_extract(p.data, '$.state.output'), 1, 200)
HAVING occurrences > 1
ORDER BY occurrences DESC
LIMIT 10;Find actual tool failures (any tool, last 7 days):
SELECT json_extract(p.data, '$.tool') as tool,
substr(json_extract(p.data, '$.state.error'), 1, 200) as error_msg,
COUNT(*) as occurrences,
GROUP_CONCAT(DISTINCT m.session_id) as sessions
FROM part p
JOIN message m ON m.id = p.message_id AND m.session_id = p.session_id
WHERE json_extract(p.data, '$.type') = 'tool'
AND json_extract(p.data, '$.state.status') = 'error'
AND m.time_created > (strftime('%s', 'now') - 7*86400) * 1000
GROUP BY json_extract(p.data, '$.tool'), substr(json_extract(p.data, '$.state.error'), 1, 200)
HAVING occurrences > 1
ORDER BY occurrences DESC
LIMIT 10;| Goal | Strategy |
|---|---|
| Find a user's stated rule/preference | Search user text parts for '%always%', '%never%', '%remember%', '%rule%' |
| Find a design decision | Search '%decided%', '%tradeoff%', '%reason%' in user text |
| Find a specific file path or command | LIKE match on tool output/error |
| Find repeated workflows | Group tool call sequences by session, look for recurring tool×N patterns |
| Verify a memory claim | Find the session_id from the memory entry [ses_xxx], then query its full execution chain |
| Count tool usage | GROUP BY json_extract(p.data, '$.tool') with COUNT |
sqlite3 -readonly or SELECT only.session_id or time_created range.json_extract() for structured field access.© XiaomiMiMo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in packages/cli/src/skill/builtin/.bundle/memory-search of XiaomiMiMo/MiMo-Code.
Open the folder on GitHubat commit 6babeb0
Memory Search with SQL next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Memory Search with SQL this skillXiaomiMiMo/MiMo-Code | 14k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Add Memory KindEverMind-AI/EverOS | 13k | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Agent Memorytigerless-labs/agent-memory | 2.4k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Memoraagentic-box/memora | 731 | — | ~813 | Automated safety check: Pass | MIT | |
| Cognee Session Memory and Improvetopoteretes/cognee | 32k | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Paxmpax-beehive/paxm | 421 | — | ~574 | Automated safety check: Pass | Apache-2.0 |
EverMind-AI/EverOS
Walks through adding a new persisted memory kind to EverOS: choose storage among Markdown, SQLite and LanceDB, pick a Markdown strategy, then wire schemas, repos and writers.
tigerless-labs/agent-memory
Read and write the shared long-term memory store. An agent skill from tigerless-labs/agent-memory.
agentic-box/memora
A skill your agent uses when working with persistent memory across sessions, storing/retrieving knowledge, managing TODOs/issues, or when context from previous sessions would be helpful.
topoteretes/cognee
Explains how cognee stores session memory by session_id and bridges it into the permanent graph with improve(), including the stages, results and settings.
pax-beehive/paxm
Use paxm as Codex's active and passive memory layer. An agent skill from pax-beehive/paxm.
carson2222/skills
Read-only lookup of local OpenCode history, including sessions, messages, plans, prompt history and prior decisions, queried through sqlite3 only when earlier context would help.
XiaomiMiMo/MiMo-Code
Searches arXiv, fetches metadata, generates BibTeX, downloads PDFs and finds citations and related papers using a bundled Python script.
XiaomiMiMo/MiMo-Code
Interactive guide for creating, reviewing and fixing agent skills (SKILL.md folders), covering structure, frontmatter rules, trigger phrases and validation before sharing.
XiaomiMiMo/MiMo-Code
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
XiaomiMiMo/MiMo-Code
Lets one MiMoCode process drive another, headless with JSON events or interactively through tmux, to test behavior and visual regressions with parseable evidence.
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
XiaomiMiMo/MiMo-Code
Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.
Works with
Categories
Queries MiMoCode's raw trajectory SQLite database for cross-session analysis such as repeated errors, tool-call patterns and verifying what was actually run. When the built-in memory tool (search over curated Markdown) and history tool (full-text search over raw messages) cannot answer a question, this skill goes straight to the trajectory database. It suits aggregating or counting across sessions, filtering by tool, status, agent or time range, viewing every tool call of one session in order, and checking a memory claim against what really happened.
Memory Search with SQL fits situations like: counting which tools fail most often across past sessions; finding how many sessions touched a particular file; replaying every tool call of one session in order; checking a remembered claim against what was really executed.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a claude-code`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/memory-search in XiaomiMiMo/MiMo-Code) into .claude/skills/memory-search in your project. Claude Code loads it when a task matches its description.
Run `npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a codex`. Or copy the skill folder (packages/cli/src/skill/builtin/.bundle/memory-search in XiaomiMiMo/MiMo-Code) into .agents/skills/memory-search in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add XiaomiMiMo/MiMo-Code --skill memory-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-search, .gemini/skills/memory-search, .github/skills/memory-search and .opencode/skills/memory-search in your project.
Going by SKILL.md and its folder, Memory Search with SQL needs the command-line tools its instructions call (sqlite3). Our summary lists: The `sqlite3` command-line tool; A MiMoCode trajectory database, by default under ~/.local/share/mimocode/.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Memory Search with SQL is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Memory Search with SQL: Add Memory Kind (EverMind-AI/EverOS, 13k stars), Agent Memory (tigerless-labs/agent-memory, 2.4k stars), Memora (agentic-box/memora, 731 stars) and Cognee Session Memory and Improve (topoteretes/cognee, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
XiaomiMiMo (a GitHub organization) maintains it in XiaomiMiMo/MiMo-Code, which has 13,601 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 3, 2026.
Source: XiaomiMiMo/MiMo-Code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.