Search Memory

nowledge-co/community/nowledge-mem-copilot-cli-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 產生的概覽

引導代理主動檢索記憶庫,找出相關的過往洞見、決策與解決方案。

功能
此技能引導代理在何時以及如何檢索持久化記憶庫,以取得與當前對話相關的過往突破、決策或解決方案。它定義了自主檢索的辨識訊號,提供 nmem 命令列工具用於記憶與對話串檢索,並支援依重要性、標籤與時間等條件篩選,同時說明如何解讀相關性分數並作出回應。其產出是對過往脈絡的綜合回顧,必要時會引用來源;若未找到相關內容,則會明確說明。
適用情境
當當前主題與過往工作相關、與曾解決的問題相似,或涉及有記錄的決策依據、反覆出現的主題,以及「那個做法」之類的隱含指涉時,適合使用。它也適用於複雜除錯、架構討論,以及可能存有既定慣例的領域特定問題。對於全新主題、一般語法問題,或使用者明確要求全新觀點的情況,則應略過。
執行需求
需要安裝 nmem 命令列工具並使其位於 PATH 中(pip install nmem-cli,Arch Linux 上可用 yay/paru)。連線遠端伺服器需設定 URL 與 API 金鑰,可用 nmem status 檢查連線。此技能不附帶指令碼,僅為說明性指示。

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

If the runtime already knows the active project or agent lane, add --space "<space 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 nmem status to check server connection.

來源與署名

來源:nowledge-co/community位於nowledge-mem-copilot-cli-plugin/skills/search-memory提交1f4d7eb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架