Detailed Video Summary
Video link provided by the user: $ARGUMENTS
Step 0 — Determine the input type
-
No link, question about past videos → go to the "Archive Query" section at the bottom; do not fetch a new transcript.
-
Single video link → go straight to Step 1.
-
Multiple video links → run each through Steps 1-3 in order. Each video gets its own full summary (same format), separated by
---, and each is saved to its own file. You may add a 1-2 sentence note at the very end about what the videos share/differ on (not a report). -
Playlist link (URL containing
/playlist?list=and nov=) → fetch the list first:bash ~/.claude/skills/video-summary/fetch_transcript.sh --list "<PLAYLIST_URL>"Each line gives
url | title | duration.- 5 videos or fewer: process them all in order (like multiple links).
- More than 5: first show the user the video count and title list; ask whether they want all of them, the first N, or a selection. Do not start processing without confirmation.
-
Mixed video + playlist URL (
watch?v=...&list=...) → summarize only that single video; at the end of the summary mention in one sentence that the link belongs to a playlist and you can summarize the rest if they want.
Step 1 — Fetch the transcript
Run:
bash ~/.claude/skills/video-summary/fetch_transcript.sh "<VIDEO_URL>"
The script prints:
=== VIDEO INFO ===— title, channel, duration, date=== CHAPTERS ===— timestamped list if the uploader defined chapters (section absent otherwise)=== TRANSCRIPT ===— clean timestamped transcript
Notes:
- Previously fetched videos are read instantly from the
~/VideoSummaries/transcripts/<video-id>.txtarchive (you'll see a(Transcript read from archive: ...)line) — no internet needed. - If the transcript is very long (script output gets truncated), redirect the output to a scratchpad file and read it in chunks — skip nothing.
- For videos without subtitles, if whisper is installed the script downloads the audio and transcribes it locally — this can take minutes, so run the command with a long timeout (600000 ms). A "(No subtitles — ... whisper ...)" line on stderr indicates this path.
- If it returns "ERROR: no subtitles" + "WHISPER_SUGGESTION": tell the user the video has no subtitles and that installing whisper (relay the install commands from the error message) would let them summarize it too. Never fabricate an analysis without a transcript.
- If it returns "ERROR: could not fetch video info" + "COOKIE_SUGGESTION":
do NOT retry with cookies on your own — tell the user YouTube is blocking
the request and ask whether they want to retry with browser cookies. If
they approve, rerun the same command with the
COOKIES=1environment variable (mention that a macOS Keychain permission prompt may appear).
Step 2 — Write the detailed summary
The goal is a DETAILED SUMMARY: someone who hasn't watched the video should learn every main topic, argument, and key number — but this is NOT a retelling of the transcript. Skip no main topic; don't relay every sentence or side example within a topic.
Target length: ~300-450 words total for a 15-minute video; scale up proportionally for longer videos but never exceed one page (~700 words).
Language: always write the summary in the language the user is communicating in (regardless of the video's language). If unclear, use the video's language.
Structure:
# <Video Title>
**Channel:** ... · **Duration:** ... · **Date:** ...
## Overview
The video's topic and core message (2-3 sentences).
## Main Topics
One bullet per main topic in the video (a typical video has 4-8):
- **[MM:SS] Topic title** — the essence of that topic in 2-4 sentences:
the main idea, any critical number/example, the conclusion reached.
Section headings: if the script output has `=== CHAPTERS ===`, build the
bullets from those chapters and timestamps (translate the titles to the
output language; skip content-free chapters like intros/sponsors, merge
very short consecutive ones into a single bullet). If there are no
CHAPTERS, identify the topic transitions from the transcript yourself.
## Conclusion
The speaker's final takeaway and recommended action for the viewer
(2-4 sentences). If you have your own comment/caveat, add it at the very
end in a single sentence, clearly separated.
Rules:
- Never include intros, subscribe calls, sponsor reads, or announcements.
- Take timestamps from the
[MM:SS]markers in the transcript; never invent them. - Clickable timestamps: for YouTube videos, turn every
[MM:SS]stamp into a link to that second of the video:[06:09](https://youtu.be/<VIDEO_ID>?t=369)(t = total seconds). Apply this both in the chat output and in the saved file. For non-YouTube sources leave the stamp as plain text; don't fabricate links. - Add no information that isn't in the transcript.
- If there are 1-2 truly striking quotes, include them inside the relevant bullet; don't open a separate section.
- If the user asks to "go deeper" or about a specific part, the transcript is in context — expand that part as much as they want.
- Visual suggestion: if the transcript has 3+ visual references ("this chart", "that table", "on screen", "as you can see here", etc.), append a single line to the end of the summary: "📊 This video looks visual-heavy — I can also analyze its charts/screenshots if you'd like." If the user approves, switch to Visual Analysis Mode. If there are no visual references, don't add the note.
Step 3 — Save the summary to the archive
The chat message is the primary deliverable: ALWAYS print the full summary in the conversation first. The archive file is only an extra copy — never skip the chat output and just write the file, and never replace the summary with a pointer to the file.
After printing the summary in chat, save the same content with the Write tool to:
~/VideoSummaries/<YYYY-MM-DD>-<video-title-kebab-case>.md
(Date = today. Shorten the title to lowercase, ASCII, hyphen-separated; max 60 characters.)
Add this metadata block at the very top of the file:
> **Video:** <URL>
> **Summarized:** YYYY-MM-DD
In your final message, tell the user the file path in a single line.
Visual Analysis Mode — when the user approves or asks upfront
When the user approves visual analysis (or asks upfront with something like "including the charts"), do this ON TOP OF the transcript summary:
-
Pick the moments: collect the seconds of visual-reference moments from the transcript (where the speaker says "look at this", "this chart"). If there are no clear moments, use
auto(scene-change detection). -
Extract the frames (can take a while — use a 600000 ms timeout):
bash ~/.claude/skills/video-summary/extract_frames.sh "<URL>" "<scratchpad>/frames" "369,430,585"The last argument is the seconds list; omit it for
auto. The script prints the frame file paths (frame_006-09.jpg= 06:09). At most 12 frames are extracted. -
View the frames with Read and interpret them.
-
Write a "## Visual Analysis" section: for each significant frame, a clickable timestamp + what the image shows + how it connects to the speaker's claim at that moment. Skip frames with no information (just a face, an intro screen).
-
Append the section to the saved summary file too (with Edit).
-
If the script says "ffmpeg is not installed", relay the
brew install ffmpegsuggestion; if it says no scene changes were found, tell the user the video is visually static (nothing to analyze). -
If the script says "could not download" + "COOKIE_SUGGESTION": do NOT retry with cookies on your own — tell the user YouTube is blocking the download and ask whether they want to retry with browser cookies. If they approve, rerun the same command with the
COOKIES=1environment variable (mention that a macOS Keychain permission prompt may appear).
Archive Query — no link, question about past videos
When the user asks about previously summarized videos without a URL ("what did the video I summarized last week say about X", "what's in my archive about Y", "what were the common themes of last month's videos"):
- Broad scan: Grep the
~/VideoSummaries/*.mdsummaries for keywords. Alongside the user's language, also try likely English equivalents (summaries follow the user's language but quotes/terms may be in the video's original language). - Drill down: Read the matching summaries. If the summary isn't
enough (exact wording, context, or a detail that didn't make the
summary), go to the raw transcript of the same video: take the video ID
from the URL in the summary's metadata block and read/grep
~/VideoSummaries/transcripts/<video-id>.txt. - Cited answers: Give every fact with its source — video title, summary date, timestamp. Make timestamps clickable here too (the video URL is in the summary's metadata block). Never fill gaps from memory or guesswork; if it's not in the archive, say so explicitly.
- Date filters: File names follow
YYYY-MM-DD-title.md— filter ranges like "last month" by file name. - This mode is fully local: no YouTube, no internet.