memory-search
यह क्या करती है
यह स्किल एजेंट को सहेजे गए कोडिंग सेशन की हिस्ट्री पर केवल-पढ़ने वाली डेटाबेस क्वेरी चलाने देती है। यह उन लोगों के लिए है जो पिछले कामों में ऐसे पैटर्न खोजना चाहते हैं जो सामान्य टेक्स्ट खोज नहीं दिखा पाती।
कब इस्तेमाल करें
- ✓जब आप देखना चाहते हैं कि कोई टूल या कमांड सेशनों में कितनी बार फ़ेल हुआ।
- ✓जब आपको पिछला कोई कमांड या फ़ैसला ढूँढना हो।
- ✓जब आपको किसी एक सेशन में कार्रवाइयों का पूरा क्रम चाहिए।
Skill का लिंक
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/memory-search/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मुझे पता करना है कि मेरे पिछले कोडिंग सेशनों में कौन-सा टूल सबसे ज़्यादा फ़ेल हुआ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट सेशन डेटाबेस को केवल-पढ़ने के मोड में खोलता है और उसकी टेबलों पर SQL क्वेरी चलाता है। नतीजों से आपका सवाल जवाब होता है, और डेटा कभी नहीं बदला जाता।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
memoryandhistorytools 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 (nooutputfield; 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
Key conventions
agent_id = 'main'= main agent; other values = subagent (e.g."explore-1","general-1").$.state.outputonly exists when$.state.status = "completed". Failures store the message in$.state.error.time_createdis Unix milliseconds.
Query templates
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
अक्सर पूछे जाने वाले सवाल
क्या यह मेरा सेशन डेटा बदल सकती है?
नहीं। स्किल केवल-पढ़ने की एक्सेस या सिर्फ़ SELECT क्वेरी का इस्तेमाल करने को कहती है।
सामान्य मेमोरी खोज से यह कब बेहतर है?
गिनती करने, टूल या स्थिति से फ़िल्टर करने और सेशनों की तुलना के लिए, जो टेक्स्ट खोज ठीक से नहीं कर पाती।
डेटाबेस कहाँ है?
स्किल एक सामान्य स्थान बताती है, और यह भी कि एक एनवायरनमेंट वेरिएबल किसी दूसरे पथ की ओर इशारा कर सकता है।
जानकारी
लेखक का मूल विवरण
Query the raw trajectory SQLite database directly when the built-in memory and history tools are insufficient. Use when you need structured analysis across sessions: finding repeated errors, grouping tool calls by pattern, verifying what was actually executed, or locating specific past commands/decisions that text search cannot surface. Provides the database schema, ready-to-use SQL query templates, and per-goal strategies.
repo: XiaomiMiMo/MiMo-Code
लोकप्रियता
- GitHub स्टार
- 14k
- रैंकिंग में स्थान
- #11332
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
effect
14kआपके एजेंट को Effect TypeScript फ़्रेमवर्क के सवालों के जवाब देने में मदद करती है, याददाश्त पर भरोसा करने के बजाय उसका सोर्स कोड और दस्तावेज़ जाँचकर।
arxiv
14kआपके एजेंट को arXiv पर शोधपत्र खोजने, पढ़ने, उद्धृत करने और उन पर नज़र रखने में मदद करती है, जिसमें सार, BibTeX उद्धरण, PDF डाउनलोड और उद्धरण लिंक शामिल हैं।
claude-code
14kआपके एजेंट को कोडिंग का काम Claude Code कमांड-लाइन टूल को सौंपने में मदद करती है, एक बार चलने वाले रन, इंटरैक्टिव सेशन या पृष्ठभूमि जॉब के रूप में।
codex
14kआपके एजेंट को बिना चैट विंडो के OpenAI Codex कमांड-लाइन टूल चलाने में मदद करती है, कोडिंग काम, स्क्रिप्ट और स्वचालित पाइपलाइन के लिए।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।