# Smart Memory Search

Searches past sessions in three steps: search, timeline, then selected observations.

- Repository: https://github.com/thedotmack/claude-mem (109099 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedotmack/claude-mem --skill mem-search -g -a claude-code -y`
Codex: `npx skills add thedotmack/claude-mem --skill mem-search -g -a codex -y`
Cursor: `npx skills add thedotmack/claude-mem --skill mem-search -g -a cursor -y`
Gemini CLI: `npx skills add thedotmack/claude-mem --skill mem-search -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add thedotmack/claude-mem`

## Description

Smart search (default). Search claude-mem's persistent cross-session memory database in three steps: search, timeline, then selected get_observations. Use when user asks "did we already solve this?", "how did we do X last time?", or needs work from previous sessions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Smart Search (Default)

Search past work across all sessions. Use the original three-step mem-search workflow by default: search → timeline → selected get_observations. Reason about the index and context before choosing details. Do not use auto or guided modes.

## Runtime and Tool Names

The examples below use the local worker tools. Native Pi and DSH integrations
name the same three steps `mem_search`, `mem_timeline`, and
`mem_get_observations`. Native OpenCode uses `claude_mem_search`,
`claude_mem_timeline`, and `claude_mem_get_observations`. CMEM Pro uses `memory_search`, `timeline`, and
`get_observations`; use the parameter names advertised by that connection.

A self-hosted server runtime uses the same three steps: `search`, `timeline`,
and `get_observations`, scoped to the configured server project. Server
observation IDs are strings. Set `projectId` only when selecting another
authorized server project. Dumb search is unavailable in server runtime. A direct self-hosted `/v1/mcp`
connection instead requires `projectId` on each call and `anchorId` for its
timeline. CMEM Pro also uses `anchorId` for timeline context, and uses
`get_summaries` when the selected index rows are session summaries. Follow the
active connection’s advertised schema.

## When to Use

Use when users ask about PREVIOUS sessions (not current conversation):

- "Did we already fix this?"
- "How did we solve X last time?"
- "What happened last week?"

## Layered Workflow (ALWAYS Follow)

**NEVER fetch full details without filtering first. 10x token savings.**

### Step 1: Search - Get Index with IDs

Use the `search` MCP tool:

```
search(query="authentication", limit=20, project="my-project")
```

**Returns:** Table with IDs, timestamps, types, titles (~50-100 tokens/result)

```
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #11131 | 3:48 PM | 🟣 | Added JWT authentication | ~75 |
| #10942 | 2:15 PM | 🔴 | Fixed auth token expiration | ~50 |
```

**Parameters:**

The rest: https://github.com/thedotmack/claude-mem/blob/HEAD/plugin/skills/mem-search/SKILL.md
