Agent skill
transcribing-youtube
Download and transcribe YouTube videos into clean, deduplicated Markdown documents with chapter headings. Wraps yt-dlp to fetch subtitles (manual or auto-generated), removes the rolling-text triplication artifacts from auto-subs, inserts chapter markers from video metadata, and produces both a timestamped transcript and a prose-only version. Use when the user wants to: (1) transcribe a YouTube video, (2) get a transcript or subtitles from YouTube, (3) create an InfoNugget from a video, (4) extract text from a YouTube URL or video ID, or (5) mentions yt-dlp, YouTube transcript, or video subtitles.
Install this agent skill to your Project
npx add-skill https://github.com/m31uk3/ai-skills/tree/main/skills/transcribing-youtube
SKILL.md
Transcribing YouTube Videos
Generate clean, deduplicated Markdown transcripts from YouTube videos using yt-dlp.
Prerequisites
Verify CLI dependencies before running:
command -v yt-dlp jq awk sed find
Required: yt-dlp, jq, awk, sed, find (standard POSIX utilities).
Workflow
Step 1: Get the video identifier
Accept any of these input formats:
- Full URL:
https://www.youtube.com/watch?v=q6pbQ5li5Cg - Short URL:
https://youtu.be/q6pbQ5li5Cg - Shorts URL:
https://www.youtube.com/shorts/q6pbQ5li5Cg - Bare video ID:
q6pbQ5li5Cg
Step 2: Run the script
bash {baseDir}/scripts/genInfoNugget.sh <URL_or_VIDEO_ID>
To reprocess an existing SRT without re-downloading:
bash {baseDir}/scripts/genInfoNugget.sh --fix <URL_or_VIDEO_ID>
Step 3: Verify output
The script produces two files in the current directory:
| File | Contents |
|---|---|
*.InfoNug.DDMMMYY.HHMMSS.md |
Timestamped transcript with #### chapter headings |
*.InfoNug.DDMMMYY.HHMMSS.md_chapters.md |
Prose-only version grouped by chapter (no timestamps) |
After the script completes, read the first ~30 lines of the prose file (_chapters.md) to confirm no triplication. Each phrase should appear exactly once.
Step 4: Present results
Report the two output filenames to the user. If the user wants a summary, read the prose file and summarize by chapter.
How the script works
- Download: Tries manual subs first (
--write-subs), falls back to auto-generated (--write-auto-subs) only if needed - Deduplicate: AWK pass removes ≤100ms transition blocks and strips rolling duplicate lines carried forward from previous blocks
- Chapters: Extracts chapter timestamps from
info.jsonviajq, inserts####headings in a single AWK pass - Prose: Strips all timestamps and joins text into flowing paragraphs grouped by chapter
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "No SRT file found" | No subtitles in target language | Check video has captions enabled |
| Tripled text in output | Using old v1 script | Use this skill's script which includes deduplication |
--fix fails with no SRT |
Previous run cleaned up intermediate files | Run without --fix to re-download |
Why does tripling happen? See references/faqs.md for a detailed explanation of YouTube's rolling VTT format and how the dedup works.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
guided-ooda-loop
Universal pattern for structured LLM interaction managing finite context windows through phased progression (Observe-Orient-Decide-Act). Use when the user has a complex problem, wants to design/build/create something (software, strategy, document, process), or uses phrases like "I have an idea for...", "help me design...", "guide me through...", or mentions OODA, RPI, or PDD. Reduces hallucinations through structured interaction.
response-quality-analysis
Analyze whether your response addresses the actual question asked before posting. Use when: (1) About to post response to forum/Slack question, (2) Want to validate response coverage, (3) Need to ensure solving the right problem, (4) Want specific improvement suggestions for gaps in response
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Didn't find tool you were looking for?