Memory recall

From zilliztech/memsearch · View interactive version

Memory recall is an AI agent skill from the GitHub repository zilliztech/memsearch. memsearch-dsh memory-recall skill body.

How to use this skill

Skill file

<!--

memsearch-dsh memory-recall skill body.

Registered by plugins/dsh/index.js via ctx.skills.registerProvider()

with metadata (name: memory-recall, description, whenToUse) supplied in code.

{{PLACEHOLDER}} tokens are substituted for the calling workspace when loaded.

-->

Memory Recall

Search memsearch's persistent memory for context relevant to the user's question. The memory store is shared across agents (Claude Code, Codex, OpenClaw, OpenCode, DeepSeek Harness), so it can surface past work, decisions, and conversation fragments from any of them.

When to use

Use this skill when the user's question could benefit from historical context: they reference past work, ask what was done before, or the current task could reuse earlier decisions or findings. A search is cheap (one index query), so when in doubt, run it.

Steps

1. Search for relevant chunks

Run a semantic search over the project's memsearch collection. The plugin derives the collection from the current working directory when this skill is loaded:

{{MEMSEARCH_CMD}} search "{{QUERY}}" --top-k 5 --json-output {{MILVUS_FLAG}}--default-collection "{{COLLECTION}}"

Before each search, check whether ~/.memsearch/config.toml or the project's

.memsearch.toml exists. If neither exists, add --provider onnx to the command.

Otherwise, leave the provider unset so the existing configuration applies.

Replace {{QUERY}} with a concise natural-language summary of what the user needs. The --json-output results contain content, source, heading, score, and chunk_hash.

2. Expand promising results

For the most promising results, expand the full markdown section to see surrounding context:

{{MEMSEARCH_CMD}} expand <chunk_hash> {{MILVUS_FLAG}}--default-collection "{{COLLECTION}}"

3. Drill into the original conversation (optional)

When an expanded result contains an anchor comment like

<!-- session:<id> turn:<N> db:<path> -->

you can render the original conversation around that turn:

{{PYTHON_CMD}} "{{PLUGIN_DIR}}/scripts/parse-transcript.py" --db "<path>" --turn <N> --context 3

Pass --context 0 for just the target turn, or omit --turn to see the most recent turns.

If the script reports a missing decompressor, use its declared dependencies in an isolated environment:

uv run --script "{{PLUGIN_DIR}}/scripts/parse-transcript.py" --db "<path>" --turn <N> --context 3

4. Report a curated summary

Return a concise summary of the relevant context to the user, citing the memory source files where useful. If the search finds nothing relevant, say so plainly in one line and proceed without it. Do not fabricate memories.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.