memex-search
Search, filter, and retrieve Claude/Codex history indexed by the memex CLI. Use when the user wants to index history, run lexical/semantic/hybrid search, fetch full transcripts, or produce LLM-friendly JSON output for RAG.
Security Assessment
Detected risks:
About memex-search
The memex-search skill provides a robust solution for indexing, searching, and retrieving historical logs from Claude and Codex interactions using the memex CLI. It addresses the common challenge of efficiently managing and querying large volumes of conversation and tool usage history, allowing users to quickly locate relevant information across multiple sessions. By supporting both lexical and semantic search modes, as well as hybrid approaches, this skill enables precise retrieval of data while maintaining structured outputs suitable for further automated processing or integration with language models for retrieval-augmented generation (RAG) workflows.
Key features of memex-search include incremental and full indexing of local history, embedding support for semantic queries, and continuous background indexing for keeping data up to date. Users can run targeted searches with JSON or JSONL output formats, filter results by project, role, tool, session, source, date range, and score, and group or deduplicate hits to focus on the most relevant records. Additional capabilities include selecting different embedding models, adjusting index root paths, and customizing the output fields. The skill also supports macOS background indexing via launchd and provides practical strategies for efficient query narrowing, ensuring users can handle large datasets without performance degradation.
This skill is particularly useful for developers, researchers, and data analysts who need to track, audit, or analyze interactions with AI systems over time. Use cases include exploring assistant responses, debugging tool outputs, analyzing project-specific sessions, or preparing structured datasets for downstream tasks such as training or fine-tuning language models. Target users are those who require fast, structured, and reproducible access to historical AI interactions, including software engineers, AI researchers, and technical documentation specialists.
FAQ
How do I perform a semantic search using memex-search?
You can perform a semantic search by adding the `--semantic` flag to your search command, for example: `memex search "concept" --semantic`. This will use embeddings to find conceptually related results beyond exact keyword matches.
Can I index both Claude and Codex logs simultaneously?
Yes, you can include both sources by using the `--codex` flag for Codex logs and specifying the source path for Claude logs. You can also choose to skip one source using `--no-codex`.
What are the output formats available for search results?
By default, memex-search outputs results as JSON lines (JSONL). You can also produce a single JSON array using `--json-array` and reduce the fields returned with `--fields` to customize the output for your use case.
Is continuous background indexing supported?
Yes, on macOS you can enable continuous background indexing with `memex index-service enable --continuous`. This keeps your index up to date without manual intervention.
Can I limit search results to a specific project or session?
Absolutely. Use the `--project <name>` or `--session <session_id>` flags to narrow your search to specific projects or sessions. Additional filters like `--role`, `--tool`, `--since`, and `--until` are also available.
Install memex-search
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
nicosuave/memex