chat-history

Extract user inputs from Claude Code session files into dated markdown logs.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/joySUSY/violet-plugin-place --skill chat-history-joysusy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: chat-history
Source: https://github.com/joySUSY/violet-plugin-place/tree/main/plugins/developer-tool/ai-agent-memory/v3-expansion/chat-history
Command: npx skills add https://github.com/joySUSY/violet-plugin-place --skill chat-history-joysusy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq.

What problem does it solve? Claude Code stores session history in hard-to-read .jsonl files under ~/.claude/projects/, making it difficult to review or document the instructions you gave across past sessions. This Skill extracts your actual inputs and organizes them into clean, dated markdown files in a project .chats directory. ## Core Features & Use Cases - Session Extraction: Parses .jsonl session files and filters for genuine external user messages, excluding system commands, tool results, and session continuations. - Date-Based Organization: Groups extracted instructions into .chats/{YYYYMMDD}.md files with descriptive section headers. - Git Integration: Optionally commits the generated chat logs with a conventional commit message. - Use Case: After a week of iterating on a feature with Claude, run this Skill to produce a chronological log of every instruction you gave, creating a lightweight changelog of your AI-assisted work. ## Quick Start Extract my Claude Code session history for this project and organize it into dated markdown files in the .chats directory.

Frequently Asked Questions about chat-history

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

FAQPage Schema
How do I export my Claude Code session history?▼

Claude Code stores sessions as .jsonl files in ~/.claude/projects/{encoded-path}/. This Skill parses those files with jq, filters for external user messages, and writes the results into dated markdown files under .chats/.

How to extract only user messages from Claude Code jsonl files?▼

Use jq to select entries where type is "user", userType is "external", and isMeta is false, then read message.content as a string. Filter out lines starting with command tags, caveats, and session continuation markers.

Where does Claude Code store session history files?▼

Sessions live in ~/.claude/projects/{encoded-path}/, where the encoded path is your working directory with slashes replaced by dashes. Main sessions have UUID filenames; agent-*.jsonl files are sub-agent sessions.

Why is my session directory not found when extracting chat history?▼

The encoded path must exactly match your current working directory with slashes converted to dashes. If you run the extraction from a different directory, or no sessions exist for that project yet, the lookup fails.

What are the limitations of extracting Claude session logs?▼

Only string-type user messages are captured; tool results and array content are skipped. The helper script also infers the year from the current date and limits output to the first 10 inputs per session.