| name | chat-history-summarizer |
| description | Extract and summarize Claude Code chat history into structured documentation. Use when the user asks to export, summarize, or document a conversation session, extract prompts and actions from chat logs, or create a record of what was accomplished in a session. |
Chat History Summarizer
Overview
This skill extracts user prompts and Claude's actions from Claude Code conversation logs, generating a concise, structured summary document. It's useful for:
- Documenting what was accomplished in a session
- Creating a record for future reference or handoff
- Reviewing methodology and approach taken
- Learning from past interactions
Prerequisites
Install the claude-conversation-extractor tool:
pip install claude-conversation-extractor
Workflow
Step 1: List Available Sessions
claude-extract --list
This shows all available sessions with:
- Session ID
- Project folder
- Modification date
- Message count
- Size
- Preview of first message
Step 2: Search for Specific Session (Optional)
claude-extract --search "keyword"
Search by keyword to find relevant sessions.
Step 3: Export the Session
claude-extract --extract <session_number>
claude-extract --extract <session_number> --detailed
claude-extract --format html --extract <session_number>
Default output location: ~/Desktop/Claude logs/
Step 4: Generate Summary
Read the exported file and create a structured summary with:
-
Session Metadata
- Session ID
- Date
- Total message count
-
User Inputs & Claude Actions (organized by interaction rounds)
- Each user prompt (quoted)
- Concise summary of Claude's actions (tools used, files created/modified)
-
Generated Files List (if applicable)
- File paths and descriptions
-
Tool Usage Statistics (optional)
-
Key Outcomes (optional)
- Main deliverables or conclusions
Output Template
# [Session Title/Topic]
**Session ID:** [id]
**Date:** [date]
**Total Messages:** [count]
---
## User Inputs & Claude Actions Summary
### Round 1: [Brief Title]
**User Input:**
> [Exact user prompt, quoted]
**Claude Actions:**
1. [Action 1 - tool used, brief description]
2. [Action 2 - tool used, brief description]
3. [Files created/modified if any]
---
### Round 2: [Brief Title]
...
---
## Generated Files
| File | Path | Description |
|------|------|-------------|
| [name] | [path] | [brief description] |
---
## Tool Usage Statistics
| Tool | Count | Purpose |
|------|-------|---------|
| [tool] | [n] | [main use] |
---
*Summary extracted from conversation log on [current date]*
Key Principles
- Quote user inputs exactly - Preserve the user's original wording
- Be concise on Claude actions - Focus on what was done, not how
- Group by interaction rounds - Each user input starts a new round
- Highlight key deliverables - Files created, reports generated, etc.
- Skip warmup/system messages - Only include substantive exchanges
Extracting from Raw Logs
When reading exported markdown files:
- Look for
## 👤 User markers to identify user inputs
- Look for
## 🤖 Claude markers for Claude responses
- Look for
🔧 Using tool: to identify tool usage
- Ignore:
- System reminders (
<system-reminder>)
- Warmup messages
- Agent internal messages
- Tool input/output details (unless specifically relevant)
Example Search Patterns
grep -n "## 👤 User" exported-log.md
grep -n "🔧 Using tool:" exported-log.md
grep -n "Using tool: Write" exported-log.md
Tips
- For very long sessions, focus on key milestones rather than every exchange
- Group related exchanges into logical "rounds" even if interrupted
- Note when context was compacted or session was continued
- Include any user choices/preferences that shaped the outcome