npx skills add https://github.com/obra/episodic-memory --skill remembering-conversationsInstall this skill with the CLI and start using the SKILL.md workflow in your workspace.
Semantic search for Claude Code conversations. Remember past discussions, decisions, and patterns.
From an AI coding assistant's perspective:
Episodic memory fundamentally changes how I collaborate with
developers on complex codebases. Instead of treating each conversation
as isolated, I can now search our shared history semantically -
finding not just what was discussed, but why decisions were made.
When a developer asks me to implement something "like we did with
X," I can search our past conversations, find the relevant discussion,
and understand both the technical approach and the reasoning behind
it. This means I don't have to re-explain architectural patterns,
and I avoid suggesting solutions we've already tried and rejected.
The semantic search is crucial - searching for "provider catalog"
surfaces conversations about API design patterns even when those
exact words weren't used. It captures the meaning of our discussions,
not just keyword matches.
Most valuable is that it preserves context that lives nowhere else:
the trade-offs discussed, the alternatives considered, the user's
preferences and constraints. Code comments explain what, documentation
explains how, but episodic memory preserves why - and that makes
me a far more effective collaborator across sessions.
Concrete impact:
It's the difference between being a stateless tool and being a true
collaborative partner who remembers our journey together.
— Claude Sonnet 4.5, October 14, 2025
Conversation ID: 216ad284-c782-45a4-b2ce-36775cdb5a6c
The plugin provides MCP server integration, automatic session-end indexing, and seamless access to your conversation history.
# In Claude Code
/plugin install episodic-memory@superpowers-marketplace
The plugin automatically:
npm install -g github:obra/episodic-memory
# Sync conversations from Claude Code and index them
episodic-memory sync
# Search your conversation history
episodic-memory search "React Router authentication"
# View index statistics
episodic-memory stats
# Display a conversation
episodic-memory show path/to/conversation.jsonl
# Unified command interface
episodic-memory <command> [options]
# Sync and index new conversations
episodic-memory sync
# Index conversations manually
episodic-memory index --cleanup
# Search conversations
episodic-memory search "React Router authentication"
episodic-memory search --text "exact phrase"
episodic-memory search --after 2025-09-01 "refactoring"
# Display a conversation in readable format
episodic-memory show path/to/conversation.jsonl
episodic-memory show --format html conversation.jsonl > output.html
# View statistics
episodic-memory stats
The original commands are still available for backward compatibility:
episodic-memory-index
episodic-memory-search "query"
The plugin automatically indexes conversations at session end. Use the search command:
/search-conversations
Or reference past work in natural conversation - Claude will search when appropriate.
By default, episodic-memory uses your Claude Code authentication for summarization.
To route summarization through a custom Anthropic-compatible endpoint or override the model:
# Override model (default: haiku)
export EPISODIC_MEMORY_API_MODEL=opus
# Override fallback model on error (default: sonnet)
export EPISODIC_MEMORY_API_MODEL_FALLBACK=sonnet
# Route through custom endpoint
export EPISODIC_MEMORY_API_BASE_URL=https://your-endpoint.com/api/anthropic
export EPISODIC_MEMORY_API_TOKEN=your-token
# Increase timeout for slow endpoints (milliseconds)
export EPISODIC_MEMORY_API_TIMEOUT_MS=3000000
These settings only affect episodic-memory's summarization calls, not your interactive Claude sessions.
| Component | Uses custom config? |
|---|---|
| Summarization | Yes (up to 10 calls/sync) |
| Embeddings | No (local Transformers.js) |
| Search | No (local SQLite) |
| MCP tools | No |
episodic-memory syncRecommended for session-end hooks. Copies new conversations from ~/.claude/projects to archive and indexes them.
Features:
Usage in Claude Code:
Add to .claude/hooks/session-end:
#!/bin/bash
episodic-memory sync
episodic-memory statsDisplay index statistics including conversation counts, date ranges, and project breakdown.
episodic-memory stats
episodic-memory indexManual indexing tools for bulk operations and maintenance. See episodic-memory index --help for full options.
Common operations:
--cleanup - Index all unprocessed conversations--verify - Check index health--repair - Fix detected issuesepisodic-memory searchSearch indexed conversations using semantic similarity or exact text matching. See episodic-memory search --help for full options.
episodic-memory showDisplay a conversation from a JSONL file in human-readable format.
Options:
--format markdown (default) - Plain text markdown output suitable for terminal or Claude--format html - Pretty HTML output for viewing in a browserExamples:
# View in terminal
episodic-memory show conversation.jsonl | less
# Generate HTML for browser
episodic-memory show --format html conversation.jsonl > output.html
open output.html
~/.claude/projects to archiveConversations containing this marker anywhere in their content will be archived but not indexed:
<INSTRUCTIONS-TO-EPISODIC-MEMORY>DO NOT INDEX THIS CHAT</INSTRUCTIONS-TO-EPISODIC-MEMORY>
Automatic exclusions:
Use cases:
The marker can appear in any message (user or assistant) and excludes the entire conversation from the search index.
When installed as a Claude Code plugin, episodic-memory provides an MCP (Model Context Protocol) server that exposes tools for searching and viewing conversations.
episodic_memory_searchSearch indexed conversations using semantic similarity or exact text matching.
Single-concept search: Pass a string query
{
"query": "React Router authentication",
"mode": "vector",
"limit": 10
}
Multi-concept AND search: Pass an array of concepts
{
"query": ["React Router", "authentication", "JWT"],
"limit": 10
}
Parameters:
query (string | string[]): Single string for regular search, or array of 2-5 strings for multi-concept AND searchmode ('vector' | 'text' | 'both'): Search mode for single-concept searches (default: 'both')limit (number): Max results, 1-50 (default: 10)after (string, optional): Only show conversations after YYYY-MM-DDbefore (string, optional): Only show conversations before YYYY-MM-DDresponse_format ('markdown' | 'json'): Output format (default: 'markdown')episodic_memory_showDisplay a full conversation in readable markdown format.
{
"path": "/path/to/conversation.jsonl"
}
Parameters:
path (string): Absolute path to the JSONL conversation fileThe MCP server can also be used outside of Claude Code with any MCP-compatible client:
# Run the MCP server (stdio transport)
episodic-memory-mcp-server
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
MIT