memory-search
Semantic search over global agent memory. Use to retrieve previously learned patterns, decisions, gotchas, and workarounds. Prevents stale-context errors…
от oimiragieo★ 48 звёзд на GitHub
Установить memory-search в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Memory Search
Memory Search is the live recall layer for all agents in the ecosystem. It performs semantic search over the global memory corpus (learnings, decisions, issues, gotchas, patterns) using vector similarity. Every agent must use this skill to avoid working from stale or contradictory context — especially in long sessions where in-conversation memory has been compressed or reset. - Semantic similarity search over all memory files (learnings.md, decisions.md, issues.md, gotchas.json, patterns.json) - Returns up to 10 results ranked by similarity score - Output includes: source file, similarity percentage, and 200-character content preview - Supports natural language queries — no keyword matching required - Cross-agent knowledge retrieval: surfaces knowledge from previous agents in the same or prior sessions <execution_process>Step 1: Formulate a Focused Query
Identify the specific knowledge gap before invoking. Good queries target a concrete decision, pattern, or error — not a broad topic.
Good queries:
"JWT refresh token rotation pattern""Windows path normalization in hooks""BM25 index rebuild performance""agent spawning without task_id error"
Bad queries (too broad):
"authentication"— too generic, returns noise"everything about routing"— unfocused"what have we done before"— meaningless for semantic search
Step 2: Run the Search
Invoke via the Bash tool:
node .claude/lib/memory/memory-search.cjs "your focused search query"
Full invocation:
node .claude/lib/memory/memory-search.cjs "JWT refresh token rotation pattern"
Step 3: Parse the Output
The output format is:
Found N results for: "<query>"
[<source-file>] Similarity: XX.X%
<200-character content preview>...
[<source-file>] Similarity: YY.Y%
<200-character content preview>...
Example real output:
Found 3 results for: "JWT refresh token rotation pattern"
[learnings.md] Similarity: 87.3%
JWT refresh tokens must be stored in httpOnly cookies to prevent XSS. See ADR-045 for detailed rationale and trade-offs vs localStorage approach...
[decisions.md] Similarity: 74.1%
ADR-045: JWT over sessions chosen for stateless architecture. Refresh token rotation every 15 minutes. Invalidate on logout via token blocklist...
[issues.md] Similarity: 61.2%
Known issue: JWT expiry not propagated to frontend — workaround in auth.middleware.ts line 47 until ADR-045 Phase 2 is implemented...
Step 4: Interpret Similarity Scores
| Similarity | Interpretation | Action |
|---|---|---|
| >80% | Highly relevant — directly matches the query | Read the full source file for complete context |
| 60–80% | Likely relevant — related topic or adjacent pattern | Skim and use if applicable |
| 40–60% | Possibly relevant — tangentially related | Use judgment, may be noise |
| <40% | Probably not relevant | Discard unless nothing better exists |
Step 5: Follow Up on High-Similarity Results
For results with similarity >60%, read the full source file to get untruncated content:
# Results showed [decisions.md] Similarity: 87.3%
# Follow up with:
Read({ file_path: '.claude/context/memory/decisions.md' })
Or search for the specific ADR/pattern by keyword:
node .claude/lib/memory/memory-search.cjs "ADR-045 JWT"
Step 6: Handle Zero Results
If Found 0 results, try:
- Rephrase the query using synonyms or the actual error message text
- Broaden slightly — e.g.,
"JWT authentication"instead of"JWT RS256 key rotation" - Check memory files directly if the topic is recent and may not yet be indexed
Zero results means the knowledge is either not yet documented or the query was too specific.
Step 7: Apply or Document Findings
- If result confirms known approach: proceed with confidence; cite the source in your reasoning.
- If result reveals a better approach: update your plan to align with the documented pattern.
- If result reveals a known issue/workaround: apply the workaround immediately rather than discovering it yourself.
- If nothing useful found: continue with your best judgment; document your decision afterward to Memory Protocol.
Run early, not late: Memory search at the START of a task prevents wasted effort. Running it after you have already made decisions is too late to benefit.
One query per knowledge gap: Don't batch all your unknowns into one query. Run targeted queries for each specific gap.
Use the actual error message as the query: If you h
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash
Вложенные файлы
- commands/memory-search.md
- hooks/post-execute.cjs
- hooks/pre-execute.cjs
- references/research-requirements.md
- rules/memory-search.md
- schemas/input.schema.json
- schemas/output.schema.json
- scripts/main.cjs
- templates/implementation-template.md
FAQ
Что делает скилл memory-search?
Semantic search over global agent memory. Use to retrieve previously learned patterns, decisions, gotchas, and workarounds. Prevents stale-context errors across long sessions and multi-agent pipelines.
Как установить скилл memory-search?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл memory-search запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
agent-skill-stack
GitHubFind, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
build-evidence-map
GitHubBuild an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
pinecone-rag
GitHubBuild production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
qdrant-monitoring-debugging
GitHubDiagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…