Extract readable transcripts from Claude Code and Codex CLI session JSONL files
Extracts readable markdown transcripts from Claude Code and Codex CLI session JSONL files.
# Extract a single session
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl>
# With tool calls and thinking blocks
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> --include-tools --include-thinking
# Extract all sessions from a directory
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <directory> --all
# Output to file
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> -o output.md
# Summary only (quick overview)
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> --summary
# Skip empty/warmup-only sessions
python3 ~/.claude/skills/extract-transcripts/extract_transcript.py <directory> --all --skip-empty
Options:
--include-tools: Include tool calls and results--include-thinking: Include Claude's thinking blocks--all: Process all .jsonl files in directory-o, --output: Output file path (default: stdout)--summary: Only output brief summary--skip-empty: Skip empty and warmup-only sessions--min-messages N: Minimum messages for --skip-empty (default: 2)# Extract a Codex session
python3 ~/.claude/skills/extract-transcripts/extract_codex_transcript.py <session.jsonl>
# Extract from Codex history file
python3 ~/.claude/skills/extract-transcripts/extract_codex_transcript.py ~/.codex/history.jsonl --history
~/.claude/projects/<project-path>/<session-id>.jsonl~/.codex/sessions/<session_id>/rollout.jsonl~/.codex/history.jsonlFor querying across many sessions, use the DuckDB-based indexer:
# Index all sessions (incremental - only new/changed files)
python3 ~/.claude/skills/extract-transcripts/transcript_index.py index
# Force full reindex
python3 ~/.claude/skills/extract-transcripts/transcript_index.py index --full
# Limit number of files to process
python3 ~/.claude/skills/extract-transcripts/transcript_index.py index --limit 10
# List recent sessions
python3 ~/.claude/skills/extract-transcripts/transcript_index.py recent
python3 ~/.claude/skills/extract-transcripts/transcript_index.py recent --limit 20
python3 ~/.claude/skills/extract-transcripts/transcript_index.py recent --project myapp
python3 ~/.claude/skills/extract-transcripts/transcript_index.py recent --since 7d
# Search across sessions
python3 ~/.claude/skills/extract-transcripts/transcript_index.py search "error handling"
python3 ~/.claude/skills/extract-transcripts/transcript_index.py search "query" --cwd ~/myproject
# Show a session transcript
python3 ~/.claude/skills/extract-transcripts/transcript_index.py show <file_path>
python3 ~/.claude/skills/extract-transcripts/transcript_index.py show <file_path> --summary
Requirements: DuckDB (pip install duckdb)
Database location: ~/.claude/transcript-index/sessions.duckdb
Transcripts are formatted as markdown with:
## User## Assistantnpx skills add aiskillstore/extract-transcripts下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer