Skip to content
Back to skills

Extract Transcripts

ASecurity

Extract readable transcripts from Claude Code and Codex CLI session JSONL files

  • 207 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 7, 2026
toolsbashgitdatabase

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add NeverSight/skills_feed --skill extract-transcripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extract Transcripts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Extract Transcripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-extract-transcripts/badge)](https://www.skillsdirectory.com/skills/neversight-extract-transcripts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: extract-transcripts
description: Extract readable transcripts from Claude Code and Codex CLI session JSONL files
---

# Extract Transcripts

Extracts readable markdown transcripts from Claude Code and Codex CLI session JSONL files.

## Scripts

### Claude Code Sessions

```bash
# Extract a single session
uv run ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl>

# With tool calls and thinking blocks
uv run ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> --include-tools --include-thinking

# Extract all sessions from a directory
uv run ~/.claude/skills/extract-transcripts/extract_transcript.py <directory> --all

# Output to file
uv run ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> -o output.md

# Summary only (quick overview)
uv run ~/.claude/skills/extract-transcripts/extract_transcript.py <session.jsonl> --summary

# Skip empty/warmup-only sessions
uv run ~/.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)

### Codex CLI Sessions

```bash
# Extract a Codex session
uv run ~/.claude/skills/extract-transcripts/extract_codex_transcript.py <session.jsonl>

# Extract from Codex history file
uv run ~/.claude/skills/extract-transcripts/extract_codex_transcript.py ~/.codex/history.jsonl --history
```

## Session File Locations

### Claude Code
- Sessions: `~/.claude/projects/<project-path>/<session-id>.jsonl`

### Codex CLI
- Sessions: `~/.codex/sessions/<session_id>/rollout.jsonl`
- History: `~/.codex/history.jsonl`

## DuckDB-Based Transcript Index

For querying across many sessions, use the DuckDB-based indexer:

```bash
# Index all sessions (incremental - only new/changed files)
uv run ~/.claude/skills/extract-transcripts/transcript_index.py index

# Force full reindex
uv run ~/.claude/skills/extract-transcripts/transcript_index.py index --full

# Limit number of files to process
uv run ~/.claude/skills/extract-transcripts/transcript_index.py index --limit 10

# List recent sessions
uv run ~/.claude/skills/extract-transcripts/transcript_index.py recent
uv run ~/.claude/skills/extract-transcripts/transcript_index.py recent --limit 20
uv run ~/.claude/skills/extract-transcripts/transcript_index.py recent --project myapp
uv run ~/.claude/skills/extract-transcripts/transcript_index.py recent --since 7d

# Search across sessions
uv run ~/.claude/skills/extract-transcripts/transcript_index.py search "error handling"
uv run ~/.claude/skills/extract-transcripts/transcript_index.py search "query" --cwd ~/myproject

# Show a session transcript
uv run ~/.claude/skills/extract-transcripts/transcript_index.py show <file_path>
uv run ~/.claude/skills/extract-transcripts/transcript_index.py show <file_path> --summary
```

**Requirements:** uv (dependencies auto-installed via inline script metadata)

**Database location:** `~/.claude/transcript-index/sessions.duckdb`

## Output Format

Transcripts are formatted as markdown with:
- Session metadata (date, duration, model, working directory, git branch)
- User messages prefixed with `## User`
- Assistant responses prefixed with `## Assistant`
- Tool calls in code blocks (if --include-tools)
- Thinking in blockquotes (if --include-thinking)
- Tool usage summary for Codex sessions

Files in this skill

  • SKILL.md3.6 KB
  • description_cn.txt74 B
  • description_de.txt90 B
  • description_en.txt80 B
  • description_es.txt90 B
  • description_fr.txt92 B
  • description_ja.txt136 B
  • description_ko.txt97 B
  • description_tw.txt80 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.