baoyu-youtube-transcript
하는 일
URL이나 ID로 YouTube 영상의 대본이나 자막을 가져오며, 타임스탬프, 번역, 선택적 챕터를 포함할 수 있습니다. 읽기, 메모, 조사를 위해 영상의 텍스트가 필요한 사람을 위한 스킬입니다.
사용하는 경우
- ✓YouTube 영상의 대본을 텍스트로 얻고 싶을 때.
- ✓특정 언어나 SRT 형식의 자막이 필요할 때.
- ✓영상의 커버 이미지를 세부 정보와 함께 저장하고 싶을 때.
스킬 링크
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-youtube-transcript/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 YouTube 영상의 대본을 중국어와 영어로, 타임스탬프와 함께 가져와 주세요. 읽을 수 있게요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 영상 URL과 옵션을 넣어 명령줄 스크립트를 실행합니다. 먼저 YouTube 자체 인터페이스를 사용하고, 필요하면 yt-dlp로 대체하며, 원본 데이터를 캐시해 빠르게 다시 형식을 바꿀 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
YouTube Transcript
Works with manual and auto-generated transcripts. No API key or browser: uses YouTube's InnerTube API, falling back to yt-dlp when YouTube blocks the direct path. First run also fetches metadata and cover image and caches raw data for fast re-formatting.
Script Directory
{baseDir} = this SKILL.md's directory. ${BUN_X} = bun if installed; else npx -y bun if npx available; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.
| Script | Purpose |
|---|---|
scripts/main.ts |
Transcript download CLI |
Usage
${BUN_X} {baseDir}/scripts/main.ts <youtube-url-or-id> # markdown with timestamps (English)
${BUN_X} {baseDir}/scripts/main.ts <url> --languages zh,en,ja # language priority
${BUN_X} {baseDir}/scripts/main.ts <url> --chapters --speakers
${BUN_X} {baseDir}/scripts/main.ts <url> --format srt
${BUN_X} {baseDir}/scripts/main.ts <url> --translate zh-Hans
${BUN_X} {baseDir}/scripts/main.ts <url> --list
| Option | Description | Default |
|---|---|---|
<url-or-id> |
YouTube URL or video ID (multiple allowed) | Required |
--languages <codes> |
Language codes, comma-separated, in priority order | en |
--format <fmt> |
text (.md: frontmatter incl. description, title, summary, optional TOC/cover/timestamps/chapters/speakers) or srt |
text |
--translate <code> |
Translate to language code | |
--list |
List available transcripts (stdout only, no file) | |
--timestamps |
[HH:MM:SS → HH:MM:SS] timestamps per paragraph |
on |
--no-timestamps |
Disable timestamps | |
--chapters |
Chapter segmentation from video description | |
--speakers |
Raw transcript with metadata for speaker identification | |
--exclude-generated |
Skip auto-generated transcripts | |
--exclude-manually-created |
Skip manually created transcripts | |
--refresh |
Force re-fetch, ignore cache | |
-o, --output <path> |
Output file path | auto-generated |
--output-dir <dir> |
Base output directory | youtube-transcript |
Input: https://www.youtube.com/watch?v=ID, https://youtu.be/ID, https://www.youtube.com/embed/ID, https://www.youtube.com/shorts/ID, or bare video ID.
Optional env: YOUTUBE_TRANSCRIPT_COOKIES_FROM_BROWSER — passed to yt-dlp --cookies-from-browser during fallback (e.g. chrome, safari, firefox, chrome:Profile 1).
Output Directory
youtube-transcript/
├── .index.json # Video ID → directory path (cache lookup)
└── {channel-slug}/{title-full-slug}/ # channel name / full title, kebab-case
├── meta.json # title, channel, description, duration, chapters, cover path, language info
├── transcript-raw.json # raw API snippets `{ text, start, duration }[]`
├── transcript-sentences.json # `{ text, start: "HH:mm:ss", end: "HH:mm:ss" }[]`
├── imgs/
│ └── cover.jpg # Video thumbnail
├── transcript.md # from transcript-sentences.json
└── transcript.srt # from transcript-raw.json (--format srt)
transcript-sentences.json splits on sentence-ending punctuation (.?!…。?! etc.), merges across snippets (CJK-aware), and allocates timestamps proportionally by character length.
Caching & Fallback
- Repeat runs for the same video use the cache (no network).
--refreshforces re-fetch; requesting a different language refreshes automatically. - Any run caches
meta.jsonandimgs/cover.jpg, so cover/metadata-only requests just need one run. - On anti-bot / blocked responses the script retries alternate client identities, then
yt-dlp. Ifyt-dlpis needed but missing, the agent decides how to make it available and continues — don't push the install decision to the user.
Workflow
- No language specified → run
--listfirst to show options - Always single-quote the URL (zsh globs
?→ "no matches found"):'https://www.youtube.com/watch?v=ID' - Default:
--chapters --speakersfor the richest output - The script saves cache + output and prints the file path
--speakers→ post-process per Speaker Identification below
Chapters (--chapters)
Parses chapter timestamps from the description (e.g., 0:00 Introduction), segments by chapter, groups snippets into paragraphs, saves .md with a Table of Contents. No further processing. No chapter timestamps → gr
자주 묻는 질문
API 키가 필요한가요?
아닙니다. 이 스킬은 API 키나 브라우저 없이 작동합니다.
어떤 형식으로 만들 수 있나요?
타임스탬프가 있는 마크다운 텍스트 또는 SRT 자막을 만들 수 있습니다.
대본을 번역할 수 있나요?
네. 다른 언어로 번역을 요청할 수 있습니다.
상세 정보
작성자의 원본 설명
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.
repo: JimLiu/baoyu-skills
인기도
- GitHub 스타
- 27k
- 순위
- #9968
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
release-skills
27k버전 올리기, 변경 로그 업데이트, GitHub 릴리스나 태그 게시까지, 모든 프로젝트의 릴리스 과정을 에이전트가 안내하도록 합니다.
baoyu-article-illustrator
27k독자에게 도움이 되는 위치를 찾아 글에 삽화를 넣고, 같은 스타일로 그림을 만들도록 에이전트를 돕습니다.
baoyu-comic
27k주제를 설명하는 패널, 그림 스타일, 톤을 갖춘 교육용 만화를 만드는 방법을 에이전트에게 보여 줍니다. 전기나 튜토리얼 같은 형식이 가능합니다.
baoyu-compress-image
27k이미지를 WebP나 PNG로 바꿔 파일 크기를 줄이고, 도구를 자동으로 골라 더 빠르게 불러오도록 에이전트를 돕습니다.