Export Session to HTML
Export Claude Code sessions to a styled, searchable HTML file.
Usage
/export-html # Export current session
/export-html <session_id> # Export specific session
/export-html --list # List available sessions
/export-html <session_id> -o file.html # Export to specific file
Arguments
session_id- Full or partial session ID (optional, defaults to current session)--listor-l- List available sessions--outputor-o- Output file path--include-thinking- Include Claude's thinking blocks in output--open- Open in browser after export
Examples
# List recent sessions
/export-html --list
# Export current session
/export-html
# Export specific session to a file
/export-html abc123 -o ~/exports/my-session.html
# Export with thinking blocks visible
/export-html abc123 --include-thinking --open
Instructions
When the user invokes this skill, run the following command:
python3 ~/.claude/skills/export-html/export_session.py $ARGUMENTS
If the user just runs /export-html without arguments, use the current session ID:
python3 ~/.claude/skills/export-html/export_session.py ${CLAUDE_SESSION_ID}
The script will:
- Find the session file in
~/.claude/projects/ - Parse the JSONL format
- Generate a styled HTML with:
- Dark theme conversation view
- Search functionality
- Collapsible tool calls and results
- Message timestamps
- Session metadata
Output
The HTML file includes:
- All user messages and Claude responses
- Tool calls (collapsed by default)
- Tool results (collapsed by default)
- Thinking blocks (optional, collapsed)
- Search to filter messages
- Responsive dark theme design