This guide shows how to generate an HTML transcript of your Claude Code session and attach it to a Pull Request so reviewers can see the full conversation that produced the code.
uv tool install claude-code-transcriptsOr run without installing:
uvx claude-code-transcripts --helpclaude-code-transcriptsThis lists your recent Claude Code sessions, lets you pick one, and opens the rendered HTML in your browser.
claude-code-transcripts json ~/.claude/projects/.../session.jsonl \
-o ./transcript/Add --repo owner/name so commit hashes in the transcript link to GitHub:
claude-code-transcripts json session.jsonl \
-o ./transcript/ --repo myorg/myrepoThe repo is auto-detected from git push output when possible.
Host the HTML on GitHub Pages so the transcript is fully interactive (sidebar navigation, user-only filter, scroll tracking all work).
# Generate the transcript
claude-code-transcripts json session.jsonl -o ./transcript/
# Create a gh-pages branch with the HTML
git stash
git checkout --orphan gh-pages
git rm -rf .
cp transcript/index.html transcript.html
git add transcript.html
git commit -m "Add session transcript"
git push origin gh-pages
git checkout - # back to your feature branch
git stash popEnable GitHub Pages in your repo settings (source: gh-pages branch), or
use the API:
gh api repos/OWNER/REPO/pages --method POST \
--field source='{"branch":"gh-pages","path":"/"}'Then link it in your PR:
[View Claude session transcript](https://OWNER.github.io/REPO/transcript.html)
Quick and simple, but JavaScript features (FAB button, sidebar nav) are sandboxed and won't run.
claude-code-transcripts json session.jsonl --gistThis uploads the HTML to a public Gist and prints the URL. Paste the URL in your PR description.
If you don't need hosting, open the HTML locally and screenshot it:
cd transcript/
python3 -m http.server 8000
# Open http://localhost:8000 in your browser
# Take screenshots, drag them into the PR comment on GitHub# Work on your feature
git checkout -b add-auth-flow
# ... make changes with Claude Code ...
# Claude Code saves the session to ~/.claude/projects/.../<session-id>.jsonl
# Generate transcript with repo links
claude-code-transcripts json \
~/.claude/projects/-path-to-project/<session-id>.jsonl \
-o ./transcript/ --repo myorg/myrepo
# Host on GitHub Pages
git stash
git checkout --orphan gh-pages
git rm -rf .
cp transcript/index.html auth-flow-transcript.html
git add auth-flow-transcript.html
git commit -m "Add auth flow transcript"
git push origin gh-pages
git checkout add-auth-flow
git stash pop
# Push your feature branch and open the PR
git push -u origin add-auth-flow
gh pr create \
--title "Add authentication flow" \
--body "## Summary
Implements OAuth2 login flow.
## Claude Code transcript
[View full session](https://myorg.github.io/myrepo/auth-flow-transcript.html)
## Test plan
- [ ] Login with Google
- [ ] Login with GitHub
- [ ] Token refresh works"- Multiple transcripts: add each as a separate
.htmlfile on thegh-pagesbranch. - Batch export: use
claude-code-transcripts all -o ./archive/to convert every local session at once. - Include raw JSONL: add
--jsonto save the original session file alongside the HTML. - Session titles: the generated HTML uses your first message as the page title, so start with a clear description of what you're doing.