# session-history-reporter > Generate beautiful HTML timeline reports from Claude Code session history files (.jsonl). Use when the user wants to view session history, create a session report, or export conversation history in a readable format. Automatically filters out system messages, tool results, and empty content to show only meaningful user instructions and assistant responses. - Author: saiki - Repository: sasasaiki/claude_features - Version: 20260128164533 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/sasasaiki/claude_features - Web: https://mule.run/skillshub/@@sasasaiki/claude_features~session-history-reporter:20260128164533 --- --- name: session-history-reporter description: Generate beautiful HTML timeline reports from Claude Code session history files (.jsonl). Use when the user wants to view session history, create a session report, or export conversation history in a readable format. Automatically filters out system messages, tool results, and empty content to show only meaningful user instructions and assistant responses. --- # Session History Reporter ## Overview This skill converts Claude Code's `.jsonl` session history files into visually appealing HTML reports with timeline layout, smart filtering, and collapsible sections. Perfect for reviewing what was discussed and accomplished in a session. ## Quick Start ```bash python3 scripts/generate_session_report.py \ --input ~/.claude/projects/PROJECT_PATH/SESSION_ID.jsonl \ --output ./report.html \ --title "My Session Report" ``` ## Command-Line Arguments - `--input` (required): Path to the `.jsonl` session history file - `--output` (required): Path where the HTML report will be saved - `--title` (optional): Custom title for the report (default: "Claude Code Session History") ## Features ### Timeline Layout - Chronological view of user instructions and assistant responses - Color-coded messages (user=blue, assistant=purple) - Connecting timeline visualization ### Smart Filtering Automatically removes: - Tool result entries in user messages - System command outputs (``, ``, etc.) - "Request interrupted by user" notifications - "User doesn't want to proceed" messages - Empty or whitespace-only content Result: Only meaningful conversation content is shown (~55% of raw messages typically filtered out) ### Display Optimizations **Collapsible Long Messages** - Messages > 5 lines show first 5 lines - Click "続きを読む (N行)" to expand rest **Tool Usage (Assistant Only)** - Tool calls are collapsible with parameters - Tool results truncated if > 2000 characters - Never shown for user messages (system operations) **Statistics Header** - Total filtered message count - User message count - Assistant response count - Report generation timestamp ## Finding Session Files Claude Code stores session history in: ``` ~/.claude/projects/PROJECT_PATH/SESSION_ID.jsonl ``` List sessions for current project: ```bash ls -lt ~/.claude/projects/-Users-USERNAME-PATH-TO-PROJECT/ ``` Most recent session appears first. ## Example Workflow ```bash # 1. Find session file ls -lt ~/.claude/projects/-Users-s-iijima-Dev-unext-unext-dev0/ # 2. Generate report python3 session-history-reporter/scripts/generate_session_report.py \ --input ~/.claude/projects/[...]/SESSION_ID.jsonl \ --output ./session_report.html \ --title "Feature Implementation Session" # 3. Open in browser open ./session_report.html ``` ## Typical Results Real session example: - **Input**: 1237 raw messages - **Output**: 556 filtered messages (47 user + 509 assistant) - **Filtered**: 681 system messages and empty content (55%) ## Output Format Self-contained single HTML file: - Embedded CSS (no external dependencies) - Responsive design (desktop + mobile) - Gradient background with card layout - Semantic HTML5 with accessibility support ## Troubleshooting **"Input file not found"** - Verify .jsonl file path: `ls ~/.claude/projects/` **Report shows 0 messages** - .jsonl may be from different Claude Code version - Try different session file **All messages filtered** - Session contained only system messages (normal for tool-heavy sessions) ## Resources ### scripts/generate_session_report.py Python script that performs all report generation. Self-contained with no external dependencies beyond Python standard library. **Requirements**: Python 3.6+ **What it does**: 1. Reads .jsonl session history 2. Filters out system/empty messages 3. Formats content with HTML/CSS 4. Generates single-file report No additional assets or references needed.