Skip to content
Back to skills

Interview Transcript

ASecurity

Download and transcribe interviews/talks from YouTube videos and X.com (Twitter) videos/Spaces. Clean transcripts with Claude (removing filler words and transcription errors while preserving facts), and send to Kindle with cover image and clickable table of contents. Use when user shares a YouTube or X.com URL and wants a transcript, or asks to transcribe a video interview.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
ai-agentspythongobashawsgitapi

Works with

  • claude code
  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

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

Scanned November 14, 2026

npx -y skills add smorrel1/claude-code-skills --skill interview-transcript --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Interview Transcript?

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

Security grade badge for Interview Transcript
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/smorrel1-interview-transcript/badge)](https://www.skillsdirectory.com/skills/smorrel1-interview-transcript)

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: interview-transcript
description: Download and transcribe interviews/talks from YouTube videos and X.com (Twitter) videos/Spaces. Clean transcripts with Claude (removing filler words and transcription errors while preserving facts), and send to Kindle with cover image and clickable table of contents. Use when user shares a YouTube or X.com URL and wants a transcript, or asks to transcribe a video interview.
---

# Interview Transcript Skill

Download transcripts from YouTube or X.com, clean them with AI, and send to Kindle with cover image and clickable TOC.

## Prerequisites

### Core (required for all transcripts)
- **yt-dlp**: `brew install yt-dlp` or `pip install yt-dlp` (subtitle/audio extraction)
- **jinja2**: `pip install jinja2` (EPUB template rendering)
- **Calibre**: `brew install calibre` (provides `ebook-convert` for EPUB creation)
- **Pillow**: `pip install pillow` (cover image composition and the title cover)
- **pdf-to-kindle skill**: supplies `kindle_cover.py`, the shared cover drawer

### X.com fallback (only needed when no YouTube equivalent found)
- **ffmpeg**: `brew install ffmpeg` (resample audio to 16kHz mono for whisper)
- **whisper-cpp**: `brew install whisper-cpp` (audio transcription, binary at `/usr/local/opt/whisper-cpp/bin/whisper-cli`)
- **Whisper model**: e.g. `ggml-small.bin` from superwhisper app or [huggingface.co/ggerganov/whisper.cpp](https://huggingface.co/ggerganov/whisper.cpp/tree/main)

### Optional services
- **Gmail `email` skill** with OAuth credentials for Kindle delivery
- **Google Drive** OAuth token (`~/.claude/skills/email/token_drive.json`) for shareable link generation

## Supported Sources

| Source | URL Pattern | Method |
|--------|------------|--------|
| YouTube | `youtube.com/watch?v=...`, `youtu.be/...` | Subtitle extraction (SRT) |
| X.com / Twitter | `x.com/.../status/...`, `twitter.com/...` | Subtitles if available, otherwise audio download + whisper.cpp transcription |

**Spotify / Apple Podcasts / audio-only links are NOT directly supported** (no caption extraction). When given one, find the YouTube equivalent first: WebSearch `"<podcast name> #<episode number> <guest> YouTube full episode"`, then use that YouTube URL. Most major podcasts (e.g. JRE) publish full episodes on YouTube with auto-captions.

## Usage

### Step 1: Download the transcript

**YouTube:**
```bash
python3 scripts/youtube_transcript.py --url "https://www.youtube.com/watch?v=VIDEO_ID"
```

**X.com:**
```bash
python3 scripts/youtube_transcript.py --url "https://x.com/user/status/123456"
```

The script auto-detects the source from the URL. For X.com, it first tries subtitle extraction, then falls back to downloading audio and transcribing with whisper.cpp.

Options:
| Option | Description |
|--------|-------------|
| `--url` | YouTube or X.com video URL (required) |
| `--lang` | Subtitle language code (default: en) |
| `--output` | Output file path (default: ./transcript.txt) |
| `--auto-subs` | Use auto-generated subtitles if manual unavailable |
| `--raw` | Output raw SRT instead of plain text |
| `--clean FILE` | Clean a transcript (remove filler words, add paragraphs) |

### Step 2: Clean filler words (Python script)

```bash
python3 scripts/youtube_transcript.py --clean transcript_raw.txt --output transcript_cleaned.txt
```

This removes filler words, duplicates, and adds paragraph breaks **without using LLM tokens**:
- Removes: um, uh, like, you know, basically, actually, literally, I mean, sort of, kind of, etc.
- Removes: [Music], [Applause], and other auto-caption artifacts
- Removes: stuttered/repeated words (e.g., "the the" -> "the")
- Adds paragraph breaks at ~500 character intervals

**Output shows reduction:** e.g., "Size: 45,000 -> 38,000 chars (15.6% reduction)"

### Step 3: Add section headers and fix transcription (LLM - use haiku model)

**IMPORTANT:** Use the Agent tool with `model: haiku`. The LLM adds `## Section Title` headers AND fixes transcription quality issues that the mechanical cleaning cannot catch.

The haiku agent should:
1. **Read** the pre-cleaned transcript file
2. **Add section headers** using `## Section Title` markdown:
   - **For interviews:** New section for each interviewer question/topic
   - **For lectures/talks:** New section at major concept transitions
   - Each section: 2-5 paragraphs (~1000 words max)
3. **Fix transcription quality** using contextual understanding:
   - **Misrecognized words:** Auto-captions often get proper nouns wrong (e.g., "Enthropic" -> "Anthropic", "quad code" -> "Claude Code", "Churnney" -> "Cherny")
   - **Punctuation:** Add missing sentence breaks, fix run-on sentences, add question marks to questions
   - **Speaker attribution:** Where `>>` markers exist, clarify who is speaking if obvious from context
   - **Garbled phrases:** Reconstruct phrases that were clearly misheard based on surrounding context
   - **Names and terms:** Correct technical terms, company names, product names, and people's names
4. **Write** the structured version with ONE Write tool call

**Why haiku does this better than the script:** The mechanical `--clean` step handles pattern-based fixes (filler words, duplicates). But contextual errors like "quad code" (should be "Claude Code") or missing punctuation require understanding the meaning, which only the LLM can do.

**LONG TRANSCRIPTS (CRITICAL; >~60KB cleaned, i.e. episodes longer than ~1hr):** A single haiku agent given a long transcript will **summarize and silently drop content** instead of cleaning verbatim. (Observed: a 232KB / 3.5hr transcript came back at 52-81% of input size when processed in one or four large pieces, i.e. up to half the conversation lost.) To avoid this:
1. **Split into ~25-30KB chunks** on paragraph boundaries (smaller chunks resist compression; ~58KB chunks still summarized, ~29KB chunks did not).
2. **Run one parallel haiku agent per chunk**, each writing to its own `chunk_N_structured.txt`. Tell each agent explicitly: "verbatim cleanup, NOT a summary; reproduce EVERY sentence; output must be ≈ the same length as input or longer."
3. **VERIFY each output is ≥90% of its input char count** (`wc -c`). Agents' self-reported counts are unreliable, so measure the files on disk. Re-run any undersized chunk at a smaller split size.
4. **Concatenate the verified chunks in order** before the EPUB step. Do NOT add a `# ` top-level title inside chunks; only `## ` section headers (these become the TOC).

### Step 4: Convert to EPUB with cover

```bash
python3 scripts/youtube_transcript.py --to-epub transcript_structured.txt \
  --output "Video Title.epub" \
  --title "Video Title" \
  --author "Channel Name" \
  --youtube-cover "https://youtube.com/watch?v=VIDEO_ID"
```

For X.com videos, use `--cover` with a local image if you have one. Omitting it
no longer means no cover: see below.

**Every EPUB gets a cover (standing default, 16 Oct 2026).** When no artwork is
supplied or the download fails, the script draws a plain title cover (1600x2560,
deep blue #0d47a1, title in white Arial Bold, channel name beneath) using
`~/.claude/skills/pdf-to-kindle/scripts/kindle_cover.py`. A coverless EPUB gets
the same generic DOC icon as every other one on the Kindle, which makes a shelf
of transcripts impossible to tell apart.

**Wide tables become lists.** A table of more than three columns reflows into
unreadable fragments at Kindle's ten-or-so words a line, so `--to-epub` rewrites
each row as a labelled block of `Column: value` lines. Two and three-column
tables pass through.

**Cover handling (automatic, added 20 Sep 2026):** the script normalizes every cover to a real JPEG (YouTube serves WebP behind .jpg URLs; Amazon's Send-to-Kindle silently drops a mislabeled cover and shows a generic DOC placeholder), and when the graphic is landscape/squarish (aspect w/h > 0.75, i.e. any video thumbnail) it composes a designed 1600x2560 portrait cover: title set in Georgia Bold in the top block, accent rule and author line (both auto-fitted), artwork full-bleed in the lower half, background gradient and accent colour derived from the artwork. A true portrait cover image passes through untouched. Requires PIL for composition (falls back to the raw JPEG without it).

### Step 5: Send to Kindle

```bash
python3 ~/.claude/skills/email/scripts/gmail_utils.py --account gmail send \
  --to "<your-kindle-email>@kindle.com" \
  --subject "Convert" \
  --body "Transcript attached" \
  --attach "Video Title.epub" \
  --new
```

**Important:** Always use `--account gmail` and `--new` flags. Use subject "Convert" for Kindle-optimized formatting.

## Complete Workflow Example

```bash
# 1. Download transcript (auto-detects YouTube vs X.com)
python3 scripts/youtube_transcript.py --url "https://youtu.be/VIDEO_ID" \
  --output ~/Downloads/transcript_raw.txt --auto-subs

# 2. Clean filler words (Python - no LLM needed)
python3 scripts/youtube_transcript.py --clean ~/Downloads/transcript_raw.txt \
  --output ~/Downloads/transcript_cleaned.txt

# 3. (Claude haiku adds ## Section headers, saves to transcript_structured.txt)

# 4. Convert to EPUB with thumbnail as cover
python3 scripts/youtube_transcript.py --to-epub ~/Downloads/transcript_structured.txt \
  --output ~/Downloads/"Video Title.epub" \
  --title "Video Title" \
  --author "Channel Name" \
  --youtube-cover "https://youtu.be/VIDEO_ID"

# 5. Send to Kindle
python3 ~/.claude/skills/email/scripts/gmail_utils.py --account gmail send \
  --to "<your-kindle-email>@kindle.com" \
  --subject "Convert" \
  --body "Cleaned transcript attached." \
  --attach ~/Downloads/"Video Title.epub" \
  --new
```

## EPUB Options

| Option | Description |
|--------|-------------|
| `--to-epub FILE` | Convert text file to EPUB |
| `--title` | Book title for EPUB metadata |
| `--author` | Author name for EPUB metadata |
| `--cover IMAGE` | Use local image file as cover |
| `--youtube-cover URL` | Download YouTube thumbnail as cover |
| (neither) | A plain title cover is drawn automatically |
| `--output` | Output file path |

## Workflow for Claude

When a user asks to download and clean a transcript:

1. **Extract URL** from user request, auto-detect source (YouTube or X.com)
2. **If X.com URL: Search YouTube first** (see X.com workflow below)
3. **Run the download script** to get raw transcript
4. **Run `--clean`** to remove filler words (Python, no LLM tokens)
5. **Add section headers + fix transcription using Agent tool with model=haiku**:
   - Launch a haiku agent that reads the pre-cleaned transcript
   - Add `## Section Title` headers at each topic change
   - Fix contextual transcription errors: misrecognized proper nouns, missing punctuation, garbled phrases, speaker attribution
   - **Write structured version with ONE Write tool call**
6. **Convert to EPUB with cover**:
   - Use `--to-epub` with `--youtube-cover URL` (YouTube) or `--cover FILE` (X.com)
   - The `## Section Title` headers become clickable TOC entries
7. **Send to Kindle** using gmail skill `send` command:
   - Use `--account gmail --new`
   - Use subject "Convert" for Kindle-optimized formatting
8. **Upload to Google Drive** and get shareable link:
   - Use the Python Google Drive API script with token at `~/.claude/skills/email/token_drive.json`
   - Set permissions to "anyone with link can view"
   - Return both view link and direct download link
9. **Generate a shareable post** for the user to copy/paste to YouTube comments or X.com:
   - Include: title, brief description of the transcript, EPUB download link (Google Drive), and a link to the interview-transcript skill on GitHub so others can run it themselves
   - Keep it concise and friendly, suitable for a YouTube comment or X post
   - Example format: "I made a cleaned-up Kindle-ready transcript of this interview with section headers and TOC. Download the EPUB here: [link]. Made with this open-source Claude Code skill: [github link]"

## X.com YouTube-First Search (IMPORTANT)

**Always try to find the same interview on YouTube before transcribing X.com audio.** YouTube videos have proper subtitles that extract instantly, while X.com requires downloading audio + whisper transcription (slow, lower quality).

### Search strategy (in order):

1. **Check the X post description** for links. Use `yt-dlp --dump-json --skip-download <x_url>` and look for URLs in the description field. Resolve any t.co shortened links with `curl -sIL`.
2. **Check the X post thread/replies** for YouTube links. The original poster or others often link to the full YouTube version.
3. **Search YouTube** using WebSearch with key details from the X post (speaker names, topic, podcast name). Filter to `youtube.com` domain.
4. **Match by duration.** Compare the X.com video duration (from yt-dlp metadata) to YouTube candidates. A close match (within ~5 min) strongly suggests the same content.

### If YouTube match found:
- Use the YouTube URL instead for subtitle extraction (instant, high quality)
- Still use YouTube thumbnail as cover via `--youtube-cover`

### If no YouTube match:
- Fall back to X.com audio download + whisper-cpp transcription
- whisper-cli binary is at `/usr/local/opt/whisper-cpp/bin/whisper-cli`
- Model file at `~/Library/Application Support/superwhisper/ggml-small.bin` (from superwhisper app)
- Resample to 16kHz mono first: `ffmpeg -i input.wav -ar 16000 -ac 1 output_16k.wav`

## X.com Specific Notes

- X.com videos/Spaces rarely have subtitles, so always try YouTube first
- X.com Spaces (live audio) are also supported via yt-dlp
- Transcription of long X.com Spaces may take several minutes with whisper

## Section Breaking Guidelines

Sections become clickable TOC entries in the EPUB. Use `## Section Title` markdown headers.

### For Interviews

Identify interviewer questions and use them as section titles:
- "So tell me about your background..." -> `## Background and Early Career`
- "How do you think about AI safety?" -> `## AI Safety Philosophy`

Look for cues:
- Direct questions ("What do you think about...", "How did you...")
- Topic shifts ("Let's talk about...", "Moving on to...")
- New themes introduced by either speaker

### For Lectures/Talks

Create sections at natural topic boundaries:
- Major concept introductions
- "Now let's look at..." transitions

### Section Length

Aim for 2-5 paragraphs per section. If a section gets too long (more than ~1000 words), look for natural subdivision points.

## Technical Details

### EPUB Creation (Calibre-based)

The skill uses Calibre's `ebook-convert` with OPF format for reliable Kindle compatibility:

- **book.opf**: Package format with `<EmbeddedCover>` tag
- **toc.html**: Clickable table of contents with hyperlinks
- **content.html**: Main content with section anchors
- **book.ncx**: Navigation control for Kindle's built-in nav
- **style.css**: Typography and formatting

### Send to Kindle Notes

- **Subject "Convert"**: Amazon converts to Kindle format with adjustable fonts, highlighting, notes
- **File size**: 50 MB max (Gmail: 25 MB)
- **Approved sender**: Your Gmail account (use `--account gmail`)
- **Filename = Book title**: Use descriptive filenames

Files in this skill

  • SKILL.md14.8 KB
  • scripts/youtube_transcript.py42.9 KB
  • templates/book.ncx1.1 KB
  • templates/book.opf1.8 KB
  • templates/content.html686 B
  • templates/cover.html437 B
  • templates/style.css556 B
  • templates/toc.html486 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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