营销与写作

baoyu-youtube-transcript

jimliu/baoyu-skills

Downloads YouTube video transcripts/subtitles and cover images by URL or video ID. Supports multiple languages, translation, chapters, and speaker identification. Caches raw data for fast re-formatting. Use when user asks to "get YouTube transcript", "download subtitles", "get captions", "YouTube字幕", "YouTube封面", "视频封面", "video thumbnail", "video cover image", or provides a YouTube URL and wants the transcript/subtitle text or cover image extracted.

  • 2.2万 次安装
  • 2.7万 星标
  • 收录于

安装命令

npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-youtube-transcript

要点

Download YouTube transcripts, subtitles, and cover images with multi-language support and intelligent caching.

  • Accepts YouTube URLs or video IDs in multiple formats; no API key required, uses InnerTube API with automatic fallback to yt-dlp when blocked
  • Outputs markdown with timestamps, SRT subtitles, or raw transcript; supports language selection, translation, chapter segmentation, and speaker identification via AI post-processing
  • Caches raw transcript data and metadata on first fetch for fast re-formatting without network calls; use --refresh to force re-fetch
  • Handles CJK text intelligently, proportionally allocates timestamps across sentence boundaries, and auto-generates cover images and video metadata

SKILL.md

YouTube Transcript

Downloads transcripts (subtitles/captions) from YouTube videos. Works with both manually created and auto-generated transcripts. No API key or browser required — uses YouTube's InnerTube API directly and automatically falls back to yt-dlp when YouTube blocks the direct API path.

Fetches video metadata and cover image on first run, caches raw data for fast re-formatting.

Script Directory

Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

Script Purpose
scripts/main.ts Transcript download CLI

Usage

# Default: markdown with timestamps (English)
${BUN_X} {baseDir}/scripts/main.ts <youtube-url-or-id>