name: youtube-korean-transcript description: Extracts one readable markdown transcript from a YouTube URL or video ID using yt-dlp with Korean-first subtitle selection, then routes output through an LLM workflow for translation, summary writing, and humanized Korean style cleanup. Use when users ask to extract, structure, timestamp, or translate YouTube transcripts (especially into Korean).
YouTube Korean Transcript
Overview
Generate one readable markdown transcript file. Use Korean subtitle tracks first; if the extracted text is non-Korean, your LLM workflow translates the readable file into Korean and overwrites the same file. After translation/summarization, run a humanization pass to remove AI-style Korean writing patterns.
Workflow
1) Collect inputs
- Accept one YouTube URL or 11-char video ID.
- Default output directory is
artifacts/unless the user asks otherwise. - If running inside Gemini temp sessions (
~/.gemini/tmp/...), relative output paths are mapped to the original project path from.project_root.
2) Ensure dependency
Pick <PYTHON_CMD> by environment:
- macOS/Linux:
python3(orpythonifpython --versionis 3.x) - Windows:
py -3(orpythonif it points to Python 3)
PIP_DISABLE_PIP_VERSION_CHECK=1 <PYTHON_CMD> -m pip install yt-dlp
3) Run the extractor
Run from this skill directory:
<PYTHON_CMD> scripts/extract_youtube_ko_transcript.py \
--video "https://www.youtube.com/watch?v=VIDEO_ID" \
--output-dir artifacts
If YouTube blocks requests, retry with network/auth options:
<PYTHON_CMD> scripts/extract_youtube_ko_transcript.py \
--video "https://www.youtube.com/watch?v=VIDEO_ID" \
--output-dir artifacts \
--cookies /path/to/cookies.txt
or
<PYTHON_CMD> scripts/extract_youtube_ko_transcript.py \
--video "https://www.youtube.com/watch?v=VIDEO_ID" \
--output-dir artifacts \
--proxy-url "http://user:pass@host:port"
If your environment has TLS interception/certificate issues:
<PYTHON_CMD> scripts/extract_youtube_ko_transcript.py \
--video "https://www.youtube.com/watch?v=VIDEO_ID" \
--output-dir artifacts \
--no-check-certificate
4) Confirm generated output
Expect one file:
<video_id>.ko.readable.md- If chapters exist on YouTube metadata, readable output is grouped by chapter titles.
- If chapters do not exist, output falls back to fixed section ranges by
--section-minutes.
Frontmatter/YAML properties to check:
title: ...url: ...video_id: ...channel: ...published: YYYY-MM-DDcreated: YYYY-MM-DDneeds_llm_translation: true|false
Summary/template sections to check:
## ๐ Summary Source (Compact)## ๐ Executive Summary## ๐ Detailed Summary## ๐ก Key Insights & Action Items## ๐ Transcript
5) Translate + summarize in your LLM workflow
Token-saving execution policy (MUST):
- Use exactly one LLM edit call per video (
replaceor one-shot file edit). Avoid multi-turn read/replace/write loops. - Use
## ๐ Summary Source (Compact)as the primary input for summary generation. - Keep summary length limits:
Executive Summary: 4~6 sentencesDetailed Summary: 4~6 bulletsKey Insights & Action Items: 3~5 bullets
- Remove
## ๐ Summary Source (Compact)before final delivery unless the user explicitly asks to keep it.
Case A: needs_llm_translation: true
- Translate transcript body text into Korean.
- Keep transcript section headers and
[HH:MM:SS]timestamps exactly unchanged. - Keep proper nouns/product names in original form when translation is awkward.
- Fill summary sections in Korean using compact summary source.
- Overwrite the same file (
<video_id>.ko.readable.md) in place. - Update YAML property to
needs_llm_translation: false.
Case B: needs_llm_translation: false
- Do not rewrite transcript body.
- Fill or refine summary sections in Korean using compact summary source only.
5-1) Humanizer-KR pass (AI ํฐ ์ ๊ฑฐ)
After step 5, you MUST apply a humanized Korean style pass.
Core rewriting rules:
- Avoid hype-heavy words (
ํต์ฌ์ ,ํ๊ธฐ์ ,์ค๋ํ,์ ์งํ,ํจ๋ฌ๋ค์ ์ ํ) unless objectively justified. - Replace vague authority claims (
์ ๋ฌธ๊ฐ๋ค์,์ ๊ณ ๊ด๊ณ์์ ๋ฐ๋ฅด๋ฉด) with concrete sources, or remove. - Reduce repetitive connectors (
์ด๋ฅผ ํตํด,์์ธ๋ฌ,๋์๊ฐ,์ด๋ฌํ ๋งฅ๋ฝ์์). - Reduce overuse of
~์ adjectives and inflated Sino-Korean wording. - Avoid verbose forms like
~์ ์์ด์,~ํจ์ ์์ด; rewrite to direct Korean. - Prefer concrete facts, numbers, and observable outcomes over abstract praise.
- Keep sentence rhythm mixed (short + medium); avoid monotonous, machine-like cadence.
- Preserve original meaning and factual content; do not alter timestamps or section boundaries.
- Keep professional tone, but avoid press-release style phrasing.
5-2) LLM Post-Translation Prompt Templates
Use one of the templates below in your current environment (Gemini/OpenAI/Claude).
Template A (Korean default):
๋ค์ Markdown ํ์ผ์ ์์ ํด ์ฃผ์ธ์.
ํ์ผ ๊ฒฝ๋ก: <READABLE_FILE_PATH>
๊ท์น:
1) ์ด ์์
์ ํ ๋ฒ์ ํธ์ง ํธ์ถ๋ก ๋๋
๋๋ค.
2) `## ๐ Summary Source (Compact)`๋ง ์ฌ์ฉํด ์์ฝ์ ์์ฑํฉ๋๋ค.
3) `needs_llm_translation: true`์ด๋ฉด `## ๐ Transcript` ๋ณธ๋ฌธ์ ์์ฐ์ค๋ฌ์ด ํ๊ตญ์ด๋ก ๋ฒ์ญํ๊ณ , `false`์ด๋ฉด Transcript๋ ์์ ํ์ง ์์ต๋๋ค.
4) `## ๐ Transcript` ์๋์ ์์ ๋ชฉ๊ณผ `[HH:MM:SS]` ํ์์คํฌํ๋ ์๋ฌธ์ ๊ทธ๋๋ก ์ ์งํฉ๋๋ค.
5) `## ๐ Executive Summary`๋ 4~6๋ฌธ์ฅ, `## ๐ Detailed Summary`๋ 4~6๊ฐ bullet, `## ๐ก Key Insights & Action Items`๋ 3~5๊ฐ bullet๋ก ์์ฑํฉ๋๋ค.
6) ๊ณ ์ ๋ช
์ฌ(์ธ๋ช
, ์ ํ๋ช
, ํ๋ก์ ํธ๋ช
)๋ ์๋ฏธ๊ฐ ์ด์ํด์ง๋ฉด ์๋ฌธ์ ์ ์งํฉ๋๋ค.
7) YAML frontmatter๋ ์ ์งํ๋ `needs_llm_translation: true`๋ `needs_llm_translation: false`๋ก ๋ฐ๊ฟ๋๋ค.
8) ๋ง์ง๋ง์ผ๋ก AI ๊ธ์ฐ๊ธฐ ํจํด์ ์ ๊ฑฐํฉ๋๋ค: ๊ณผ์ฅ์ด, ๋ชจํธํ ์ถ์ฒ, `~์ `/`~์ ์์ด์` ๋จ์ฉ, ์ฐ๊ฒฐ์ด ๋จ๋ฐ์ ์ค์ด๊ณ ๋ ์์ฐ์ค๋ฌ์ด ํ๊ตญ์ด ๋ฌธ์ฅ์ผ๋ก ๋ค๋ฌ์ต๋๋ค.
9) ์ต์ข
๋ณธ ์ ์ฅ ์ `## ๐ Summary Source (Compact)` ์น์
์ ์ญ์ ํฉ๋๋ค(์ฌ์ฉ์๊ฐ ์ ์ง ์์ฒญํ ๊ฒฝ์ฐ ์ ์ธ).
10) ์ค๋ช
์ถ๋ ฅ ์์ด ํ์ผ๋ง ๋ฎ์ด์จ์ ์ ์ฅํฉ๋๋ค.
Template B (target language variable):
Edit this markdown file in place.
File path: <READABLE_FILE_PATH>
Target language: <TARGET_LANGUAGE>
Requirements:
1) Complete this in one edit call.
2) Use only `Summary Source (Compact)` for summary writing.
3) If `needs_llm_translation: true`, translate transcript body into <TARGET_LANGUAGE>; otherwise, do not edit transcript body.
4) Preserve transcript section headings and `[HH:MM:SS]` timestamps exactly.
5) Keep summary lengths: Executive 4-6 sentences, Detailed 4-6 bullets, Action Items 3-5 bullets.
6) Keep proper nouns in original form when translation hurts clarity.
7) Keep YAML frontmatter unchanged except setting `needs_llm_translation: false` when translation is done.
8) Apply a humanization pass: remove hype-heavy wording, vague attribution, repetitive connectors, and overly formulaic AI phrasing.
9) Remove the `Summary Source (Compact)` section before final delivery unless the user asks to keep it.
10) Save changes to the same file with no extra commentary.
6) Apply response-quality checks
- Verify the file includes both first and last timestamps.
- Verify every timestamp is
HH:MM:SS. - Verify transcript section headers and timestamp tokens were not changed by translation.
- Verify summary sections were written from
Summary Source (Compact)content. - Verify all three summary sections are filled (not placeholders).
- Verify summary length limits are met.
- Verify
Summary Source (Compact)is removed in the final file by default. - Verify wording is not overly promotional or template-like AI prose.
- If any check fails, fix the file and re-run the checks before returning.
- If user asks for polishing, only fix obvious ASR wording issues.
7) Session hygiene for token savings
- Use one fresh chat/session per video URL.
- Do not continue from prior unrelated long threads when running this skill.
Script Options
extract_youtube_ko_transcript.py supports:
--video: YouTube URL or 11-char video ID (required)--output-dir: destination folder (default:artifacts; relative paths map to original project path in Gemini temp sessions, otherwise current working directory)--prefer-korean-languages: preferred Korean track codes (default:ko,ko-KR)--source-languages: fallback source track order (default:en,en-US,ja,es,fr,de)--languages: backward-compatible alias of--source-languages--proxy-url: proxy URL for yt-dlp--proxy-http-url: legacy alias for HTTP proxy--proxy-https-url: legacy alias for HTTPS proxy--cookies: Netscape-format cookies file path--user-agent: custom User-Agent string--no-check-certificate: disable TLS certificate verification (use only when needed)--no-chapters: disable chapter-based organization and always use fixed section ranges--section-minutes: readable markdown section size (default:10)--summary-compact-sections: max sections included in compact summary source (default:8)--summary-compact-points: max representative points per section in compact summary source (default:2)--summary-compact-chars: max characters per representative point in compact summary source (default:180)
Failure Handling
- If transcript fetch fails, report the exact error briefly.
- If no subtitle track is accessible, state that clearly and stop.
- If YouTube blocks the network/IP (HTTP 429), retry later, change network, disable Tailscale Exit Node/VPN/cloud egress, or use
--cookies/--proxy-url. - If TLS certificate verification fails, retry with
--no-check-certificateonly in restricted environments.