youtube-to-slides
Original:🇺🇸 English
Translated
20 scripts
Convert a YouTube video into infographic slides. Extracts transcript, segments into sections, summarizes, and generates stylized infographic images using Gemini AI. 5 styles: davinci, magazine, comic, geek, chalkboard. Use when user wants slide summaries from YouTube.
2installs
Added on
NPX Install
npx skill4agent add ambershen/youtube-to-slides youtube-to-slidesTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →youtube-to-slides
Convert YouTube videos into beautiful infographic slide decks.
Natural Language Examples
Users can invoke this skill with natural language. Here are examples of what they might say and how to handle each:
Setup and troubleshooting:
- "Set up youtube-to-slides" → Run
setup.sh - "Check if youtube-to-slides is ready" → Run
check-env.sh - "I need to configure my API keys" → Guide to setup
.env - "It's not working" → Run , read diagnostics, consult
check-env.shreferences/TROUBLESHOOTING.md
Generate slides:
- "Generate slides from https://youtu.be/VIDEO_ID"
- "Convert this YouTube video to slides: https://youtube.com/watch?v=VIDEO_ID"
- "Make infographic slides from https://youtu.be/VIDEO_ID in comic style"
- "Create 5 magazine-style slides from https://youtu.be/VIDEO_ID"
- "Turn this video into slides https://youtu.be/VIDEO_ID --style geek"
Choose a style:
- "Use the davinci style" →
--style davinci - "Make it look like a magazine" →
--style magazine - "Comic book style please" →
--style comic - "Geek / bulletin board style" →
--style geek - "Chalkboard style" →
--style chalkboard
Control slide count:
- "Just give me 4 slides" →
--max-sections 4 - "Make as many slides as needed" →
--max-sections 0
Preview without generating images:
- "Do a dry run first"
- "Just show me the prompts, don't generate images yet"
Argument Parsing
Parse to extract:
$ARGUMENTS- url (required) — YouTube video URL. Supports formats: ,
https://youtu.be/ID,https://www.youtube.com/watch?v=IDhttps://youtube.com/watch?v=ID - --style (optional, default: ) — One of:
davinci,davinci,magazine,comic,geekchalkboard - --max-sections (optional, default: ) — Maximum number of slide sections to generate. Use
8for unlimited.0 - --dry-run (optional) — Show prompts without generating images
- --ar (optional, default: ) — Aspect ratio:
16:9,16:9, or4:31:1
If no URL is provided, ask the user for one. If the URL looks invalid (not a YouTube URL), tell the user and ask for a valid one.
For style guidance, read in this skill directory.
references/STYLES.mdExecution Steps
Step 1: Pre-flight Check
Run the environment check script:
bash
bash "$SKILL_DIR/scripts/check-env.sh"- If it exits 0, proceed to Step 2.
- If it exits non-zero, read its output for diagnostics:
- Missing virtual environment or package — Run the setup script:
Then re-runbash
bash "$SKILL_DIR/scripts/setup.sh"to confirm.check-env.sh - Missing API keys — Tell the user:
- Copy the example env file:
cp "$SKILL_DIR/.env.example" "$SKILL_DIR/.env" - Add their Gemini API key (get one free at https://aistudio.google.com/apikey)
- Add their YouTube Data API key (get one at https://console.cloud.google.com/apis/credentials — enable YouTube Data API v3 first)
- See for detailed setup steps.
references/TROUBLESHOOTING.md
- Copy the example env file:
- After fixing, re-run to confirm everything passes.
check-env.sh
- Missing virtual environment or package — Run the setup script:
If the user just asks to "set up" or "install" the skill, run both and , then report the result.
setup.shcheck-env.shStep 2: Run the Pipeline
Build the command from parsed arguments and run:
bash
bash "$SKILL_DIR/scripts/run.sh" "<url>" --style <style> --max-sections <max_sections> --ar <ar>Add flag if requested.
--dry-runThis takes 3-5 minutes for a full run. Inform the user that generation is in progress and what style/settings are being used.
Step 3: Present Results
After successful completion:
- Determine the video ID from the URL (the 11-character ID, e.g. from
twzLDx9iers)https://youtu.be/twzLDx9iers - Read to get the list of generated slides
output/<video_id>/metadata.json - Present a summary to the user:
- Video title and channel
- Style used
- Number of slides generated
- List each slide with its title and file path
- Show the user how to open the slides:
bash
open output/<video_id>/
Error Handling
If the pipeline fails, check output for common errors and consult :
references/TROUBLESHOOTING.md- 429 Rate Limit — Gemini rate limit hit. The tool has built-in retry logic. If it still fails, suggest waiting 60 seconds and retrying.
- No transcript available — The video may not have captions. Inform the user.
- Invalid URL — Ask the user for a valid YouTube URL.
- API key errors — Guide user to set up their file with valid keys.
.env
Variable Reference
- — Absolute path to this skill's directory (
$SKILL_DIR)skills/youtube-to-slides/ - — Raw argument string passed by the user
$ARGUMENTS