search-memory

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.

⭐12stars🔀0forks📁View on GitHub🕐Updated Dec 9, 2025⬇️2downloads

When & Why to Use This Skill

The Search Memory skill empowers Claude to autonomously retrieve and leverage historical insights, decisions, and breakthroughs from a persistent memory store. By proactively searching based on conversation context rather than just explicit commands, it ensures high-level continuity and allows the agent to build upon previously solved problems and documented rationales.

Use Cases

  • Technical Troubleshooting: Automatically identify and retrieve past root cause analyses and bug fixes when current debugging patterns match historical issues.
  • Architectural Decision Support: Reference previously documented design choices and rationales during new system planning to ensure consistency with established architecture.
  • Project Continuity: Maintain context across long-term engagements by proactively surfacing relevant meeting notes, recurring themes, and past decisions.
  • Domain-Specific Knowledge Retrieval: Access stored organizational conventions, specialized terminology, and unique workflows that have been established in prior sessions.
nameSearch Memory
descriptionSearch 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.

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:

# Basic search
nmem --json m search "3-7 core concepts"

# With filters
nmem --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 filter
nmem --json m search "meeting notes" -t week

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

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

Examples:

# Search with importance filter
nmem --json m search "database optimization" --importance 0.7

# Search with multiple labels
nmem --json m search "React patterns" -l frontend -l react

# Search recent memories
nmem --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 available:

Option 1 (Recommended): Use uvx

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Run nmem (no installation needed)
uvx --from nmem-cli nmem --version

Option 2: Install with pip

pip install nmem-cli
nmem --version