[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CYA69XMDXWYQAN0HCD7RVS":3,"skill-same:01M6CYA69XMDXWYQAN0HCD7RVS":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6CYA69XMDXWYQAN0HCD7RVS","youtube-transcript",null,"Download YouTube video transcripts when user provides a YouTube URL or asks to download\u002Fget\u002Ffetch a transcript from YouTube. Also use when user wants to transcribe or get captions\u002Fsubtitles from a YouTube video.","eric861129\u002FSKILLS_All-in-one","eric861129","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F74950944?v=4","01M6CXHDYEYRPFGGV4EFXCSYCF","ChiYu-Huang","01M6CXHE2J5CN1EBTY0FKV3ZKW",52,"MIT","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FMedia & Content\u002Fyoutube-transcript\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"transcript","youtube transcript","youtube","transcribe","subtitles","Video","Captions","Bash","download","read","write","user","fetch","use","get","2026-11-10 10:12:30",false,"---\nname: youtube-transcript\ndescription: Download YouTube video transcripts when user provides a YouTube URL or asks to download\u002Fget\u002Ffetch a transcript from YouTube. Also use when user wants to transcribe or get captions\u002Fsubtitles from a YouTube video.\nallowed-tools: Bash,Read,Write\n---\n\n# YouTube Transcript Downloader\n\nThis skill helps download transcripts (subtitles\u002Fcaptions) from YouTube videos using yt-dlp.\n\n## When to Use This Skill\n\nActivate this skill when the user:\n- Provides a YouTube URL and wants the transcript\n- Asks to \"download transcript from YouTube\"\n- Wants to \"get captions\" or \"get subtitles\" from a video\n- Asks to \"transcribe a YouTube video\"\n- Needs text content from a YouTube video\n\n## How It Works\n\n### Priority Order:\n1. **Check if yt-dlp is installed** - install if needed\n2. **List available subtitles** - see what's actually available\n3. **Try manual subtitles first** (`--write-sub`) - highest quality\n4. **Fallback to auto-generated** (`--write-auto-sub`) - usually available\n5. **Last resort: Whisper transcription** - if no subtitles exist (requires user confirmation)\n6. **Confirm the download** and show the user where the file is saved\n7. **Optionally clean up** the VTT format if the user wants plain text\n\n## Installation Check\n\n**IMPORTANT**: Always check if yt-dlp is installed first:\n\n```bash\nwhich yt-dlp || command -v yt-dlp\n```\n\n### If Not Installed\n\nAttempt automatic installation based on the system:\n\n**macOS (Homebrew)**:\n```bash\nbrew install yt-dlp\n```\n\n**Linux (apt\u002FDebian\u002FUbuntu)**:\n```bash\nsudo apt update && sudo apt install -y yt-dlp\n```\n\n**Alternative (pip - works on all systems)**:\n```bash\npip3 install yt-dlp\n# or\npython3 -m pip install yt-dlp\n```\n\n**If installation fails**: Inform the user they need to install yt-dlp manually and provide them with installation instructions from https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp#installation\n\n## Check Available Subtitles\n\n**ALWAYS do this first** before attempting to download:\n\n```bash\nyt-dlp --list-subs \"YOUTUBE_URL\"\n```\n\nThis shows what subtitle types are available without downloading anything. Look for:\n- Manual subtitles (better quality)\n- Auto-generated subtitles (usually available)\n- Available languages\n\n## Download Strategy\n\n### Option 1: Manual Subtitles (Preferred)\n\nTry this first - highest quality, human-created:\n\n```bash\nyt-dlp --write-sub --skip-download --output \"OUTPUT_NAME\" \"YOUTUBE_URL\"\n```\n\n### Option 2: Auto-Generated Subtitles (Fallback)\n\nIf manual subtitles aren't available:\n\n```bash\nyt-dlp --write-auto-sub --skip-download --output \"OUTPUT_NAME\" \"YOUTUBE_URL\"\n```\n\nBoth commands create a `.vtt` file (WebVTT subtitle format).\n\n## Option 3: Whisper Transcription (Last Resort)\n\n**ONLY use this if both manual and auto-generated subtitles are unavailable.**\n\n### Step 1: Show File Size and Ask for Confirmation\n\n```bash\n# Get audio file size estimate\nyt-dlp --print \"%(filesize,filesize_approx)s\" -f \"bestaudio\" \"YOUTUBE_URL\"\n\n# Or get duration to estimate\nyt-dlp --print \"%(duration)s %(title)s\" \"YOUTUBE_URL\"\n```\n\n**IMPORTANT**: Display the file size to the user and ask: \"No subtitles are available. I can download the audio (approximately X MB) and transcribe it using Whisper. Would you like to proceed?\"\n\n**Wait for user confirmation before continuing.**\n\n### Step 2: Check for Whisper Installation\n\n```bash\ncommand -v whisper\n```\n\nIf not installed, ask user: \"Whisper is not installed. Install it with `pip install openai-whisper` (requires ~1-3GB for models)? This is a one-time installation.\"\n\n**Wait for user confirmation before installing.**\n\nInstall if approved:\n```bash\npip3 install openai-whisper\n```\n\n### Step 3: Download Audio Only\n\n```bash\nyt-dlp -x --audio-format mp3 --output \"audio_%(id)s.%(ext)s\" \"YOUTUBE_URL\"\n```\n\n### Step 4: Transcribe with Whisper\n\n```bash\n# Auto-detect language (recommended)\nwhisper audio_VIDEO_ID.mp3 --model base --output_format vtt\n\n# Or specify language if known\nwhisper audio_VIDEO_ID.mp3 --model base --language en --output_format vtt\n```\n\n**Model Options** (stick to `base` for now):\n- `tiny` - fastest, least accurate (~1GB)\n- `base` - good balance (~1GB) ← **USE THIS**\n- `small` - better accuracy (~2GB)\n- `medium` - very good (~5GB)\n- `large` - best accuracy (~10GB)\n\n### Step 5: Cleanup\n\nAfter transcription completes, ask user: \"Transcription complete! Would you like me to delete the audio file to save space?\"\n\nIf yes:\n```bash\nrm audio_VIDEO_ID.mp3\n```\n\n## Getting Video Information\n\n### Extract Video Title (for filename)\n\n```bash\nyt-dlp --print \"%(title)s\" \"YOUTUBE_URL\"\n```\n\nUse this to create meaningful filenames based on the video title. Clean the title for filesystem compatibility:\n- Replace `\u002F` with `-`\n- Replace special characters that might cause issues\n- Consider using sanitized version: `$(yt-dlp --print \"%(title)s\" \"URL\" | tr '\u002F' '-' | tr ':' '-')`\n\n## Post-Processing\n\n### Convert to Plain Text (Recommended)\n\nYouTube's auto-generated VTT files contain **duplicate lines** because captions are shown progressively with overlapping timestamps. Always deduplicate when converting to plain text while preserving the original speaking order.\n\n```bash\npython3 -c \"\nimport sys, re\nseen = set()\nwith open('transcript.en.vtt', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > transcript.txt\n```\n\n### Complete Post-Processing with Video Title\n\n```bash\n# Get video title\nVIDEO_TITLE=$(yt-dlp --print \"%(title)s\" \"YOUTUBE_URL\" | tr '\u002F' '_' | tr ':' '-' | tr '?' '' | tr '\"' '')\n\n# Find the VTT file\nVTT_FILE=$(ls *.vtt | head -n 1)\n\n# Convert with deduplication\npython3 -c \"\nimport sys, re\nseen = set()\nwith open('$VTT_FILE', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > \"${VIDEO_TITLE}.txt\"\n\necho \"✓ Saved to: ${VIDEO_TITLE}.txt\"\n\n# Clean up VTT file\nrm \"$VTT_FILE\"\necho \"✓ Cleaned up temporary VTT file\"\n```\n\n## Output Formats\n\n- **VTT format** (`.vtt`): Includes timestamps and formatting, good for video players\n- **Plain text** (`.txt`): Just the text content, good for reading or analysis\n\n## Tips\n\n- The filename will be `{output_name}.{language_code}.vtt` (e.g., `transcript.en.vtt`)\n- Most YouTube videos have auto-generated English subtitles\n- Some videos may have multiple language options\n- If auto-subtitles aren't available, try `--write-sub` instead for manual subtitles\n\n## Complete Workflow Example\n\n```bash\nVIDEO_URL=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=dQw4w9WgXcQ\"\n\n# Get video title for filename\nVIDEO_TITLE=$(yt-dlp --print \"%(title)s\" \"$VIDEO_URL\" | tr '\u002F' '_' | tr ':' '-' | tr '?' '' | tr '\"' '')\nOUTPUT_NAME=\"transcript_temp\"\n\n# ============================================\n# STEP 1: Check if yt-dlp is installed\n# ============================================\nif ! command -v yt-dlp &> \u002Fdev\u002Fnull; then\n    echo \"yt-dlp not found, attempting to install...\"\n    if command -v brew &> \u002Fdev\u002Fnull; then\n        brew install yt-dlp\n    elif command -v apt &> \u002Fdev\u002Fnull; then\n        sudo apt update && sudo apt install -y yt-dlp\n    else\n        pip3 install yt-dlp\n    fi\nfi\n\n# ============================================\n# STEP 2: List available subtitles\n# ============================================\necho \"Checking available subtitles...\"\nyt-dlp --list-subs \"$VIDEO_URL\"\n\n# ============================================\n# STEP 3: Try manual subtitles first\n# ============================================\necho \"Attempting to download manual subtitles...\"\nif yt-dlp --write-sub --skip-download --output \"$OUTPUT_NAME\" \"$VIDEO_URL\" 2>\u002Fdev\u002Fnull; then\n    echo \"✓ Manual subtitles downloaded successfully!\"\n    ls -lh ${OUTPUT_NAME}.*\nelse\n    # ============================================\n    # STEP 4: Fallback to auto-generated\n    # ============================================\n    echo \"Manual subtitles not available. Trying auto-generated...\"\n    if yt-dlp --write-auto-sub --skip-download --output \"$OUTPUT_NAME\" \"$VIDEO_URL\" 2>\u002Fdev\u002Fnull; then\n        echo \"✓ Auto-generated subtitles downloaded successfully!\"\n        ls -lh ${OUTPUT_NAME}.*\n    else\n        # ============================================\n        # STEP 5: Last resort - Whisper transcription\n        # ============================================\n        echo \"⚠ No subtitles available for this video.\"\n\n        # Get file size\n        FILE_SIZE=$(yt-dlp --print \"%(filesize_approx)s\" -f \"bestaudio\" \"$VIDEO_URL\")\n        DURATION=$(yt-dlp --print \"%(duration)s\" \"$VIDEO_URL\")\n        TITLE=$(yt-dlp --print \"%(title)s\" \"$VIDEO_URL\")\n\n        echo \"Video: $TITLE\"\n        echo \"Duration: $((DURATION \u002F 60)) minutes\"\n        echo \"Audio size: ~$((FILE_SIZE \u002F 1024 \u002F 1024)) MB\"\n        echo \"\"\n        echo \"Would you like to download and transcribe with Whisper? (y\u002Fn)\"\n        read -r RESPONSE\n\n        if [[ \"$RESPONSE\" =~ ^[Yy]$ ]]; then\n            # Check for Whisper\n            if ! command -v whisper &> \u002Fdev\u002Fnull; then\n                echo \"Whisper not installed. Install now? (requires ~1-3GB) (y\u002Fn)\"\n                read -r INSTALL_RESPONSE\n                if [[ \"$INSTALL_RESPONSE\" =~ ^[Yy]$ ]]; then\n                    pip3 install openai-whisper\n                else\n                    echo \"Cannot proceed without Whisper. Exiting.\"\n                    exit 1\n                fi\n            fi\n\n            # Download audio\n            echo \"Downloading audio...\"\n            yt-dlp -x --audio-format mp3 --output \"audio_%(id)s.%(ext)s\" \"$VIDEO_URL\"\n\n            # Get the actual audio filename\n            AUDIO_FILE=$(ls audio_*.mp3 | head -n 1)\n\n            # Transcribe\n            echo \"Transcribing with Whisper (this may take a few minutes)...\"\n            whisper \"$AUDIO_FILE\" --model base --output_format vtt\n\n            # Cleanup\n            echo \"Transcription complete! Delete audio file? (y\u002Fn)\"\n            read -r CLEANUP_RESPONSE\n            if [[ \"$CLEANUP_RESPONSE\" =~ ^[Yy]$ ]]; then\n                rm \"$AUDIO_FILE\"\n                echo \"Audio file deleted.\"\n            fi\n\n            ls -lh *.vtt\n        else\n            echo \"Transcription cancelled.\"\n            exit 0\n        fi\n    fi\nfi\n\n# ============================================\n# STEP 6: Convert to readable plain text with deduplication\n# ============================================\nVTT_FILE=$(ls ${OUTPUT_NAME}*.vtt 2>\u002Fdev\u002Fnull || ls *.vtt | head -n 1)\nif [ -f \"$VTT_FILE\" ]; then\n    echo \"Converting to readable format and removing duplicates...\"\n    python3 -c \"\nimport sys, re\nseen = set()\nwith open('$VTT_FILE', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > \"${VIDEO_TITLE}.txt\"\n    echo \"✓ Saved to: ${VIDEO_TITLE}.txt\"\n\n    # Clean up temporary VTT file\n    rm \"$VTT_FILE\"\n    echo \"✓ Cleaned up temporary VTT file\"\nelse\n    echo \"⚠ No VTT file found to convert\"\nfi\n\necho \"✓ Complete!\"\n```\n\n**Note**: This complete workflow handles all scenarios with proper error checking and user prompts at each decision point.\n\n## Error Handling\n\n### Common Issues and Solutions:\n\n**1. yt-dlp not installed**\n- Attempt automatic installation based on system (Homebrew\u002Fapt\u002Fpip)\n- If installation fails, provide manual installation link\n- Verify installation before proceeding\n\n**2. No subtitles available**\n- List available subtitles first to confirm\n- Try both `--write-sub` and `--write-auto-sub`\n- If both fail, offer Whisper transcription option\n- Show file size and ask for user confirmation before downloading audio\n\n**3. Invalid or private video**\n- Check if URL is correct format: `https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID`\n- Some videos may be private, age-restricted, or geo-blocked\n- Inform user of the specific error from yt-dlp\n\n**4. Whisper installation fails**\n- May require system dependencies (ffmpeg, rust)\n- Provide fallback: \"Install manually with: `pip3 install openai-whisper`\"\n- Check available disk space (models require 1-10GB depending on size)\n\n**5. Download interrupted or failed**\n- Check internet connection\n- Verify sufficient disk space\n- Try again with `--no-check-certificate` if SSL issues occur\n\n**6. Multiple subtitle languages**\n- By default, yt-dlp downloads all available languages\n- Can specify with `--sub-langs en` for English only\n- List available with `--list-subs` first\n\n### Best Practices:\n\n- ✅ Always check what's available before attempting download (`--list-subs`)\n- ✅ Verify success at each step before proceeding to next\n- ✅ Ask user before large downloads (audio files, Whisper models)\n- ✅ Clean up temporary files after processing\n- ✅ Provide clear feedback about what's happening at each stage\n- ✅ Handle errors gracefully with helpful messages\n","# YouTube Transcript Downloader\n\nThis skill helps download transcripts (subtitles\u002Fcaptions) from YouTube videos using yt-dlp.\n\n## When to Use This Skill\n\nActivate this skill when the user:\n- Provides a YouTube URL and wants the transcript\n- Asks to \"download transcript from YouTube\"\n- Wants to \"get captions\" or \"get subtitles\" from a video\n- Asks to \"transcribe a YouTube video\"\n- Needs text content from a YouTube video\n\n## How It Works\n\n### Priority Order:\n1. **Check if yt-dlp is installed** - install if needed\n2. **List available subtitles** - see what's actually available\n3. **Try manual subtitles first** (`--write-sub`) - highest quality\n4. **Fallback to auto-generated** (`--write-auto-sub`) - usually available\n5. **Last resort: Whisper transcription** - if no subtitles exist (requires user confirmation)\n6. **Confirm the download** and show the user where the file is saved\n7. **Optionally clean up** the VTT format if the user wants plain text\n\n## Installation Check\n\n**IMPORTANT**: Always check if yt-dlp is installed first:\n\n```bash\nwhich yt-dlp || command -v yt-dlp\n```\n\n### If Not Installed\n\nAttempt automatic installation based on the system:\n\n**macOS (Homebrew)**:\n```bash\nbrew install yt-dlp\n```\n\n**Linux (apt\u002FDebian\u002FUbuntu)**:\n```bash\nsudo apt update && sudo apt install -y yt-dlp\n```\n\n**Alternative (pip - works on all systems)**:\n```bash\npip3 install yt-dlp\n# or\npython3 -m pip install yt-dlp\n```\n\n**If installation fails**: Inform the user they need to install yt-dlp manually and provide them with installation instructions from https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp#installation\n\n## Check Available Subtitles\n\n**ALWAYS do this first** before attempting to download:\n\n```bash\nyt-dlp --list-subs \"YOUTUBE_URL\"\n```\n\nThis shows what subtitle types are available without downloading anything. Look for:\n- Manual subtitles (better quality)\n- Auto-generated subtitles (usually available)\n- Available languages\n\n## Download Strategy\n\n### Option 1: Manual Subtitles (Preferred)\n\nTry this first - highest quality, human-created:\n\n```bash\nyt-dlp --write-sub --skip-download --output \"OUTPUT_NAME\" \"YOUTUBE_URL\"\n```\n\n### Option 2: Auto-Generated Subtitles (Fallback)\n\nIf manual subtitles aren't available:\n\n```bash\nyt-dlp --write-auto-sub --skip-download --output \"OUTPUT_NAME\" \"YOUTUBE_URL\"\n```\n\nBoth commands create a `.vtt` file (WebVTT subtitle format).\n\n## Option 3: Whisper Transcription (Last Resort)\n\n**ONLY use this if both manual and auto-generated subtitles are unavailable.**\n\n### Step 1: Show File Size and Ask for Confirmation\n\n```bash\n# Get audio file size estimate\nyt-dlp --print \"%(filesize,filesize_approx)s\" -f \"bestaudio\" \"YOUTUBE_URL\"\n\n# Or get duration to estimate\nyt-dlp --print \"%(duration)s %(title)s\" \"YOUTUBE_URL\"\n```\n\n**IMPORTANT**: Display the file size to the user and ask: \"No subtitles are available. I can download the audio (approximately X MB) and transcribe it using Whisper. Would you like to proceed?\"\n\n**Wait for user confirmation before continuing.**\n\n### Step 2: Check for Whisper Installation\n\n```bash\ncommand -v whisper\n```\n\nIf not installed, ask user: \"Whisper is not installed. Install it with `pip install openai-whisper` (requires ~1-3GB for models)? This is a one-time installation.\"\n\n**Wait for user confirmation before installing.**\n\nInstall if approved:\n```bash\npip3 install openai-whisper\n```\n\n### Step 3: Download Audio Only\n\n```bash\nyt-dlp -x --audio-format mp3 --output \"audio_%(id)s.%(ext)s\" \"YOUTUBE_URL\"\n```\n\n### Step 4: Transcribe with Whisper\n\n```bash\n# Auto-detect language (recommended)\nwhisper audio_VIDEO_ID.mp3 --model base --output_format vtt\n\n# Or specify language if known\nwhisper audio_VIDEO_ID.mp3 --model base --language en --output_format vtt\n```\n\n**Model Options** (stick to `base` for now):\n- `tiny` - fastest, least accurate (~1GB)\n- `base` - good balance (~1GB) ← **USE THIS**\n- `small` - better accuracy (~2GB)\n- `medium` - very good (~5GB)\n- `large` - best accuracy (~10GB)\n\n### Step 5: Cleanup\n\nAfter transcription completes, ask user: \"Transcription complete! Would you like me to delete the audio file to save space?\"\n\nIf yes:\n```bash\nrm audio_VIDEO_ID.mp3\n```\n\n## Getting Video Information\n\n### Extract Video Title (for filename)\n\n```bash\nyt-dlp --print \"%(title)s\" \"YOUTUBE_URL\"\n```\n\nUse this to create meaningful filenames based on the video title. Clean the title for filesystem compatibility:\n- Replace `\u002F` with `-`\n- Replace special characters that might cause issues\n- Consider using sanitized version: `$(yt-dlp --print \"%(title)s\" \"URL\" | tr '\u002F' '-' | tr ':' '-')`\n\n## Post-Processing\n\n### Convert to Plain Text (Recommended)\n\nYouTube's auto-generated VTT files contain **duplicate lines** because captions are shown progressively with overlapping timestamps. Always deduplicate when converting to plain text while preserving the original speaking order.\n\n```bash\npython3 -c \"\nimport sys, re\nseen = set()\nwith open('transcript.en.vtt', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > transcript.txt\n```\n\n### Complete Post-Processing with Video Title\n\n```bash\n# Get video title\nVIDEO_TITLE=$(yt-dlp --print \"%(title)s\" \"YOUTUBE_URL\" | tr '\u002F' '_' | tr ':' '-' | tr '?' '' | tr '\"' '')\n\n# Find the VTT file\nVTT_FILE=$(ls *.vtt | head -n 1)\n\n# Convert with deduplication\npython3 -c \"\nimport sys, re\nseen = set()\nwith open('$VTT_FILE', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > \"${VIDEO_TITLE}.txt\"\n\necho \"✓ Saved to: ${VIDEO_TITLE}.txt\"\n\n# Clean up VTT file\nrm \"$VTT_FILE\"\necho \"✓ Cleaned up temporary VTT file\"\n```\n\n## Output Formats\n\n- **VTT format** (`.vtt`): Includes timestamps and formatting, good for video players\n- **Plain text** (`.txt`): Just the text content, good for reading or analysis\n\n## Tips\n\n- The filename will be `{output_name}.{language_code}.vtt` (e.g., `transcript.en.vtt`)\n- Most YouTube videos have auto-generated English subtitles\n- Some videos may have multiple language options\n- If auto-subtitles aren't available, try `--write-sub` instead for manual subtitles\n\n## Complete Workflow Example\n\n```bash\nVIDEO_URL=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=dQw4w9WgXcQ\"\n\n# Get video title for filename\nVIDEO_TITLE=$(yt-dlp --print \"%(title)s\" \"$VIDEO_URL\" | tr '\u002F' '_' | tr ':' '-' | tr '?' '' | tr '\"' '')\nOUTPUT_NAME=\"transcript_temp\"\n\n# ============================================\n# STEP 1: Check if yt-dlp is installed\n# ============================================\nif ! command -v yt-dlp &> \u002Fdev\u002Fnull; then\n    echo \"yt-dlp not found, attempting to install...\"\n    if command -v brew &> \u002Fdev\u002Fnull; then\n        brew install yt-dlp\n    elif command -v apt &> \u002Fdev\u002Fnull; then\n        sudo apt update && sudo apt install -y yt-dlp\n    else\n        pip3 install yt-dlp\n    fi\nfi\n\n# ============================================\n# STEP 2: List available subtitles\n# ============================================\necho \"Checking available subtitles...\"\nyt-dlp --list-subs \"$VIDEO_URL\"\n\n# ============================================\n# STEP 3: Try manual subtitles first\n# ============================================\necho \"Attempting to download manual subtitles...\"\nif yt-dlp --write-sub --skip-download --output \"$OUTPUT_NAME\" \"$VIDEO_URL\" 2>\u002Fdev\u002Fnull; then\n    echo \"✓ Manual subtitles downloaded successfully!\"\n    ls -lh ${OUTPUT_NAME}.*\nelse\n    # ============================================\n    # STEP 4: Fallback to auto-generated\n    # ============================================\n    echo \"Manual subtitles not available. Trying auto-generated...\"\n    if yt-dlp --write-auto-sub --skip-download --output \"$OUTPUT_NAME\" \"$VIDEO_URL\" 2>\u002Fdev\u002Fnull; then\n        echo \"✓ Auto-generated subtitles downloaded successfully!\"\n        ls -lh ${OUTPUT_NAME}.*\n    else\n        # ============================================\n        # STEP 5: Last resort - Whisper transcription\n        # ============================================\n        echo \"⚠ No subtitles available for this video.\"\n\n        # Get file size\n        FILE_SIZE=$(yt-dlp --print \"%(filesize_approx)s\" -f \"bestaudio\" \"$VIDEO_URL\")\n        DURATION=$(yt-dlp --print \"%(duration)s\" \"$VIDEO_URL\")\n        TITLE=$(yt-dlp --print \"%(title)s\" \"$VIDEO_URL\")\n\n        echo \"Video: $TITLE\"\n        echo \"Duration: $((DURATION \u002F 60)) minutes\"\n        echo \"Audio size: ~$((FILE_SIZE \u002F 1024 \u002F 1024)) MB\"\n        echo \"\"\n        echo \"Would you like to download and transcribe with Whisper? (y\u002Fn)\"\n        read -r RESPONSE\n\n        if [[ \"$RESPONSE\" =~ ^[Yy]$ ]]; then\n            # Check for Whisper\n            if ! command -v whisper &> \u002Fdev\u002Fnull; then\n                echo \"Whisper not installed. Install now? (requires ~1-3GB) (y\u002Fn)\"\n                read -r INSTALL_RESPONSE\n                if [[ \"$INSTALL_RESPONSE\" =~ ^[Yy]$ ]]; then\n                    pip3 install openai-whisper\n                else\n                    echo \"Cannot proceed without Whisper. Exiting.\"\n                    exit 1\n                fi\n            fi\n\n            # Download audio\n            echo \"Downloading audio...\"\n            yt-dlp -x --audio-format mp3 --output \"audio_%(id)s.%(ext)s\" \"$VIDEO_URL\"\n\n            # Get the actual audio filename\n            AUDIO_FILE=$(ls audio_*.mp3 | head -n 1)\n\n            # Transcribe\n            echo \"Transcribing with Whisper (this may take a few minutes)...\"\n            whisper \"$AUDIO_FILE\" --model base --output_format vtt\n\n            # Cleanup\n            echo \"Transcription complete! Delete audio file? (y\u002Fn)\"\n            read -r CLEANUP_RESPONSE\n            if [[ \"$CLEANUP_RESPONSE\" =~ ^[Yy]$ ]]; then\n                rm \"$AUDIO_FILE\"\n                echo \"Audio file deleted.\"\n            fi\n\n            ls -lh *.vtt\n        else\n            echo \"Transcription cancelled.\"\n            exit 0\n        fi\n    fi\nfi\n\n# ============================================\n# STEP 6: Convert to readable plain text with deduplication\n# ============================================\nVTT_FILE=$(ls ${OUTPUT_NAME}*.vtt 2>\u002Fdev\u002Fnull || ls *.vtt | head -n 1)\nif [ -f \"$VTT_FILE\" ]; then\n    echo \"Converting to readable format and removing duplicates...\"\n    python3 -c \"\nimport sys, re\nseen = set()\nwith open('$VTT_FILE', 'r') as f:\n    for line in f:\n        line = line.strip()\n        if line and not line.startswith('WEBVTT') and not line.startswith('Kind:') and not line.startswith('Language:') and '-->' not in line:\n            clean = re.sub('\u003C[^>]*>', '', line)\n            clean = clean.replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '\u003C')\n            if clean and clean not in seen:\n                print(clean)\n                seen.add(clean)\n\" > \"${VIDEO_TITLE}.txt\"\n    echo \"✓ Saved to: ${VIDEO_TITLE}.txt\"\n\n    # Clean up temporary VTT file\n    rm \"$VTT_FILE\"\n    echo \"✓ Cleaned up temporary VTT file\"\nelse\n    echo \"⚠ No VTT file found to convert\"\nfi\n\necho \"✓ Complete!\"\n```\n\n**Note**: This complete workflow handles all scenarios with proper error checking and user prompts at each decision point.\n\n## Error Handling\n\n### Common Issues and Solutions:\n\n**1. yt-dlp not installed**\n- Attempt automatic installation based on system (Homebrew\u002Fapt\u002Fpip)\n- If installation fails, provide manual installation link\n- Verify installation before proceeding\n\n**2. No subtitles available**\n- List available subtitles first to confirm\n- Try both `--write-sub` and `--write-auto-sub`\n- If both fail, offer Whisper transcription option\n- Show file size and ask for user confirmation before downloading audio\n\n**3. Invalid or private video**\n- Check if URL is correct format: `https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID`\n- Some videos may be private, age-restricted, or geo-blocked\n- Inform user of the specific error from yt-dlp\n\n**4. Whisper installation fails**\n- May require system dependencies (ffmpeg, rust)\n- Provide fallback: \"Install manually with: `pip3 install openai-whisper`\"\n- Check available disk space (models require 1-10GB depending on size)\n\n**5. Download interrupted or failed**\n- Check internet connection\n- Verify sufficient disk space\n- Try again with `--no-check-certificate` if SSL issues occur\n\n**6. Multiple subtitle languages**\n- By default, yt-dlp downloads all available languages\n- Can specify with `--sub-langs en` for English only\n- List available with `--list-subs` first\n\n### Best Practices:\n\n- ✅ Always check what's available before attempting download (`--list-subs`)\n- ✅ Verify success at each step before proceeding to next\n- ✅ Ask user before large downloads (audio files, Whisper models)\n- ✅ Clean up temporary files after processing\n- ✅ Provide clear feedback about what's happening at each stage\n- ✅ Handle errors gracefully with helpful messages\n",{"name":5,"description":7,"allowed-tools":47},"Bash,Read,Write","main","cbdd44aae21131521c09e42762e36178c790eacf","public\u002FSKILLS\u002FMedia & Content\u002Fyoutube-transcript",13,"https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one","http:\u002F\u002Fhuangchiyu.com\u002FSKILLS_All-in-one\u002F","https:\u002F\u002Fgithub.com\u002Feric861129","https:\u002F\u002Fhuangchiyu.com\u002FChiYu-Blog\u002F","開發工程師，專注於 C#／.NET 系統現代化、AI-assisted engineering、開源工具與技術寫作。","2026-04-16 14:28:14",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add eric861129\u002FSKILLS_All-in-one --skill youtube-transcript",{"tool":64,"command":65},"bunx","bunx skills add eric861129\u002FSKILLS_All-in-one --skill youtube-transcript",{"tool":67,"command":68},"pnpm","pnpm dlx skills add eric861129\u002FSKILLS_All-in-one --skill youtube-transcript","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FMedia & Content\u002Fyoutube-transcript\u002FSKILL.md",true,[],[73,99,131,159,183,203],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":80,"publishedAt":42},"01M6CZ1WR3KNVTKSWH4GNWT646","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fwhat-if-oracle\u002FSKILL.md",[79],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[81,82,83,84,85,86,87,88,89,90,91,92,93,36,37,94,95,96,97,98],"oracle","what if oracle","go","run","planning","ux","futures","risk","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":117,"publishedAt":42},"01M6CZ1QHGJE91A95MSN5EK5Q9","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fvenue-templates\u002FSKILL.md",[105,108,111,112],{"categoryNo":106,"categoryName":107,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":109,"categoryName":110,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[118,119,120,121,122,123,124,125,34,126,36,37,127,128,129,130],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","access","edit","proposals","Academic","requirements",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":141,"publishedAt":42},"01M6CZ1KBQD2E5RTFB3BGVX7CD","the-fool","Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fthe-fool\u002FSKILL.md",[137,138],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":139,"categoryName":140,"taxonomyType":115,"taxonomyTypeDesc":116},"01JBSEEDCAT000000000000030","开发工程师",[142,143,83,144,145,84,146,147,148,149,150,151,152,153,128,154,155,156,157,158],"the fool","review","workflow","architecture","code","audit","forge","devil","team","designer","reviewer","challenge","stress test","evidence","expert","poke","ideas",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":168,"publishedAt":42},"01M6CZ1ES826S7P1X3333E40TA","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-writing\u002FSKILL.md",[165,166,167],{"categoryNo":106,"categoryName":107,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":113,"categoryName":114,"taxonomyType":115,"taxonomyTypeDesc":116},[169,170,121,171,172,173,174,175,34,176,36,37,127,40,177,178,179,180,181,182],"writing","scientific writing","core","reporting","deep research","Citations","Outlines","tool","never","structure","deep","full","stage","prisma",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":190,"publishedAt":42},"01M6CZ1B2JGJTB9FRD0TW4RXXE","scientific-brainstorming","Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fscientific-brainstorming\u002FSKILL.md",[189],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[191,192,120,193,85,194,195,196,40,197,198,199,95,200,201,181,202],"brainstorming","scientific brainstorming","sessions","data","hypothesis","open","ideation","creative","do","connections","research ideation","generation",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":215,"publishedAt":42},"01M6CZ16JG8N7A2ZX04BGE8J2Y","research-lookup","Look up current research information using the Parallel Chat API (primary) or Perplexity sonar-pro-search (academic paper searches). Automatically routes queries to the best backend. Use for finding papers, gathering research data, and verifying scientific information.","https:\u002F\u002Fgithub.com\u002Feric861129\u002FSKILLS_All-in-one\u002Fblob\u002Fmain\u002Fpublic\u002FSKILLS\u002FWriting & Research\u002Fresearch-lookup\u002FSKILL.md",[209,212,213,214],{"categoryNo":210,"categoryName":211,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":109,"categoryName":110,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":139,"categoryName":140,"taxonomyType":115,"taxonomyTypeDesc":116},[120,216,217,218,194,219,220,34,221,222,36,37,127,40,223,224,225,226,227,129],"lookup","research lookup","search","perplexity","api","parallel","openrouter","backend","up","look","queries","chat"]