Turn any video or audio lecture into well-structured study notes and a formatted Word document. Accepts a video URL (YouTube, Vimeo, Facebook, ... any site yt-dlp supports), a YouTube id, a local video/audio file, or an existing transcript (pasted or uploaded: VTT, SRT, TTML, a YouTube "Show transcript" copy, or plain text). Fetches or cleans the transcript (captions first, ASR audio transcription as fallback), then builds notes with overview, chapter-by-chapter sections with inline timestamp...
2 stars
0 votes
0 copies
0 views
Added December 3, 2026
ai-agentspythongoshellbashapibackend
Works with
claude code
cli
api
mcp
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Video Notes?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/rafiul254-video-notes)
---
name: video-notes
description: >-
Turn any video or audio lecture into well-structured study notes and a
formatted Word document. Accepts a video URL (YouTube, Vimeo, Facebook,
... any site yt-dlp supports), a YouTube id, a local video/audio file, or
an existing transcript (pasted or uploaded: VTT, SRT, TTML, a YouTube
"Show transcript" copy, or plain text). Fetches or cleans the transcript
(captions first, ASR audio transcription as fallback), then builds notes
with overview, chapter-by-chapter sections with inline timestamps, key
takeaways, review questions and a glossary — any length, even a 3-5 hour
lecture, in any notes language. Use this skill whenever the user shares a
video link or a recording and wants notes, a summary, a transcript or
study material from it ("ei video theke note banao", "summarize this
lecture", "5 ghontar lecture er note chai"), and also when the user
pastes or uploads a transcript and wants structured notes from it.
license: MIT
---
# Video Notes — any video → transcript + structured study notes
One compact skill for the whole job: any video or audio input → a
timestamped transcript and a well-structured notes document (.docx). A
5-hour lecture works the same way as a 10-minute talk — the transcript is
processed in parts, so nothing overflows any context window.
## Inputs — accept any of these
| The user gives you | Do this |
|---|---|
| a video URL (YouTube / Vimeo / Facebook / any site yt-dlp supports) | `fetch_transcript.py "URL" --out WORK` — yt-dlp captions, else audio → ASR; YouTube also has a Piped fallback route |
| a video URL **and** a transcript connector is connected (MCP — see "Transcript connector" below) | call the connector's transcript tool with the URL, save what it returns as `raw.txt`, then clean it like a raw transcript (route 0 / inline rules — no copy-paste needed) |
| a YouTube link or an 11-char video id | same — pass it as SOURCE |
| a local video/audio file (`.mp4` / `.m4a` / `.mp3` ...) | same — pass the path; transcribed with ASR, no network needed |
| a raw transcript (pasted text, or an uploaded `.txt` / `.srt` / `.vtt` / `.ttml`) | paste → save as `raw.txt` first, then `fetch_transcript.py raw.txt --out WORK --title "Lecture title"` — all 5 formats are auto-detected and cleaned |
## Where this runs — detect your environment (3 cases)
- **z.ai environment** (`z-ai` CLI present): everything runs by itself.
`make_notes.py` calls the LLM itself (engine `zai`), ASR uses the z-ai API.
- **Claude Code or any other agent with a shell** (no `z-ai` CLI):
`make_notes.py` auto-runs with engine `agent` — it splits the transcript
into per-part files in `WORK/chunk_notes/` and writes
`WORK/chunk_notes/AGENT_PLAN.md`. **YOU (the agent) must then follow
AGENT_PLAN.md**: read each `transcript_part_NN.md` one at a time, write
`part_NN.md` and `overview.md` yourself (the plan file contains the exact
format rules), then run `make_notes.py --dir WORK --assemble` to build
`notes.md`. Working part by part keeps your context small even for a
5-hour lecture. Non-English ASR needs local whisper there:
`pip install -U openai-whisper` (auto-detected; ~100 languages including
Bengali — unlike the z-ai ASR, which is English/Chinese only).
- **claude.ai web (this skill uploaded as a zip)**: the code sandbox there
has **no internet access and no shell**, so the bundled scripts CANNOT
run — do not try. First get the transcript:
- **A transcript connector is connected** (Settings → Connectors, e.g.
TranscriptFetch — setup in "Transcript connector" below): call its
transcript tool with the video URL yourself — no user copy-paste
needed at all.
- **No connector**: ask the user for the transcript in any format: a
paste from the video's *Show transcript* panel (description /
`...` menu), an uploaded `.txt`/`.srt`/`.vtt` file, or the companion
local tool `youtube_transcript_tool.html` (single file, runs in any
browser, no install: URL → transcript).
Either way, clean it INLINE yourself:
timestamps `h:mm:ss` / `m:ss` become `[MM:SS]` blocks (~40 s per block),
drop consecutive duplicate lines (auto-caption rolling repeats), strip
cue numbers and tags; plain text without timestamps is fine too (the
notes then have no timestamps). Then write the notes DIRECTLY:
`## Overview` (2-3 sentence abstract + main topics with timestamps) →
`## Key Takeaways` (5-10) → timestamped chapter sections
(`## [H:MM:SS – H:MM:SS] chapters`, `###` subheadings, **bold key
terms**, bullets) → `## Review Questions` (10, no answers) →
`## Glossary` (`**term** — definition` lines; skip these last two for
summary style). No invented facts. Build the .docx with your own
file-creation tools.
Explicit overrides: `make_notes.py --engine agent|zai`, `fetch_transcript.py
--asr whisper` (+ `--asr-model medium` for better non-English accuracy).
## Transcript connector (optional — full-auto on claude.ai web)
A transcript-fetch **connector** (MCP) lets you pull the transcript
yourself, so on claude.ai web the user only pastes a URL — no
copy-paste. Recommended: TranscriptFetch — `https://transcriptfetch.com/mcp`,
free tier ~50 credits/month (caption fetch ≈ 1 credit per video; AI
transcription ≈ 1 credit per started 5 minutes; failed fetches are free —
prefer captioned videos). One-time setup for the user: transcriptfetch.com
→ free account → API key (`tf_live_...`) → claude.ai Settings →
Connectors → **Add custom connector** → Name (any) + URL
`https://transcriptfetch.com/mcp` → Continue → Authentication: **No
sign in** → **Request headers**: name `Authorization`, value
`Bearer tf_live_YOUR_KEY` → Add (the free plan allows one custom
connector; no edits — remove and re-add). In the chat: **+** (lower
left) → Connectors → toggle it on. Claude Code can use the same service
via `claude mcp add` / its MCP config. What it returns is transcript text — clean it like a raw
transcript (route 0 / the inline rules above). It is a third-party
service: the video URL passes through their servers.
## What you get
| File | What it is |
|---|---|
| `<title>-notes.docx` | the final study notes (deliver this, in `download/`) |
| `notes.md` | same notes as Markdown (give it too if the user wants to edit) |
| `transcript.txt` | full transcript with `[MM:SS]` timestamps |
| `meta.json`, `transcript_segments.json` | machine-readable intermediates |
## Prerequisites (check once)
```bash
yt-dlp --version || pip install -q yt-dlp # video/caption fetching
ffmpeg -version | head -1 # audio extraction/chunking
python3 -c "import docx" || pip install -q python-docx
z-ai chat -p "ping" >/dev/null && echo "z.ai OK" # absent on Claude Code -> agent mode is used
```
## Workflow (3 scripts, in order)
All three scripts live in `scripts/` next to this file. Run them with the
system Python. `WORK` is a scratch directory, e.g. `work/video-notes`.
### 1. Get the transcript (fetch, or clean what the user gave you)
```bash
python3 scripts/fetch_transcript.py "<SOURCE>" \
--out WORK [--lang bn,en] [--cookies cookies.txt] [--title "Lecture title"]
```
SOURCE can be a video URL (any site yt-dlp supports), a YouTube id, a
local media file, or a raw transcript file. Routes, in order:
0. transcript file (`.txt`/`.srt`/`.vtt`/`.ttml`) → detected + cleaned
(VTT / SRT / TTML / YouTube "Show transcript" copy / plain text)
1. local media file → ffmpeg chunked audio → ASR
2. yt-dlp (anonymous) → captions, else best audio → ASR
3. yt-dlp with `--cookies cookies.txt` → same
4. Piped public instances (YouTube only) → captions, else audio → ASR
Connector note: if a transcript connector/MCP tool is connected, you can
also call it, save what it returns as `raw.txt` and let route 0 clean it —
useful when the direct network routes are blocked.
Notes on the options:
- `--lang` = preferred caption languages (the language the lecture is
spoken in first, e.g. `bn,en` for a Bangladeshi lecture). English is the
fallback.
- `--title` matters for the transcript-file route (no video metadata
exists there); otherwise the file name is used.
- Pass `--cookies` only if the user uploaded a `cookies.txt` (see
`references/troubleshooting.md`) — the reliable fix when YouTube answers
anonymous requests with *"Sign in to confirm you're not a bot"*.
- ASR (any route that transcribes audio): the z-ai backend is reliable
for **English** (and Chinese); for other languages pass `--script bn` /
`--script latin` / ... so the first chunk is checked and it fails fast
instead of producing hours of gibberish, or use `--asr whisper`
(local whisper, ~100 languages incl. Bengali; `--asr-model medium` is
better for Bengali).
Timing: a 5-hour video takes ~1-3 min via captions; via z-ai ASR it needs
~640 chunks of 28 s — about 45-120 min with the default 4 workers; local
whisper on CPU is slower. Set expectations, or offer `--style summary`
afterwards to save LLM time. If EVERY route fails, the script prints the
exact fix — follow it (usually: cookies.txt, the local file, or a pasted
transcript as route 0).
### 2. Generate the notes
```bash
python3 scripts/make_notes.py --dir WORK [--lang English] [--style study|detailed|summary]
```
- `--lang` is the OUTPUT language of the notes — set it to the language the
user writes in (e.g. a user writing Banglish → `--lang Bengali`), unless
they ask for a specific one. The lecture language and notes language are
independent; the LLM translates.
- `--style`: `study` (default, comprehensive), `detailed` (near-complete,
keeps every example), `summary` (concise).
- The script chunks the transcript (respecting video chapters), asks the
LLM for notes per part (z-ai engine), or writes `AGENT_PLAN.md` for YOU
to follow (agent engine — see "Where this runs" above). Intermediates
are kept in `WORK/chunk_notes/` so you can rerun/inspect them.
### 3. Convert to .docx and deliver
```bash
python3 scripts/notes_to_docx.py --dir WORK -o "download/<name>.docx"
```
The converter emits real Word headings/bullets/hyperlinks (no Markdown
artifacts — it self-checks and exits non-zero if any leak through) and
switches to a Bengali-capable font automatically when the notes contain
Bengali. After it saves:
- reopen and sanity-check the docx (paragraph count, no `**`/`##` residue);
- render and visually check it (soffice → pdf → look at first pages) for
anything broken before telling the user it's done;
- deliver the docx (plus `transcript.txt` / `notes.md` if asked) from
`download/`.
## Choices this skill already made for you
- **Captions before ASR**: captions are instant and carry exact timestamps;
ASR is the fallback (28-second WAV chunks — the ASR API accepts only
WAV/WebM under 30 s — transcribed in parallel with 4 workers).
- **Transcript-file route**: raw pastes are cleaned to the same
`[MM:SS]` format the other routes produce, so steps 2-3 never change.
- **Chunked LLM notes**: the full transcript is never fed to the LLM in
one call. A 5-hour lecture becomes ~15-20 parts; notes stay detailed and
nothing is truncated.
- **Timestamps everywhere**: every notes section and important bullet keeps
`[MM:SS]` markers so the reader can jump to the exact spot in the video.
## Troubleshooting
- *"Sign in to confirm you're not a bot"* / all routes failed → the
machine's IP is bot-blocked by YouTube. Fix: user-supplied
`cookies.txt`, the local file, or ask the user to paste the transcript
(route 0). Full instructions: `references/troubleshooting.md`.
- Non-YouTube URL fails → yt-dlp supports it only if the site is in its
extractor list; otherwise ask the user for the local file or transcript.
- Captions exist but are auto-generated garbage → pass `--lang` with the
spoken language first, or fall back to `--style summary` notes; for
interviews/music, ASR adds nothing.
- ASR chunks fail repeatedly → check `z-ai asr -f <chunk>` manually; a
silent/music chunk can return empty text, which is fine and skipped.
Keep the work directory `WORK` until the user confirms the notes are good —
rerunning from `chunk_notes/` is cheap; refetching a 5-hour transcript is not.