Implement YouTube ingest skill #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement
youtube-ingestskillGoal
Create a higher-level
youtube-ingestskill for turning a YouTube URL into useful Obsidian-ready knowledge artifacts.This should build on the existing
youtube-transcriptskill rather than replacing it.youtube-transcriptshould remain the low-level primitive for fetching a video's title and transcript.youtube-ingestshould orchestrate the full ingestion workflow: transcript analysis, structured source-note creation, optional visual/frame analysis, and follow-up note suggestions.Background
The motivating video is Eero Alvar's "Obsidian and AI were made for each other".
URL: https://www.youtube.com/watch?v=hhtExS5UQBI
The video demonstrates a dedicated Obsidian/Pi workflow for YouTube summaries.
It also demonstrates that transcript-only ingestion can miss important information that is visible on screen, such as folder structure, agent prompts, and generated note structure.
In our exploratory workflow, we used
yt-dlpto fetch the transcript and then downloaded timestamped captions plus the video to inspect targeted frames.This allowed us to recover details of the creator's YouTube summary agent and output format that were not obvious from the plain transcript alone.
Relationship to existing
youtube-transcriptskillKeep
youtube-transcriptfocused and stable.It should continue to fetch the title and transcript as JSON.
Add a new skill named
youtube-ingestoringest-youtube.Prefer
youtube-ingestif following noun-first naming for YouTube workflows.The new skill may call the existing transcript tool internally, but it should not require callers to know about that implementation detail.
User-facing behavior
When the user provides a YouTube URL and asks to ingest it, the skill should create or propose a structured source note.
The note should be suitable for an Obsidian vault.
The note should capture what the video says, how the video is structured, which concepts are worth linking, and what follow-up notes may be useful.
The default mode should be transcript-only and fast.
A deeper visual mode should be available when the video visibly demonstrates workflows, UIs, prompts, file structures, diagrams, slides, or generated documents.
Modes
Quick ingest
Quick ingest should avoid downloading the full video.
It should fetch metadata and transcript, analyze the transcript, and generate a structured source note.
Use quick ingest for lectures, podcasts, essays, and normal talking-head videos where the spoken content is the main artifact.
Deep ingest
Deep ingest should use timestamped captions and selective frame extraction.
It should avoid blindly extracting hundreds of frames.
It should locate candidate moments from captions, extract a small set of representative screenshots around those moments, inspect them, and use them as evidence.
Use deep ingest when the video shows something important on screen.
Examples include an Obsidian vault layout, an
AGENTS.mdfile, a generated note, a terminal command, a diagram, or a UI flow.Phase-based workflow
The skill should be documented and implemented around explicit phases.
This makes partial progress easy to resume and makes failures easier to diagnose.
Phase 1: Capture source assets
Goal: get stable source materials outside the vault.
Recommended temporary working directory shape:
Required outputs for quick ingest:
yt-dlp --dump-json --skip-downloadyoutube-transcriptAdditional outputs for deep ingest:
json3formatUse
yt-dlpdirectly for timestamped captions.The existing
youtube-transcriptscript currently discards timestamps, whilejson3preservestStartMsanddDurationMsfor caption events.Example commands from the exploration:
Prefer manual English captions when present.
Fall back to English automatic captions.
Use the same language preference order as
youtube-transcript:en,en-US,en-GB, then anyen*caption.Phase 2: Locate candidate moments
Goal: identify timestamps where screenshots may answer questions that transcript text cannot answer.
Parse the
json3captions into timestamped events.Search for terms that signal visible artifacts or important workflow transitions.
The search terms should be configurable or generated from the transcript and the user's stated goal.
For the motivating video, useful terms included:
AI inboxvault boundaryagents.mdYouTube summariessummary of the whole videoargument structureslink findermissing linkssemantic embeddingsub-agentsoutlier finderintegrated terminalThe phase should produce both machine-readable and human-readable outputs.
Example outputs:
Each candidate should include:
The shortlist should deduplicate nearby hits and keep only the most likely timestamps for visual inspection.
Phase 3: Extract representative frames
Goal: extract a small number of useful screenshots from shortlisted timestamps.
For each shortlisted timestamp, extract the exact frame and nearby frames.
A good default is
timestamp - 1s,timestamp, andtimestamp + 1s.Example output shape:
Use
ffmpegfor extraction.Generate a contact sheet so the agent or user can quickly decide which frames matter.
Example command pattern:
Phase 4: Answer visual questions from frames
Goal: use screenshots as evidence rather than automatically preserving them as vault attachments.
This phase is intentionally different from dumping images into the vault.
By default, inspect the frames and extract the information they reveal.
Only copy images into the vault if they add durable value as visual references.
For the motivating video, frame inspection answered these questions:
INBOX (AI)/pi/youtube-summary/.AGENTS.mdfile and afetch_transcript.pyscript.youtube-summarydirectory.YouTube Summarizer Guidelines.python3 fetch_transcript.py "<url>".titleandtranscript.The recovered generated-note structure was:
The visible details of each section were:
Summaryis a short abstract highlighting the creator's main purpose and context.Video structureis a numbered list describing the step-by-step progression of the narrative.Key conceptsis a curated list of critical concepts needed to understand the video's core arguments.Key conceptsformats each concept as a Markdown subheading.Key conceptsincludes brief definitions.Key conceptsprioritizes the creator's specific interpretation when it differs from the strict formal real-world definition.Key pointsis a flat list of the most crucial insights, main thesis, and takeaways.Argument structuresextracts logical reasoning patterns behind key points.Argument structuresmaps arguments into readable premise and conclusion structures.Argument structuresshould preserve important nuance and avoid forcing every argument into a rigid template.Phase 5: Generate or update Obsidian notes
Goal: write useful vault artifacts, not just a generic summary.
The source note should distinguish video content from vault-specific interpretation.
Recommended sections:
The first five content sections are based on the creator's demonstrated format.
Relevance to this vault,Possible notes, andOpen questionsare additions for second-brain ingestion.They make the output useful for the local vault rather than merely summarizing the video.
Possible notes should be concrete internal-link candidates.
They may be proposed rather than created automatically.
If the skill creates notes, it should prefer small claim-like notes over generic encyclopedia pages.
For example, from the motivating video, possible note candidates included:
[[obsidian as ai interface]][[ai agent garage]][[ai inbox boundary]][[youtube ingest workflow]]Phase 6: Cleanup and commit guidance
Goal: avoid polluting the vault with raw ingestion artifacts.
Raw video, metadata JSON, timestamped caption JSON, and bulk frame exports should remain outside the vault by default.
The skill should report where temporary assets were placed.
The skill should copy only selected durable assets into the vault when explicitly requested.
If the repository is under Git, the skill may suggest separate commits.
It should not commit automatically unless explicitly asked.
Suggested commit split:
Output format requirements
The skill should be explicit about whether it writes files or only proposes content.
If it writes files, it should report every path created or modified.
If it creates temporary files, it should report the temp directory.
If visual analysis was skipped, it should say why.
Errors should name the failing phase and the next corrective action.
Implementation notes
Use Nix-packaged tools where available.
For this repository's packaged skills, command wrappers may use
mkSkill.commandsenv patching to point scripts at Nix-provided executables.The existing
youtube-transcriptskill already demonstrates this pattern for Python andyt-dlp.The deep-ingest implementation likely needs:
json3captions and producing candidate momentsyt-dlpfor metadata, captions, and video downloadffmpegfor frame extraction and contact sheetsConsider implementing helper scripts inside the skill directory:
The initial implementation can be a documented skill workflow without full automation.
A later implementation can automate the helper scripts.
Acceptance criteria
youtube-transcriptskill remains available as a lower-level primitive.SKILL.mdgives enough guidance for an agent to perform the workflow manually even before every helper script is automated.