Find and resume Claude Code conversations using smart hybrid extraction and JIT indexing
Project description
Conversation Search
Find and resume past Claude Code conversations using smart hybrid extraction and JIT indexing. Get session IDs and project paths to easily jump back into previous work.
Features
- Session Resumption: Get exact commands to resume past conversations
- Unified CLI: Single
conversation-searchcommand with intuitive subcommands - Smart Extraction: Hybrid indexing (full user content + smart assistant extraction)
- JIT Indexing: Instant indexing before search (no AI calls, no delays)
- Progressive Exploration: Simple search → broader search → manual exploration
- Conversation Context: Expand context incrementally around any message
- Claude Code Skill: Integrated Skill that outputs session resumption commands
- Multi-Project Support: Works across all your Claude Code projects
Quick Start
Installation via Claude Code Plugin (Recommended)
Install the complete plugin (skill + CLI tool instructions) directly in Claude Code:
# Add plugin to marketplace
/plugin marketplace add akatz-ai/cc-conversation-search
# Install the plugin
/plugin install conversation-search
Then follow the installation instructions shown by Claude to:
- Install the CLI tool:
uv tool install cc-conversation-search - Initialize the database:
conversation-search init
Manual Installation
1. Install CLI Tool
# Using uv (recommended)
uv tool install cc-conversation-search
# Or using pip
pip install cc-conversation-search
2. Initialize Database
conversation-search init
This creates the database and indexes your last 7 days of conversations.
3. Install Skill (Optional)
mkdir -p ~/.claude/skills/conversation-search
cp skills/conversation-search/* ~/.claude/skills/conversation-search/
Basic Usage
# Search for conversations (shows session ID and resume commands)
conversation-search search "authentication bug"
# Search with time filter
conversation-search search "react hooks" --days 30
# Get resume commands for a specific message
conversation-search resume <MESSAGE_UUID>
Using with Claude Code Skill
Once installed, ask Claude:
- "Find that conversation where we discussed authentication"
- "Locate the conversation about React hooks"
- "What did we talk about regarding the database?"
Auto-Installation: If the CLI tool isn't installed, the skill will automatically attempt to install it via uv or pip, then initialize the database. In most cases, everything "just works" after installing the plugin!
Claude will show you the session ID, project path, and exact commands to resume the conversation.
Command Reference
conversation-search init
Initialize database and perform initial indexing
conversation-search init [--days 7] [--no-extract] [--force]
conversation-search index
JIT index conversations (instant, no AI calls)
conversation-search index [--days N] [--all] [--no-extract]
IMPORTANT: The skill always runs index before search for fresh data.
conversation-search search
Search conversations
conversation-search search "query" [--days N] [--project PATH] [--content] [--json]
conversation-search context
Get context around a specific message
conversation-search context MESSAGE_UUID [--depth 5] [--content] [--json]
conversation-search list
List recent conversations
conversation-search list [--days 7] [--limit 20] [--json]
conversation-search tree
View conversation tree structure
conversation-search tree SESSION_ID [--json]
Architecture
~/.claude/
├── projects/ # Claude Code conversation files (JSONL)
│ └── {project}/
│ └── {session}.jsonl
└── skills/
└── conversation-search/ # Optional Skill
~/.conversation-search/
└── index.db # SQLite database with indexed conversations
Key Purpose: Find session IDs and project paths to resume past conversations.
Database Schema
- messages: Individual messages with summaries, tree structure (parent_uuid), timestamps
- conversations: Session metadata with conversation summaries
- message_summaries_fts: FTS5 full-text search index
- index_queue: Processing queue for batch operations
How It Works
- Indexer: Scans
~/.claude/projects/for JSONL conversation files, parses tree structure - Smart Extraction: Hybrid approach - full user content + first 500/last 200 chars for assistant
- Search: FTS5 full-text search over extracted content with conversation tree traversal
- JIT Indexing: Skill runs
indexbeforesearchfor fresh data (instant, no AI calls)
Claude Code Skill
The included Skill allows Claude to search your conversation history automatically.
Example usage:
User: "Find that conversation where we started implementing the API"
Claude: [Activates conversation-search Skill]
[Runs Level 0: conversation-search index --days 7] (instant JIT index)
[Runs Level 1: conversation-search search "implementing API" --days 14 --json]
[Finds match]
[Displays session ID, project path, and resume commands]
Output:
Session: abc-123-session-id
Project: /home/user/projects/myproject
Time: 2025-11-13 22:50
To resume:
cd /home/user/projects/myproject
claude --resume abc-123-session-id
See skills/conversation-search/SKILL.md for progressive search workflow and complete documentation.
Advanced Usage
JSON Output for Scripting
All commands support --json flag:
# Export search results
conversation-search search "authentication" --json > auth_convs.json
# Programmatic processing
conversation-search list --days 30 --json | jq '.[] | .conversation_summary'
Programmatic Use
from conversation_search.core.search import ConversationSearch
from conversation_search.core.indexer import ConversationIndexer
# Search for messages
search = ConversationSearch()
results = search.search_conversations("authentication", days_back=7)
for r in results:
print(f"{r['message_uuid']}: {r['summary']}") # UUID for branching
# Index conversations
indexer = ConversationIndexer()
indexer.index_all(days_back=7)
indexer.close()
Configuration
Database location: ~/.conversation-search/index.db
No configuration file needed - all settings via command-line flags.
Performance
- Smart Extraction: Instant (no AI calls), deterministic
- Indexing Speed: ~1000+ messages/second (no API latency)
- Storage: ~1-2KB per message (extracted text + metadata)
- Search Speed: SQLite FTS5 is very fast, even with 100K+ messages
- Cost: $0 (no AI API calls during indexing)
Development
Setup
git clone https://github.com/akatz-ai/cc-conversation-search
cd cc-conversation-search
uv tool install -e .
Run Tests
pytest tests/
Project Structure
conversation-search/
├── src/
│ └── conversation_search/
│ ├── __init__.py
│ ├── cli.py # Unified CLI
│ ├── core/
│ │ ├── indexer.py # Conversation indexing
│ │ ├── search.py # Search functionality
│ │ └── summarization.py # Smart hybrid extraction
│ └── data/
│ └── schema.sql # Database schema
├── skills/
│ └── conversation-search/
│ ├── SKILL.md # Claude Code Skill with progressive workflow
│ └── REFERENCE.md # Complete command reference
├── pyproject.toml
└── README.md
Troubleshooting
"Database not found" error:
conversation-search init
"No conversations found":
- Verify
~/.claude/projects/exists and contains JSONL files - Use Claude Code to create some conversations first
Want to skip extraction and use raw content only:
# Store only raw content (even faster, but less optimized for search)
conversation-search init --no-extract
Skill not activating:
- Check Skill location:
ls ~/.claude/skills/conversation-search/SKILL.md - Verify YAML frontmatter format
- Restart Claude Code
- Try explicit trigger: "Search my conversations for X"
Import errors:
uv tool uninstall cc-conversation-search
uv tool install cc-conversation-search
Contributing
PRs welcome! This is an experimental tool to improve Claude Code workflow.
Areas for Contribution
- Vector embeddings for semantic similarity search
- Web UI for conversation tree visualization
- Export conversation branches as markdown
- Conversation analytics (topics, frequency, etc.)
- Additional Claude Code Skills using the search API
License
MIT
Acknowledgments
Built for the Claude Code ecosystem. Uses smart hybrid extraction for instant, cost-free indexing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cc_conversation_search-0.4.3.tar.gz.
File metadata
- Download URL: cc_conversation_search-0.4.3.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d03811b78e3042e04d733dda8d605823a6aac4af1781192d83aa6fd5f76959c
|
|
| MD5 |
7517a09d4934b618314d89efc8621830
|
|
| BLAKE2b-256 |
b96acb4ce4fb81e22f5803e5fb6052d50bcacdc7ea0f1afd83dcce6d9cd25973
|
Provenance
The following attestation bundles were made for cc_conversation_search-0.4.3.tar.gz:
Publisher:
publish.yml on akatz-ai/cc-conversation-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_conversation_search-0.4.3.tar.gz -
Subject digest:
7d03811b78e3042e04d733dda8d605823a6aac4af1781192d83aa6fd5f76959c - Sigstore transparency entry: 700872360
- Sigstore integration time:
-
Permalink:
akatz-ai/cc-conversation-search@ecc04a06287c0cd226fc52df148f023b90cff9e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/akatz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ecc04a06287c0cd226fc52df148f023b90cff9e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cc_conversation_search-0.4.3-py3-none-any.whl.
File metadata
- Download URL: cc_conversation_search-0.4.3-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9d8b93a9467a641e7bca1bce537cfc14c681b6db2fc0dad51dc50515deae53a
|
|
| MD5 |
591c653ad5192581038456ec916b2bfa
|
|
| BLAKE2b-256 |
e656262ffa5906194acea3b904d8f928880101855788b75796a4474aba0b33cb
|
Provenance
The following attestation bundles were made for cc_conversation_search-0.4.3-py3-none-any.whl:
Publisher:
publish.yml on akatz-ai/cc-conversation-search
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_conversation_search-0.4.3-py3-none-any.whl -
Subject digest:
a9d8b93a9467a641e7bca1bce537cfc14c681b6db2fc0dad51dc50515deae53a - Sigstore transparency entry: 700872362
- Sigstore integration time:
-
Permalink:
akatz-ai/cc-conversation-search@ecc04a06287c0cd226fc52df148f023b90cff9e0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/akatz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ecc04a06287c0cd226fc52df148f023b90cff9e0 -
Trigger Event:
push
-
Statement type: