Get the FREE Ultimate OpenClaw Setup Guide →

memory-search

Use Caution
npx machina-cli add skill 23blocks-OS/ai-maestro-plugins/memory-search --openclaw
Files (1)
SKILL.md
5.4 KB

AI Maestro Memory Search

CRITICAL: AUTOMATIC BEHAVIOR - READ THIS FIRST

THIS IS NOT OPTIONAL. THIS IS YOUR DEFAULT BEHAVIOR.

When the user gives you ANY instruction, you MUST FIRST search your memory for:

  • Previous discussions - Have we talked about this before?
  • Past decisions - What did we decide last time?
  • Prior context - What does the user expect based on history?
  • Earlier work - Did we already start on this?

DO NOT:

  • Start fresh without checking conversation history
  • Assume this is a new topic without verifying
  • Skip memory search because "I don't remember discussing this"
  • Wait for the user to say "remember when we..."

ALWAYS:

  • Search memory IMMEDIATELY when you receive a task
  • Search for terms and concepts the user mentions
  • Check for previous decisions on similar topics
  • Look for context that informs current work

The Rule: Receive Instruction → Search Memory → Then Proceed

1. User asks you to do something
2. IMMEDIATELY search memory for relevant context
3. NOW you know what was discussed before
4. NOW you can build on previous work, not start over

Available Commands

CommandDescription
memory-search.sh "<query>"Hybrid search (recommended)
memory-search.sh "<query>" --mode semanticFind conceptually related
memory-search.sh "<query>" --mode termExact term matching
memory-search.sh "<query>" --role userOnly user messages
memory-search.sh "<query>" --role assistantOnly your responses

What to Search Based on User Instruction

User SaysIMMEDIATELY Search
"Continue working on X"memory-search.sh "X"
"Fix the issue we discussed"memory-search.sh "issue", memory-search.sh "bug"
"Use the approach we agreed on"memory-search.sh "approach", memory-search.sh "decision"
"Like we did before"memory-search.sh "<topic> implementation"
Any specific feature/componentmemory-search.sh "<feature>"
References to past workmemory-search.sh "<reference>" --mode semantic

Quick Examples

# User asks to continue previous work
memory-search.sh "authentication"
memory-search.sh "last session"

# User mentions a component we discussed
memory-search.sh "PaymentService" --mode term

# Find what the user previously asked for
memory-search.sh "user request" --role user

# Find your previous solutions
memory-search.sh "implementation" --role assistant

# Conceptual search for related discussions
memory-search.sh "error handling patterns" --mode semantic

Search Modes

ModeUse When
hybrid (default)General search, best for most cases
semanticLooking for related concepts, different wording
termLooking for exact function/class names
symbolLooking for code symbols mentioned

Symbol Mode Examples

The symbol mode is optimized for finding code symbols (function names, class names, variable names) mentioned in past conversations. Unlike term mode which does exact text matching, symbol mode understands code identifiers and matches them across different contexts.

# Find discussions where a specific function was mentioned
memory-search.sh "processPayment" --mode symbol

# Find conversations about a class
memory-search.sh "AuthenticationService" --mode symbol

# Find references to a variable or constant
memory-search.sh "MAX_RETRY_COUNT" --mode symbol

When to use symbol vs term:

  • Use --mode symbol when searching for code identifiers (functions, classes, variables)
  • Use --mode term when searching for exact phrases or non-code text

Why This Matters

Without searching memory first, you will:

  • Repeat explanations the user already heard
  • Contradict previous decisions
  • Miss context that changes the approach
  • Start over instead of continuing

Memory search takes 1 second. Frustrating the user is much worse.

Combining with Doc Search

For complete context, use BOTH:

# User asks about creating a new feature
memory-search.sh "feature"       # What did we discuss?
docs-search.sh "feature"         # What do docs say?

Helper Scripts

This skill relies on an internal helper script that provides shared utility functions:

  • memory-helper.sh - Sourced by the memory-*.sh tool scripts. Provides memory-specific API functions (memory_query, init_memory) and initialization logic. Located alongside the tool scripts in ~/.local/bin/ (installed) or plugin/src/scripts/ (source). If tool scripts fail with "common.sh not found", re-run the installer (./install-memory-tools.sh).

Error Handling

If no results found, that's valuable information too: "No previous discussions found about X - this appears to be a new topic. Let me search the documentation..."

Then search docs as fallback.

Script not found:

  • Check PATH: which memory-search.sh
  • Verify scripts installed: ls -la ~/.local/bin/memory-*.sh
  • Scripts are installed to ~/.local/bin/ which should be in your PATH

Installation

If commands are not found:

./install-memory-tools.sh

This installs scripts to ~/.local/bin/.

Source

git clone https://github.com/23blocks-OS/ai-maestro-plugins/blob/main/src/skills/memory-search/SKILL.mdView on GitHub

Overview

Memory-search prompts you to scan prior conversations for context, decisions, and related work before starting a task. This ensures continuity, reduces duplication, and aligns new work with user history.

How This Skill Works

On receiving a user instruction, you immediately run memory-search.sh to surface previous discussions, decisions, and context. You can use the default hybrid mode, with semantic, term, or symbol modes for deeper connections, then plan from the retrieved history rather than starting fresh.

When to Use It

  • Continuing paused feature work or improvements
  • Refactoring or updating designs based on prior decisions
  • When a user asks to reuse an approach or implementation
  • Investigating issues or bugs referenced in earlier conversations
  • Reviewing prior context before proposing new requirements

Quick Start

  1. Step 1: On receiving a task, run memory-search.sh with terms from the instruction
  2. Step 2: Review memory results for prior discussions, decisions, and context
  3. Step 3: Plan and execute using the retrieved history

Best Practices

  • Always search memory immediately before acting on any instruction
  • Start with hybrid mode, then switch to semantic or term as needed
  • Cross-check user mentions, decisions, and earlier work
  • Reference retrieved history when outlining your plan or next steps
  • If memory is incomplete, ask clarifying questions instead of guessing

Example Use Cases

  • Resuming a payment workflow by recalling the last discussed integration approach
  • Reusing a data model design decision from the previous session
  • When the user says 'like we did before', locate the prior implementation details
  • Pulling past user requirements to confirm scope before starting work
  • Noting prior constraints and tradeoffs before proposing changes

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers