search-history

Search Claude conversation history in JSONL files with a Python CLI.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Roger-Parkinson-EHP/dev-experience --skill search-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: search-history
Source: https://github.com/Roger-Parkinson-EHP/dev-experience/tree/main/claude-code/skills/search-history
Command: npx skills add https://github.com/Roger-Parkinson-EHP/dev-experience --skill search-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you quickly locate relevant parts of Claude conversation history by scanning JSONL session files, saving time and preserving context across sessions.

Core Features & Use Cases

  • Session search: Find relevant messages across conversations and sessions.
  • Context extraction: Retrieve surrounding messages for better context.
  • Use Case: If you need to revisit a decision about a code change, search the history to pull related messages and decisions to inform the next steps.

Quick Start

cd ~/.claude/services python conversation-search.py "search term"

Frequently Asked Questions about search-history

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search through my Claude conversation history across sessions?

Search Claude conversation history by running the Python CLI tool with a search term against your JSONL session files. The tool scans all conversations, filters by session if needed, and returns matching messages with surrounding context to help you locate past discussions, decisions, and code solutions quickly.

Can I search conversation history by specific session or retrieve context around results?

Yes. The search tool supports session filtering via --session flag, context extraction with --context to show surrounding messages, and options like --list-sessions to view available conversations. You can also limit results with --max and get full message content using --full for complete context.

What format do Claude conversation files need to be in for searching?

Conversation history must be stored as JSONL files in your ~/.claude/services directory. JSONL (JSON Lines) format stores one complete message record per line, enabling efficient line-by-line parsing and retrieval of specific conversations and decisions across multiple sessions.

How do I locate a past code solution or decision from previous Claude conversations?

Use the search history tool to query your JSONL conversation files with a relevant term or topic. The tool retrieves matching messages with optional context windows and session filtering, letting you quickly recall prior code solutions, architectural decisions, or discussion outcomes for debugging or knowledge reuse.

Can I audit conversation decisions or retrieve full message content beyond previews?

Yes. Use the --verbose flag for extended context or --full to retrieve complete message content from JSONL files. These options support auditing decisions, reviewing code discussions in detail, and preserving full context for compliance or knowledge documentation purposes.

What's the best way to organize conversation files for efficient searching?

Store JSONL session files in ~/.claude/services with descriptive names reflecting their content or date. The tool can list and filter sessions, so organizing files by project, topic, or timeframe enables faster targeted searches and helps you retrieve relevant context across many stored conversations.