video-fetch-and-summarize
Skill21 starsChanged 7 months agoMITView on GitHub
Downloads videos from URLs and generates a Markdown summary for each one using the Gemini API. Supports custom prompts to extract specific information instead of the default summary. Each video is saved in its own subfolder containing the MP4 file and a summary.md. Use this skill when the user provides video URLs directly, or a file (Markdown, TXT, or any text file) containing video URLs, and wants both the video downloaded and summarized. Triggers on requests like "download and summarize these videos", "fetch these links and summarize", "process this list of video links", "extract X from these videos", or when given a file with URLs and asked for summaries. Supports Instagram, YouTube, TikTok, Twitter/X, Facebook, and 1000+ other platforms. Requires GEMINI_API_KEY environment variable.
- Reads credentials
In this repository22 other files it gives its agents.
- 2d-pixel-assetSkill
- anthropic-skilljar-extractorSkill
- audio-to-midiSkill
- auto-researchSkill
- gemini-image-genSkill
- gemini-web-media-analysisSkill
- google-ai-studio-ttsSkill
- hermes-tweetSkill
- link-downloadSkill
- llama-cppSkill
- meta-muse-video-analysisSkill
- midi-synthSkill
- opencodeSkill
- seedanceSkill
- tech-product-landingSkill
- unreal-best-practicesSkill
- unreal-blueprint-codegenSkill
- unreal-gasSkill
- unreal-pcg-pythonSkill
- unreal-thirdpartySkill
- video-downloadSkill
- video-summarizerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
When the user invokes this skill:
- Very specific: line 61
If the user specifies a custom prompt or extraction goal (e.g., "extract all tools mentioned", "summarize focusing on pricing", "list …
- Very specific: line 63
If the user provides a prompt file path, pass it via --prompt-file path/to/file.txt.
- Very specific: line 64
If the user gives no specific instructions, run without --prompt to use the default format.
- Distinctive: line 126
If the Gemini API returns 503 (overloaded), re-run the script — already-done videos are skipped automatically
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Video Fetch & Summarize
Downloads videos from URLs and generates a Markdown summary per video via Gemini. Fully self-contained — no other skills required.
Output Structure
<output_dir>/
<Video_Title>/
<uploader>_<id>.mp4
summary.mdPrerequisites
GEMINI_API_KEYenv var setyt-dlpandgoogle-genai— auto-installed on first run if missing- Python available as
py(Windows) orpython3
Script
scripts/fetch_and_summarize.py
Usage
# Direct URLs — default summary
py scripts/fetch_and_summarize.py "https://..." "https://..." -o ./output
# File containing URLs (TXT, Markdown, or any text file)
py scripts/fetch_and_summarize.py links.txt -o ./output
# Custom prompt (inline) — replaces default summary format
py scripts/fetch_and_summarize.py "https://..." --prompt "Extract all mentioned tools and prices"
# Custom prompt (from file) — replaces default summary format
py scripts/fetch_and_summarize.py links.txt --prompt-file my-prompt.txt
# With browser cookies (for private/login-required content)
py scripts/fetch_and_summarize.py links.txt --cookies-from-browser chromeHow Claude should handle user arguments
When the user invokes this skill:
- If the user specifies a custom prompt or extraction goal (e.g., "extract all tools mentioned",
"summarize focusing on pricing", "list action items"), pass it via
--prompt "...". - If the user provides a prompt file path, pass it via
--prompt-file path/to/file.txt. - If the user gives no specific instructions, run without
--promptto use the default format. - A custom prompt completely replaces the default — it does not add to it.
Workflow
- Extract all URLs from provided arguments and/or files (regex-based, works with any text format)
- For each URL:
a. Fetch video metadata via
yt-dlp --dump-jsonto get the title for the folder name b. Download the video as best-quality MP4 into<output>/<Title>/c. Upload MP4 to the Gemini Files API, wait for ACTIVE state d. Generate Markdown summary (using custom or default prompt), delete file from Gemini storage e. Save summary as<output>/<Title>/summary.md - Skip videos where both MP4 and summary.md already exist (idempotent re-runs)
Download Details (yt-dlp)
- Format:
bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best— best quality, always MP4 - Filename pattern:
{uploader}_{video_id}.mp4— e.g.DesignMotion_DUf3nehjIg7.mp4 --no-playlistis set by default (single videos only)- Supported platforms: YouTube, Instagram (posts/reels), TikTok, Twitter/X, Facebook, Vimeo, Reddit, and 1000+ more
Authentication for private/login-required content
py scripts/fetch_and_summarize.py links.txt --cookies-from-browser chrome
# also works with: firefox, edge, safariThe user must be logged in to the platform in the specified browser.
Summarization Details (Gemini)
- Model:
gemini-3-flash-preview - Upload via Gemini Files API (supports large video files)
- Uploaded files are auto-deleted from Gemini storage after generation (48h max limit anyway)
- Summary language matches the language spoken/shown in the video
Default output format (when no custom prompt is given)
# [Video Title]
## Summary
[2-3 sentence description of the video and its main topic]
## Key Points
- key point 1
- key point 2
- ...
## Core Content & Takeaways
[Central message and most important insight, 2-4 sentences]
---
*Auto-generated with Gemini API*Notes
- Output directory defaults to the current working directory
- Folder names are sanitized from the video title (max 80 chars, special chars replaced)
- Already-processed videos are skipped on re-runs
- If the Gemini API returns 503 (overloaded), re-run the script — already-done videos are skipped automatically
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

