YouTube Processing
Convert YouTube videos into a complete Obsidian note set under the Personal vault: transcript.md, English summary, Spanish summary, and a local thumbnail.
Scope And Output
- Use only for YouTube video URLs; do not use for articles, podcasts, generic webpages, or non-YouTube videos.
- Write only under the Personal Obsidian vault. Prefer
$HOME-based paths: Linux $HOME/obsidian/Personal; macOS $HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/Personal.
- Ask for the vault path if the Personal vault cannot be found.
- Store outputs at
./Youtube/{main_topic}/{video_folder_title}/.
- Required files: English summary, Spanish summary,
transcript.md, and attachments/{safe_video_id}.jpg.
Ordered Workflow
Follow this order exactly:
- Extract canonical
video_id from the URL.
- Search
./Youtube/**/*.md for an existing matching video_id.
- Decide whether to reuse or refresh any existing
transcript.md.
- Download or read
transcript.md.
- Extract title, channel, duration, and upload date.
- Download the best available thumbnail to local
attachments/.
- Choose
main_topic, folder title, filenames, and English tags.
- Create English and Spanish summary notes.
- Verify folder structure, frontmatter, tags, local links, and Base compatibility.
Identity And Duplicate Rules
- Parse
video_id from common URL forms, including watch?v=, youtu.be/, and Shorts URLs.
- Treat
video_id as the canonical identity.
- Search before downloading anything:
rg 'video_id:\s*"?{video_id}"?' ./Youtube -g '*.md'.
- Match quoted and unquoted
video_id values.
- If a matching video folder has
transcript.md, ask exactly one question with these choices:
- Override transcript and reprocess everything.
- Reuse existing transcript and regenerate summaries only.
- If a matching summary exists but no transcript exists, download the transcript and reuse the existing folder when practical.
Transcript And Thumbnail Rules
- Use
yt-dlp or available YouTube transcript MCP/tooling for subtitle retrieval.
- If
$HOME/youtube_cookies.txt exists, pass it to yt-dlp as --cookies "$HOME/youtube_cookies.txt".
- Prefer English subtitles when available; otherwise prefer the video's original-language subtitles before any translated subtitle track.
- Save transcript text exactly as returned; do not rewrite, summarize, or translate it.
- Filename must be exactly
transcript.md.
- Include transcript frontmatter with at least
video_id, channel, and original_video.
- Save one thumbnail as
attachments/{safe_video_id}.jpg.
- Build
safe_video_id by replacing invalid filename characters (: / \\ * ? " < > |) with -.
- Try thumbnail URLs in order:
maxresdefault.jpg, hqdefault.jpg, mqdefault.jpg, default.jpg.
- Use only local thumbnail links in notes; never hotlink YouTube image URLs.
Folder, Filename, And Tag Rules
- Choose
main_topic from the first meaningful non-system tag.
- Exclude
youtube, en, and es when choosing main_topic.
- Normalize
main_topic to a lowercase slug and replace / with -, such as ai/agents becoming ai-agents.
- Derive concise natural-language filenames from each summary's
Brief Summary.
- Use spaces in filenames; do not use dash-separated slug filenames.
- Replace invalid macOS filename characters safely.
- Include at least five relevant English tags, including
youtube.
- Do not include
en or es tags.
Summary Contract
- Create exactly two summary notes per video, one English and one Spanish.
- Use
language: "en" for the English note and language: "es" for the Spanish note.
- Add
spanish_file: "{spanish_filename}.md" to the English note only.
- Make
spanish_file exactly match the Spanish filename, including spaces, capitalization, accents if present, and .md.
- Keep
thumbnail_file exactly attachments/{safe_video_id}.jpg.
- Translate directly with context awareness; do not use external translation tools.
- If the transcript is not English or Spanish, translate summaries into English, Spanish, or both as needed while keeping the transcript unchanged.
- Preserve technical terms, proper nouns, links, and code examples.
- Do not invent claims, examples, or conclusions not supported by the transcript.
Each summary must include frontmatter for original_video, channel, duration, upload_date, video_id, thumbnail_file, category, language, and tags. The English note also includes spanish_file.
Each summary body must include the local thumbnail image, ## Brief Summary, ## Key Points, and ## Comprehensive Summary with concept-focused section titles. Prioritize educational value for future study and keep key points to 15 bullets or fewer.
Completion Standard
Before reporting completion, verify: folder and required files exist; required frontmatter is present; upload_date uses YYYY-MM-DD when available; thumbnail_file and all thumbnail links are local; English spanish_file exactly matches the Spanish filename; Spanish note omits spanish_file; tags are English, include youtube, exclude en and es, and include at least five relevant tags; transcript is faithful; summaries are complete, language-specific, and transcript-grounded; duplicate detection happened before download; existing transcript flow asked whether to override or reuse; failures are reported clearly.
1---2name: youtube-processing3description: Process YouTube URLs into Obsidian-ready study notes with transcript reuse, local thumbnails, bilingual EN/ES summaries, and Personal/Youtube frontmatter compatibility. Use when the user shares one or more YouTube links and wants structured transcript plus summary notes saved to Obsidian.4---56# YouTube Processing78Convert YouTube videos into a complete Obsidian note set under the Personal vault: `transcript.md`, English summary, Spanish summary, and a local thumbnail.910## Scope And Output1112- Use only for YouTube video URLs; do not use for articles, podcasts, generic webpages, or non-YouTube videos.13- Write only under the Personal Obsidian vault. Prefer `$HOME`-based paths: Linux `$HOME/obsidian/Personal`; macOS `$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/Personal`.14- Ask for the vault path if the Personal vault cannot be found.15- Store outputs at `./Youtube/{main_topic}/{video_folder_title}/`.16- Required files: English summary, Spanish summary, `transcript.md`, and `attachments/{safe_video_id}.jpg`.1718## Ordered Workflow1920Follow this order exactly:21221. Extract canonical `video_id` from the URL.232. Search `./Youtube/**/*.md` for an existing matching `video_id`.243. Decide whether to reuse or refresh any existing `transcript.md`.254. Download or read `transcript.md`.265. Extract title, channel, duration, and upload date.276. Download the best available thumbnail to local `attachments/`.287. Choose `main_topic`, folder title, filenames, and English tags.298. Create English and Spanish summary notes.309. Verify folder structure, frontmatter, tags, local links, and Base compatibility.3132## Identity And Duplicate Rules3334- Parse `video_id` from common URL forms, including `watch?v=`, `youtu.be/`, and Shorts URLs.35- Treat `video_id` as the canonical identity.36- Search before downloading anything: `rg 'video_id:\s*"?{video_id}"?' ./Youtube -g '*.md'`.37- Match quoted and unquoted `video_id` values.38- If a matching video folder has `transcript.md`, ask exactly one question with these choices:39 - Override transcript and reprocess everything.40 - Reuse existing transcript and regenerate summaries only.41- If a matching summary exists but no transcript exists, download the transcript and reuse the existing folder when practical.4243## Transcript And Thumbnail Rules4445- Use `yt-dlp` or available YouTube transcript MCP/tooling for subtitle retrieval.46- If `$HOME/youtube_cookies.txt` exists, pass it to `yt-dlp` as `--cookies "$HOME/youtube_cookies.txt"`.47- Prefer English subtitles when available; otherwise prefer the video's original-language subtitles before any translated subtitle track.48- Save transcript text exactly as returned; do not rewrite, summarize, or translate it.49- Filename must be exactly `transcript.md`.50- Include transcript frontmatter with at least `video_id`, `channel`, and `original_video`.51- Save one thumbnail as `attachments/{safe_video_id}.jpg`.52- Build `safe_video_id` by replacing invalid filename characters (`:` `/` `\\` `*` `?` `"` `<` `>` `|`) with `-`.53- Try thumbnail URLs in order: `maxresdefault.jpg`, `hqdefault.jpg`, `mqdefault.jpg`, `default.jpg`.54- Use only local thumbnail links in notes; never hotlink YouTube image URLs.5556## Folder, Filename, And Tag Rules5758- Choose `main_topic` from the first meaningful non-system tag.59- Exclude `youtube`, `en`, and `es` when choosing `main_topic`.60- Normalize `main_topic` to a lowercase slug and replace `/` with `-`, such as `ai/agents` becoming `ai-agents`.61- Derive concise natural-language filenames from each summary's `Brief Summary`.62- Use spaces in filenames; do not use dash-separated slug filenames.63- Replace invalid macOS filename characters safely.64- Include at least five relevant English tags, including `youtube`.65- Do not include `en` or `es` tags.6667## Summary Contract6869- Create exactly two summary notes per video, one English and one Spanish.70- Use `language: "en"` for the English note and `language: "es"` for the Spanish note.71- Add `spanish_file: "{spanish_filename}.md"` to the English note only.72- Make `spanish_file` exactly match the Spanish filename, including spaces, capitalization, accents if present, and `.md`.73- Keep `thumbnail_file` exactly `attachments/{safe_video_id}.jpg`.74- Translate directly with context awareness; do not use external translation tools.75- If the transcript is not English or Spanish, translate summaries into English, Spanish, or both as needed while keeping the transcript unchanged.76- Preserve technical terms, proper nouns, links, and code examples.77- Do not invent claims, examples, or conclusions not supported by the transcript.7879Each summary must include frontmatter for `original_video`, `channel`, `duration`, `upload_date`, `video_id`, `thumbnail_file`, `category`, `language`, and `tags`. The English note also includes `spanish_file`.8081Each summary body must include the local thumbnail image, `## Brief Summary`, `## Key Points`, and `## Comprehensive Summary` with concept-focused section titles. Prioritize educational value for future study and keep key points to 15 bullets or fewer.8283## Completion Standard8485Before reporting completion, verify: folder and required files exist; required frontmatter is present; `upload_date` uses `YYYY-MM-DD` when available; `thumbnail_file` and all thumbnail links are local; English `spanish_file` exactly matches the Spanish filename; Spanish note omits `spanish_file`; tags are English, include `youtube`, exclude `en` and `es`, and include at least five relevant tags; transcript is faithful; summaries are complete, language-specific, and transcript-grounded; duplicate detection happened before download; existing transcript flow asked whether to override or reuse; failures are reported clearly.