Search through previous Claude Code sessions in the current project using semantic search
Searches previous Claude Code sessions using semantic search to find relevant discussions and code.
/plugin marketplace add victor-software-house/history-search/plugin install victor-software-house-history-search@victor-software-house/history-search<query>Search through past Claude Code sessions to find relevant discussions, code, and solutions.
When the user invokes /search-history "query":
Determine current project path for scoping:
# Source helper functions
source "${CLAUDE_PLUGIN_ROOT}/scripts/get-project-path.sh"
SEARCH_PATH=$(get_project_sessions_path)
Execute semantic search using the CLI tool:
claude-search "USER_QUERY" 2>/dev/null | head -50
Parse and format results:
Present results in a clear format:
## Search Results for "query"
### Session abc123... (2024-01-05)
**Human**: [snippet...]
**Assistant**: [snippet...]
### Session def456... (2024-01-03)
...
If no results found, suggest:
/list-sessions to browse manually--global flag (if implemented)/search-history "authentication implementation"
/search-history "how to fix typescript errors"
/search-history "database migration approach"
If claude-search is not installed:
The claude-conversation-extractor tool is not installed.
Install it with: pipx install claude-conversation-extractor