claude-chat-search — Claude Code plugin: search your chat history
Full-text search across every Claude conversation, covering messages, tool calls and tool results rather than just session titles.
/plugin marketplace add anthropics/claude-plugins-community
/plugin install claude-chat-search@claude-communityWhat claude-chat-search does
Claude's /resume picker matches on conversation names. This plugin opens the actual content of each message, tool call and tool result, so MCP responses, web searches and command output are searchable too. That is how you track down the session where a particular API or decision came up.
Plain text and regex patterns both work, and you can widen the snippet shown around each hit. Conversations are ranked by match count, and each one comes with a UUID you can hand straight to claude --resume. The script relies on Node.js built-ins alone and never writes to your conversation files.
Conversations live as .jsonl files under ~/.claude/projects/. The script parses every line, so a single query covers all your projects. Installing through the marketplace needs a Claude restart — the /chat-search command will not show up without one.
What it helps with
- find the session where a specific library was discussed
- pull an MCP server response out of an old conversation
- locate every mention of an error with a regex
- grab a conversation UUID for
claude --resume - see which commands ran in earlier projects
Example prompts for the agent
- /chat-search supabase
- /chat-search supabase.*auth --regex
- /chat-search migration --context 80
How to install claude-chat-search
Plugin marketplace
/plugin marketplace add anthropics/claude-plugins-community/plugin install claude-chat-search@claude-communityStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about claude-chat-search
How do I install claude-chat-search in Claude Code?
Add the marketplace with /plugin marketplace add anthropics/claude-plugins-community, then run /plugin install claude-chat-search@claude-community. Restart Claude afterwards so the /chat-search command becomes available.
What does claude-chat-search do?
It searches the full text of all your Claude conversations — user and assistant messages, tool calls, and tool results. Everything runs locally and your files stay untouched.
Can I search with a regex?
Yes, pass --regex or -r, for example /chat-search error.*404 -r. The context window around each match is set with --context N or -c N.
Source text
SKILL.md · MIT
# Claude Chat Search Full-text search across all your Claude Code conversations. Claude Code's built-in `/resume` picker searches by conversation name only. This plugin searches through the **actual content** of every message, tool call, and tool result in every conversation — so you can find that one session where you discussed a specific topic, API, or decision. ## What it does - Searches through all `.jsonl` conversation files across all projects - Searches user messages, assistant messages, **and tool results** (MCP outputs, web searches, etc.) - Supports plain text search and **regex patterns** - Configurable context window for match snippets - Shows matching conversations ranked by number of matches - Provides UUIDs for easy `claude --resume` access - Zero dependencies — just Node.js built-ins ## Install ### As a Claude Code plugin (recommended) ```bash claude plugin install --source https://github.com/danutmitrut/claude-chat-search.git ``` Then restart Claude Code. The `/chat-search` command will be available. ### Manual install via Claude Code Open Claude Code in VS Code and paste this as a single message: ``` Install the chat-search tool. Follow these steps exactly: 1. Clone the repo: git clone https://github.com/danutmitrut/claude-chat-search.git /tmp/claude-chat-search 2. Copy the search script: mkdir -p ~/.claude/tools cp /tmp/claude-chat-search/scripts/chat-search.js ~/.claude/tools/chat-search.js 3. Create the command file ~/.claude/commands/chat-search.md with this content: --- description: Full-text search across all Claude Code conversations --- Search through the full content of all Claude Code conversations (not just titles/names). Run: node ~/.claude/tools/chat-search.js $ARGUMENTS If no arguments provided, ask the user what they want to search for. Present results clearly: - Conversation title, match count, date, message count - Top 3 relevant snippets per conversation - UUID for resume (offer claude --resume <uuid> if the user wants to resume one) 4. Clean up: rm -rf /tmp/claude-chat-search 5. Test it: run /chat-search supabase (or any keyword relevant to you) ``` ## Usage After install, restart Claude Code (or `/clear`), then use: ``` /chat-search supabase /chat-search landing page /chat-search auth middleware ``` ### Regex search Use `--regex` (or `-r`) to search with regex patterns: ``` /chat-search supabase.*auth --regex /chat-search error.*404 -r ``` ### Custom context window Use `--context N` (or `-c N`) to control how many characters are shown around each match (default: 40): ``` /chat-search deploy --context 80 /chat-search migration -c 100 ``` ### Combined ``` /chat-search supabase.*rls --regex --context 80 ``` ## Example output ``` "supabase.*auth" (regex) — 12 conversation(s) found 1. [224 matches] Built reservation form with database integration 2/25/2026 | 7262 msgs | 5f9f961a... > [assistant] msg #13: ...configured Supabase real (credentials + table)... > [tool] msg #103: ...POST "https://xyz.supabase.co/rest/v1/rpc" -H "apikey:... > [tool] msg #105: ...POST "https://api.supabase.com/v1/projects/xyz/database... 2. [64 matches] Explored ccforeveryone.com tools 2/22/2026 | 2112 msgs | 9f21a9ba... > [assistant] msg #207: ...Context7, Playwright, Supabase, GitHub configured... ``` Note: `[tool]` results are included in search — this catches MCP outputs, web searches, command results, and other tool interactions that the built-in search misses entirely. ## How it works Claude Code stores conversations as `.jsonl` files in `~/.claude/projects/`. Each line is a JSON object containing messages. The script reads every file, parses every message (including tool use and tool results), and searches through the text content. It's read-only — never modifies your conversation files. ### Technical note for contributors Tool results in Claude Code's `.jsonl` files are stored as `tool_result` blocks inside **user messages**, not assistant messages. This is non-obvious and not documented — it was discovered by inspecting the actual files. The `content` field of a `tool_result` can be either a plain string (e.g. bash output) or an array of sub-blocks with `type: "text"` (e.g. MCP responses from Gmail, Supabase, etc.). The parser handles both cases. ## License MIT
© danutmitrut · MIT · danutmitrut/claude-chat-search