mem-search Skill
当用户要求“搜索记忆”、“你还记得关于 X 的什么”、“查一下 claude-mem”、“mem search”、“找过去的观察记录”、“上次会话我们做了什么”,或想了解某个项目、决策、文件或任务的既往会话上下文时,应使用此技能。用于搜索用户的 Claude-Mem (cmem.ai) 记忆。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Claude-Mem Search (Cowork)
Search the user's persistent Claude-Mem memory on cmem.ai. Memory contains
timestamped observations synthesized from past sessions across all their
agents (Claude Code, Cowork, Codex, and others).
How to search
Run the bundled CLI (no dependencies, uses the plugin's configured API key):
node "${CLAUDE_PLUGIN_ROOT}/scripts/cmem-hook.mjs" search "your query" --limit 20
Progressive search method
Follow claude-mem's Index → Timeline → Transcript discipline — cheap passes
first, expensive detail only for confirmed hits:
- Index pass — run 1–3 broad keyword searches (project names, file names,
error strings, feature names). Skim titles/summaries only.
- Narrow pass — re-search with the most specific terms found in step 1
(IDs, exact phrases) and a smaller --limit.
- Answer — synthesize from the observations returned. Quote timestamps
when the user asks "when".
Do not dump raw search output at the user; extract the relevant observations
and answer in plain language.
Diagnostics
If searches return nothing or error:
node "${CLAUDE_PLUGIN_ROOT}/scripts/cmem-hook.mjs" status
Report the status output plainly: a MISSING api key means the plugin needs the
user's cmem.ai key added to its configuration; a 404 on /api/hooks/context
just means the newer Pro endpoint isn't deployed — search still works via
/api/mcp.
Notes
- Some filters (date ranges, type) may be silently ignored by the cloud API
until MCP parity ships — prefer keyword narrowing over filter flags.
- Never write secrets into search queries; queries are sent to cmem.ai.