{"success":true,"name":"youtube-content","description":"YouTube transcripts to summaries, threads, blogs.","category":"media","path":"media/youtube-content/SKILL.md","file":"SKILL.md","content":"---\nname: youtube-content\ndescription: \"YouTube transcripts to summaries, threads, blogs.\"\nversion: 1.0.0\nauthor: Teknium (teknium1), Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [YouTube, Video, Transcripts, Media]\n    related_skills: []\n---\n\n# YouTube Content Tool\n\n## When to use\n\nUse when the user shares a YouTube URL or video link, asks to summarize a video, requests a transcript, or wants to extract and reformat content from any YouTube video. Transforms transcripts into structured content (chapters, summaries, threads, blog posts).\n\nExtract transcripts from YouTube videos and convert them into useful formats.\n\n## Setup\n\nUse `terminal` with the Python from a PM-prepared Hermes source checkout. The\n`youtube` extra declares the helper's dependency; do not install packages into\nHermes with raw pip or project-discovering `uv run`.\n\nFrom that checkout, first follow the isolated development-home setup in\n[Package Management](https://hermes-agent.nousresearch.com/docs/reference/package-management#developer-workflow),\nthen prepare the extra and reactivate before running the helper:\n\n```bash\nsource ./activate\npython -c \"import pm; pm.sync_venv(['youtube'], explicit=True)\"\nsource ./activate\npython -c \"import youtube_transcript_api; print(youtube_transcript_api.__file__)\"\n```\n\nOn Windows, use `. .\\activate.ps1` instead of `source ./activate`. If the terminal\nruns on a different host or in a sandbox, use an explicitly isolated helper\nenvironment there, not the agent's production environment. Run every command\nbelow with the interpreter whose import check succeeded.\n\n## Helper Script\n\n`SKILL_DIR` is the directory containing this SKILL.md file. The script accepts any standard YouTube URL format, short links (youtu.be), shorts, embeds, live links, or a raw 11-character video ID.\n\n```bash\n# JSON output with metadata\npython SKILL_DIR/scripts/fetch_transcript.py \"https://youtube.com/watch?v=VIDEO_ID\"\n\n# Plain text (good for piping into further processing)\npython SKILL_DIR/scripts/fetch_transcript.py \"URL\" --text-only\n\n# With timestamps\npython SKILL_DIR/scripts/fetch_transcript.py \"URL\" --timestamps\n\n# Specific language with fallback chain\npython SKILL_DIR/scripts/fetch_transcript.py \"URL\" --language tr,en\n```\n\n## Output Formats\n\nAfter fetching the transcript, format it based on what the user asks for:\n\n- **Chapters**: Group by topic shifts, output timestamped chapter list\n- **Summary**: Concise 5-10 sentence overview of the entire video\n- **Chapter summaries**: Chapters with a short paragraph summary for each\n- **Thread**: Twitter/X thread format — numbered posts, each under 280 chars\n- **Blog post**: Full article with title, sections, and key takeaways\n- **Quotes**: Notable quotes with timestamps\n\n### Example — Chapters Output\n\n```\n00:00 Introduction — host opens with the problem statement\n03:45 Background — prior work and why existing solutions fall short\n12:20 Core method — walkthrough of the proposed approach\n24:10 Results — benchmark comparisons and key takeaways\n31:55 Q&A — audience questions on scalability and next steps\n```\n\n## Workflow\n\n1. **Fetch** the transcript using `terminal` and the prepared Python with `--text-only --timestamps`.\n2. **Validate**: confirm the output is non-empty and in the expected language. If empty, retry without `--language` to get any available transcript. If still empty, tell the user the video likely has transcripts disabled.\n3. **Chunk if needed**: if the transcript exceeds ~50K characters, split into overlapping chunks (~40K with 2K overlap) and summarize each chunk before merging.\n4. **Transform** into the requested output format. If the user did not specify a format, default to a summary.\n5. **Verify**: re-read the transformed output to check for coherence, correct timestamps, and completeness before presenting.\n\n## Error Handling\n\n- **Transcript disabled**: tell the user; suggest they check if subtitles are available on the video page.\n- **Private/unavailable video**: relay the error and ask the user to verify the URL.\n- **No matching language**: retry without `--language` to fetch any available transcript, then note the actual language to the user.\n- **Dependency missing**: repeat PM preparation and reactivation above, then verify the helper uses that Python. Do not repair the selected generation with pip.\n","linked_files":["references/output-formats.md","scripts/fetch_transcript.py"],"origin":"brimind","owner_id":null,"source":"router"}