agentleFS
holland-builtholland-built/no-yolo/skills/claude-video/SKILL.md

claude-video

Skill0 starsChanged 7 days agoMITView on GitHub

Use when given a YouTube URL to watch, ingest, summarise or add to the Knowledge Base vault; \"just watch\" summarises in chat only. Writes the transcript, a source page, topic updates and the log.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask which only if genuinely unclear.

    line 16
  2. Distinctive:

    If the request has no YouTube link, reply only by asking for it, and mention that adding "just watch" skips saving.

    line 18
  3. Very specific:

    Prefer real captions. Only fall back to Whisper if there are none — it is slow and the log records which was used.

    line 34
  4. Distinctive:

    Read the description before the transcript.

    line 44
  5. Very specific:

    If a .vtt appeared, transcript_source: captions.

    line 49
  6. Very specific:

    If the caption download fails with HTTP 429, wait a minute and retry once.

    line 52
  7. Very specific:

    Read it with get_page_text, which returns every line with its timestamp in one call.

    line 58
  8. Very specific:

    If no captions exist (needs whisper: pip install openai-whisper):

    line 63
  9. Distinctive:

    Write this file once. It is immutable.

    line 72
  10. Very specific:

    Follow the source-summary format in the vault's CLAUDE.md: frontmatter with type: source, raw_path, topics, then ## Summary, ## Key Claims, …

    line 93
  11. Distinctive:

    When the video is a list of tools, repos or skills, the report names every item, one numbered table row each (rule 14 of the output style): …

    line 132
  12. Distinctive:

    After every full ingest, run the pruner.

    line 140
  13. Very specific:

    Delete the /tmp vtt/mp3/txt working files when done.

    line 157

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

claude-video

Ingest a YouTube video into ~/AI/Knowledge Base.

Modes

  • watch (default) — full ingest: raw transcript + wiki source page + topic updates + index + log.
  • just watch — read the transcript and summarise in chat. The vault ends the run exactly as it started. Use when the user says "just watch" or "don't save".

Ask which only if genuinely unclear. A bare URL means full ingest.

If the request has no YouTube link, reply only by asking for it, and mention that adding "just watch" skips saving. Run nothing until the link arrives, because every step below needs it. The link then carries on as a normal run.

Steps

1. Read the vault rules

~/AI/Knowledge Base/CLAUDE.md owns the page schemas, the topic prefixes, the slug format, and the ingest workflow. Read it before writing anything.

Everything below is the video-specific part, including the one naming rule that file does not cover: video source pages are slugged vid-<kebab-case>, max 5 words.

2. Get metadata and transcript

Prefer real captions. Only fall back to Whisper if there are none — it is slow and the log records which was used. Needs yt-dlp (brew install yt-dlp).

cd /tmp
yt-dlp --skip-download --print "%(title)s\n%(channel)s\n%(upload_date)s\n%(duration)s\n%(id)s" "<URL>"
yt-dlp --skip-download --print "%(description)s" "<URL>"
yt-dlp --skip-download --write-auto-subs --write-subs --sub-lang "en.*" --sub-format vtt -o "%(id)s" "<URL>"

Read the description before the transcript. It often names the hosts and links every repo, tool and sponsor, while the captions garble names ("Sub Box" for Subvox, "Monet" for Monid). Take names, hosts and links from it, and never from earlier episodes of the same show; one ingest credited a co-host from past episodes and missed three repos the description linked.

If a .vtt appeared, transcript_source: captions. Strip the VTT timing/markup to plain text with timestamps at paragraph starts.

If the caption download fails with HTTP 429, wait a minute and retry once. If it still fails, read the transcript from the YouTube page in Chrome. Do not add --cookies-from-browser unless the user approved it in this session.

  1. Open the watch page in a new tab, click "...more" under the video, then "Show transcript", and wait about 4 seconds.
  2. Read it with get_page_text, which returns every line with its timestamp in one call. javascript_tool cuts its output at about 1,000 characters and blocks text with a query string.
  3. Join the lines into paragraphs of about 30 seconds, write the raw file as usual with transcript_source: captions, and close the tab.

If no captions exist (needs whisper: pip install openai-whisper):

yt-dlp -f bestaudio -x --audio-format mp3 -o "%(id)s.%(ext)s" "<URL>"
whisper "<id>.mp3" --model small --output_format txt

Then transcript_source: whisper.

3. Write the raw transcript — raw/videos/vid-<slug>.md

Write this file once. It is immutable.

---
title: <video title>
source_type: video
url: <URL>
channel: <channel>
date_ingested: <today>
upload_date: <YYYY-MM-DD>
duration_seconds: <n>
transcript_source: captions | whisper
---

## Transcript

[00:05] ...

4. Write the source page — wiki/sources/vid-<slug>.md

Follow the source-summary format in the vault's CLAUDE.md: frontmatter with type: source, raw_path, topics, then ## Summary, ## Key Claims, ## Connections, ## Quotes. Link only pages that exist; name everything else as plain text.

Two additions that make these pages worth rereading:

  • ## Evidence — verbatim screen content, tables, file listings, commands. This is what makes a page useful six months later; a summary alone is not.
  • ## Worth Trying — only when the video contains something actionable for this user. Say plainly what to skip, too.

Quality bar: be a critical reader, not a transcriber. Promotional sources get their numbers checked. Note where a claim contradicts something already in the vault, and say which source you find more credible and why.

5. Update topics

Revise the relevant wiki/topics/{ai,ha}/*.md pages — overview, key ideas, and any new tension in Debates / Open Questions. Add the source to that page's ## Sources list and bump source_count / last_updated. Create a topic page only if the subject genuinely recurs across sources.

6. Append to log.md

index.md needs no edit — its Sources and Topics tables are Dataview queries that pick the page up from its frontmatter.

## [YYYY-MM-DD] video | <Title>
- wiki/sources/vid-<slug>.md
- <one line: the single most transferable idea, or why it was thin>

7. Report

Report in chat what it was, the best idea in it, and whether it changed a topic page or contradicted the vault. Keep it short enough to scan.

When the video is a list of tools, repos or skills, the report names every item, one numbered table row each (rule 14 of the output style): the item, what it does in plain words, and whether the user can use it on this setup (yes, no, or only if, with the reason). Never fold the rest into "the other seven" or "and 10 more". The user had to ask "list the other 7" after three reports did that, because a grouped row hides exactly the item they might want. This outranks the usual five-row table limit.

Housekeeping: prune old tool news

After every full ingest, run the pruner. Tool-news videos go stale within weeks, and the vault's own rule lets their raw transcript go once stale, with the source page staying so every link resolves. It only touches videos ingested more than 30 days ago and tagged only to tool-* topics. It is a dry run unless given --apply, backs each file up first, and logs a prune | entry in log.md. Run it plain; when it lists candidates, run it again with --apply and add one line to the report saying how many transcripts were pruned. If it skips a file, leave that file alone. If it says there are more candidates than its limit (5), do not raise the limit yourself: tell the user and stop.

# list the old tool-news transcripts that could go, changing nothing
python3 ~/.claude/skills/claude-video/prune_stale.py "$HOME/AI/Knowledge Base"
# do it: back up, null the raw path, delete the transcript, log it
python3 ~/.claude/skills/claude-video/prune_stale.py "$HOME/AI/Knowledge Base" --apply

Cleanup

Delete the /tmp vtt/mp3/txt working files when done.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.