agentleFS
mikel-codemikel-code/claude-skills/yt-transcript/SKILL.md

yt-transcript

Skill0 starsChanged 3 months agoMITView on GitHub

Transcribe a video URL (YouTube or any yt-dlp-supported site) to a markdown file with Open Knowledge Format frontmatter. Downloads only subtitles when captions exist; otherwise downloads audio-only and transcribes locally with mlx-whisper (validated, with a repair ladder). Use when the user asks to transcribe a video, get a YouTube transcript, or turn a video into notes/markdown.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All via uv run (dependencies resolve automatically from inline metadata):

    line 33
  2. Very specific:

    Run --probe first when the user hasn't specified expectations — it shows whether the fast caption path is available or a whisper run (model …

    line 53

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

yt-transcript

Deterministic, script-driven video transcription. The scripts do all the work — do not hand-roll yt-dlp or whisper invocations.

Strategy (network-frugal)

  1. Probe first — metadata only, no download.
  2. Captions if available — downloads only the subtitle track (json3 on YouTube, WebVTT on other sites), never the video. Manual subs are preferred over auto captions; auto captions use the original ASR track, never a translated one (unless the user asked for a specific language with --lang).
  3. Whisper fallback — when no usable captions exist, downloads bestaudio only (full audio quality, no video payload; a small-video fallback covers sites without audio-only formats) and transcribes locally with mlx-whisper large-v3-turbo. Explicit language from the video metadata (one 30 s probe if absent — never per-window auto-detect), deterministic validation (repetition loops, n-gram loops, zlib compression ratio, timestamp coverage), and a repair ladder: condition-on-previous-text off → chunked 10-min splice → escalate to large-v3 → needs-attention (.diag.json + nonzero exit, nothing written).

Commands

All via uv run (dependencies resolve automatically from inline metadata):

# What would happen — metadata + caption availability, no download
uv run <skill-dir>/scripts/yt_transcript.py "<url>" --probe

# Transcribe to markdown (default filename: <published>-<slug>.md in cwd)
uv run <skill-dir>/scripts/yt_transcript.py "<url>" -o ~/Documents/talk.md

# Options
#   --lang es          prefer a caption/transcription language
#   --output-dir DIR   directory for the default filename
#   --no-fallback      captions only; exit 3 if none
#   --force-whisper    ignore captions, transcribe the audio
#   --keep-audio       keep the downloaded media next to the markdown

scripts/transcribe.py is also usable standalone on any local audio/video file: uv run <skill-dir>/scripts/transcribe.py <media> [--language es] [-o out.json].

Run --probe first when the user hasn't specified expectations — it shows whether the fast caption path is available or a whisper run (model download, minutes of compute) is coming, and lets you tell the user before committing.

Output

One markdown file per video: OKF v0.2 frontmatter (type: Video Transcript, title/description/resource/tags, generated.by = machine:youtube-captions or machine:mlx-whisper/<model>, sources, plus a custom video: block with channel/published/duration/language/transcript_source and — for whisper runs — the transcription provenance {model, repairs}), then the transcript as timestamped ~50-word paragraphs:

**[0:03:12]** paragraph text …

Notes

  • Whisper runs are compute-heavy (minutes for long videos) and hold ~2-4 GB of RAM; warn the user before transcribing anything long.
  • A <out>.transcript.json.diag.json after a failed run holds the machine-readable failure summary — surface its summary field to the user, don't retry blindly.
  • Playlists/channels are refused by design — pass one video URL at a time.
  • Transcripts of private/unlisted content are the user's data: default the output outside any public repo working directory.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.