Save and export the current Claude Code session as a shareable HTML transcript...
Save the current Claude Code session as clean, browsable HTML pages with optional GitHub Gist publishing.
To save the current session transcript:
# Save to a local directory (opens in browser by default)
python /path/to/skill/scripts/save_transcript.py
# Save to a specific output directory
python /path/to/skill/scripts/save_transcript.py --output ./my-transcript
# Publish to GitHub Gist (requires gh CLI authenticated)
python /path/to/skill/scripts/save_transcript.py --gist
# Both: save locally AND publish to gist
python /path/to/skill/scripts/save_transcript.py --output ./my-transcript --gist
This skill wraps Simon Willison's claude-code-transcripts tool, which:
~/.claude/projects/ (JSONL format)The tool generates:
index.html - Summary page with timeline of prompts and commitspage-001.html, page-002.html, etc. - Paginated transcript pages with full conversation detailsSession Timing: The transcript captures the session state at the moment of export. Any conversation that happens after running the script won't be included in that transcript.
Current Session Detection: The script automatically detects the most recent session in the current project directory. If run from within Claude Code, it will typically find the active session.
GitHub Gist Publishing: The --gist option requires the GitHub CLI (gh) to be installed and authenticated. Run gh auth login first if needed.
The script uses uvx to run claude-code-transcripts without permanent installation. Requirements:
curl -LsSf https://astral.sh/uv/install.sh | shbrew install gh or see https://cli.github.com/If uv is not available, the script falls back to pip install claude-code-transcripts.
python scripts/save_transcript.py --output .
python scripts/save_transcript.py --output ./transcripts --auto-name
python scripts/save_transcript.py --gist
# Outputs something like:
# Preview: https://gistpreview.github.io/?abc123def456/index.html
python scripts/save_transcript.py --output ./archive --include-json
save_transcript.py [OPTIONS]
Options:
--output, -o DIR Output directory for HTML files
--gist Upload to GitHub Gist and output preview URL
--auto-name, -a Auto-name output subdirectory based on session ID
--include-json Include original session JSON/JSONL in output
--open Open generated HTML in browser (default if no --output)
--session-id ID Specific session ID to export (default: most recent)
--help Show help message
~/.claude/projects/ exists and contains session filesbrew install gh or see https://cli.github.com/gh auth logincurl -LsSf https://astral.sh/uv/install.sh | sh