Search Memory

nowledge-co/community/nowledge-mem-claude-code-plugin/skills/search-memory

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0无许可证收录于 2026年10月9日更新于 2026年10月9日

Search memory store when past insights would improve response. Recognize when user's stored breakthroughs, decisions, or solutions are relevant. Search proactively based on context, not just explicit requests.

仅含说明AI & Agents
AI 生成的概览

指导智能体搜索记忆库,以找出相关的过往见解、决策和解决方案。

功能
该技能指导智能体何时以及如何使用带 JSON 输出的 nmem 命令行工具搜索记忆库。内容包括识别过往见解相关的上下文信号、构建语义查询、应用重要性、标签和时间过滤条件,以及解读相关性评分。它还说明了如何搜索过往对话线程并逐步查看。
适用场景
适用于当前话题与过往工作相关、与已解决的问题相似,或涉及有记录的决策和反复出现的主题时。也适用于复杂调试、架构讨论以及可能存在已存储约定的领域特定问题。
运行要求
需要 nmem 命令行工具,可通过 pip install nmem-cli 或 Arch Linux 包管理器安装。远程使用需要配置服务器 URL 和 API 密钥,并能访问该服务器。该技能不附带脚本,仅为说明性内容。

Search Memory

When to Search (Autonomous Recognition)

Strong signals:

  • Continuity: Current topic connects to prior work
  • Pattern match: Problem resembles past solved issue
  • Decision context: "Why/how we chose X" implies documented rationale
  • Recurring theme: Topic discussed in past sessions
  • Implicit recall: "that approach", "like before"

Contextual signals:

  • Complex debugging (may match past root causes)
  • Architecture discussion (choices may be documented)
  • Domain-specific question (conventions likely stored)

Skip when:

  • Fundamentally new topic
  • Generic syntax questions
  • Fresh perspective explicitly requested

Tool Usage

Use nmem CLI with --json flag for programmatic search:

bash
# Basic searchnmem --json m search "3-7 core concepts"
# With filtersnmem --json m search "API design" --importance 0.8
# With labels (multiple labels use AND logic)nmem --json m search "authentication" -l backend -l security
# With time filternmem --json m search "meeting notes" -t week

Only add --space "<space name>" when the user or environment explicitly provided that existing Mem space (for example NMEM_SPACE). Never infer a space from the current folder, git repository, branch, or project name.

Query: Extract semantic core, preserve terminology, multi-language aware

Filters:

  • --importance MIN: Minimum importance score (0.0-1.0)
  • -l, --label LABEL: Filter by label (can specify multiple)
  • -t, --time RANGE: Time filter (today, week, month, year)
  • -n NUM: Limit number of results (default: 10)

JSON Response: Parse memories array, check score field for relevance

Use thread search when the user is really asking about a prior conversation, previous session, or exact discussion:

bash
nmem --json t search "query" --limit 5

If a memory result includes source_thread or thread search finds the likely conversation, inspect it progressively instead of loading the whole thread at once:

bash
nmem --json t show <thread_id> --limit 8 --offset 0 --content-limit 1200

Increase --offset only when more messages are actually needed.

Scores: 0.6-1.0 direct | 0.3-0.6 related | <0.3 skip

Examples:

bash
# Search with importance filternmem --json m search "database optimization" --importance 0.7
# Search with multiple labelsnmem --json m search "React patterns" -l frontend -l react
# Search recent memoriesnmem --json m search "bug fix" -t week -n 5

Response

Found: Synthesize, cite when helpful None: State clearly, suggest distilling if current discussion valuable

Troubleshooting

If nmem is not in PATH: pip install nmem-cli, or on Arch Linux yay -S nmem-cli / paru -S nmem-cli

For remote servers: run nmem config client set url https://... and nmem config client set api-key ... once on this machine.

Run /status to check server connection.

来源与署名

来源:nowledge-co/community位于nowledge-mem-claude-code-plugin/skills/search-memory提交1f4d7eb

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架