read-claude-code-history

Reads, searches, and exports local Claude Code session history files.

1.4k|216|Updated Oct 22, 2025
One-click install
npx skills add https://github.com/daymade/claude-code-skills --skill read-claude-code-history
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: read-claude-code-history
Source: https://github.com/daymade/claude-code-skills/tree/main/daymade-claude-code/read-claude-code-history
Command: npx skills add https://github.com/daymade/claude-code-skills --skill read-claude-code-history

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlite-vec, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Claude Code stores every conversation as local JSONL session files, but finding what you or Claude said, recovering a deleted file, or reconstructing an old session's context requires manually parsing gigabytes of transcripts. This Skill reads that history as evidence without resuming or modifying any session.

Core Features & Use Cases

  • Session Inventory & Exact Replay: List recent sessions with IDs, titles, and internal timestamps, or reconstruct one session as a chronological evidence briefing including queued mid-turn human prompts.
  • Full-Event Keyword Search & Hybrid Recall: Search messages, thinking, tool inputs/results, attachments, and file snapshots across all projects and registered archives, with an optional BM25/vector index for wording-drift recall.
  • Verbatim User-Input Export & Deleted-File Recovery: Export what you actually typed (filtering command envelopes, boilerplate, and pastes) to Markdown/HTML, and recover deleted or overwritten files preserved in file-history records.
  • Use Case: You remember Claude generated an HTML file yesterday but it is gone. The Skill searches all Claude history sources, identifies the exact session, verifies the file-history bytes by SHA-256, and writes the recovered version to a separate directory without touching your project.

Quick Start

Ask the assistant to list your recent Claude Code sessions with their IDs and timestamps, or to search all past sessions for a specific keyword.

Frequently Asked Questions about read-claude-code-history

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

FAQPage Schema
How do I search Claude Code session history for a keyword?

Run the analyze_sessions.py search command with your keywords, optionally adding --all-projects and date filters. It scans user and assistant messages, thinking blocks, tool inputs and results, attachments, and file snapshots across every active Claude home and registered archive.

How can I recover a deleted file from Claude Code history?

Claude Code keeps file-history snapshots inside session JSONL files. The recover_content.py script extracts Write tool operations from an exact session file, verifies content by SHA-256, and writes recovered files to a separate output directory rather than overwriting your project.

Where does Claude Code store conversation history files?

Claude Code stores sessions as JSONL files under ~/.claude/projects/<normalized-path>/<session-id>.jsonl, with a sessions-index.json per project. Additional archives can be registered in ~/.claude/history-sources.json, and the Skill discovers all of them automatically.

Can I export what I actually typed in past Claude Code sessions?

Yes, extract_user_messages.py exports verbatim user messages to Markdown and HTML, grouped by project, session, or day. It filters out slash commands, injected boilerplate, image placeholders, and pasted documents, and recovers prompts queued while the assistant was busy.

What is the difference between keyword search and the recall index?

Keyword search is an exhaustive literal scan that can support a scoped absence claim. The recall index is a ranked BM25/vector aid built with libsimple and sqlite-vec for cases where wording changed, but its top-K results can never prove something does not exist.

Does reading Claude Code history modify or resume my sessions?

No, all read modes are strictly read-only and never run claude --resume or claude --continue. Only the deleted-file recovery command writes files, and it writes to a separate destination after producing a recovery report.