{
  "markdown": "# Claude Chat Search\n\nFull-text search across all your Claude Code conversations.\n\nClaude 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.\n\n## What it does\n\n- Searches through all `.jsonl` conversation files across all projects\n- Searches user messages, assistant messages, **and tool results** (MCP outputs, web searches, etc.)\n- Supports plain text search and **regex patterns**\n- Configurable context window for match snippets\n- Shows matching conversations ranked by number of matches\n- Provides UUIDs for easy `claude --resume` access\n- Zero dependencies — just Node.js built-ins\n\n## Install\n\n### As a Claude Code plugin (recommended)\n\n```bash\nclaude plugin install --source https://github.com/danutmitrut/claude-chat-search.git\n```\n\nThen restart Claude Code. The `/chat-search` command will be available.\n\n### Manual install via Claude Code\n\nOpen Claude Code in VS Code and paste this as a single message:\n\n```\nInstall the chat-search tool. Follow these steps exactly:\n\n1. Clone the repo:\ngit clone https://github.com/danutmitrut/claude-chat-search.git /tmp/claude-chat-search\n\n2. Copy the search script:\nmkdir -p ~/.claude/tools\ncp /tmp/claude-chat-search/scripts/chat-search.js ~/.claude/tools/chat-search.js\n\n3. Create the command file ~/.claude/commands/chat-search.md with this content:\n\n---\ndescription: Full-text search across all Claude Code conversations\n---\n\nSearch through the full content of all Claude Code conversations (not just titles/names).\n\nRun:\nnode ~/.claude/tools/chat-search.js $ARGUMENTS\n\nIf no arguments provided, ask the user what they want to search for.\n\nPresent results clearly:\n- Conversation title, match count, date, message count\n- Top 3 relevant snippets per conversation\n- UUID for resume (offer claude --resume <uuid> if the user wants to resume one)\n\n4. Clean up: rm -rf /tmp/claude-chat-search\n\n5. Test it: run /chat-search supabase (or any keyword relevant to you)\n```\n\n## Usage\n\nAfter install, restart Claude Code (or `/clear`), then use:\n\n```\n/chat-search supabase\n/chat-search landing page\n/chat-search auth middleware\n```\n\n### Regex search\n\nUse `--regex` (or `-r`) to search with regex patterns:\n\n```\n/chat-search supabase.*auth --regex\n/chat-search error.*404 -r\n```\n\n### Custom context window\n\nUse `--context N` (or `-c N`) to control how many characters are shown around each match (default: 40):\n\n```\n/chat-search deploy --context 80\n/chat-search migration -c 100\n```\n\n### Combined\n\n```\n/chat-search supabase.*rls --regex --context 80\n```\n\n## Example output\n\n```\n\"supabase.*auth\" (regex) — 12 conversation(s) found\n\n1. [224 matches] Built reservation form with database integration\n   2/25/2026 | 7262 msgs | 5f9f961a...\n   > [assistant] msg #13: ...configured Supabase real (credentials + table)...\n   > [tool] msg #103: ...POST \"https://xyz.supabase.co/rest/v1/rpc\" -H \"apikey:...\n   > [tool] msg #105: ...POST \"https://api.supabase.com/v1/projects/xyz/database...\n\n2. [64 matches] Explored ccforeveryone.com tools\n   2/22/2026 | 2112 msgs | 9f21a9ba...\n   > [assistant] msg #207: ...Context7, Playwright, Supabase, GitHub configured...\n```\n\nNote: `[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.\n\n## How it works\n\nClaude 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.\n\nIt's read-only — never modifies your conversation files.\n\n### Technical note for contributors\n\nTool 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.\n\n## License\n\nMIT\n",
  "bytes": 4320,
  "sha": "ceb9a85837ef496d76acfa1f020713252320872b8e0e34cd7f1221ed1f53af8a",
  "repo_slug": "danutmitrut/claude-chat-search",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_danutmitrut_claude_chat_search_claude_ch_75cac735/readme"
}