AgentSkillsCN

watch

通过 Gemini 转录功能,从 YouTube 视频中汲取知识。当用户说“观看”、“转录 YouTube 视频”、“从视频中学习”,或分享 YouTube 链接以进行学习时使用。

SKILL.md
--- frontmatter
name: watch
description: Learn from YouTube videos via Gemini transcription. Use when user says "watch", "transcribe youtube", "learn from video", or shares a YouTube URL to study.
alias: /gemini transcribe

/watch - YouTube → Gemini → Oracle Knowledge

Alias for /gemini transcribe with Oracle integration.

Learn from YouTube videos by sending to Gemini for transcription, then indexing to Oracle.

Usage

bash
/watch https://youtube.com/watch?v=xxx              # Auto-resolve title via yt-dlp
/watch "Custom Title" https://youtu.be/xxx          # Override title
/watch --slug custom-slug https://youtube.com/...   # Custom slug

Scripts

ScriptPurpose
scripts/get-metadata.ts <url>Get title, duration, channel (JSON)
scripts/get-cc.ts <url> [lang]Get captions in SRT format
scripts/save-learning.ts <title> <url> <id> <transcript> [cc]Save to ψ/memory/learnings/

Workflow

Step 1: Run Transcription Script

bash
# Simple (default chat mode)
bun src/skills/watch/scripts/transcribe.ts <youtube-url>

# With Deep Research mode
bun src/skills/watch/scripts/transcribe.ts --mode=research <youtube-url>

# With specific model
bun src/skills/watch/scripts/transcribe.ts --model=thinking <youtube-url>

# Canvas mode for document output
bun src/skills/watch/scripts/transcribe.ts --mode=canvas <youtube-url>

Modes:

ModeUse Case
chatQuick transcription (default)
researchDeep analysis with fact-checking
canvasStructured document output

Models:

ModelSpeedQuality
fastFastestGood
thinkingSlowBest (reasoning)
proMediumHigh

The script handles:

  1. Fetching video metadata (title, channel, duration)
  2. Creating new Gemini tab with correct mode URL
  3. Selecting model if specified
  4. Sending prompt with metadata
  5. Outputting tab ID for follow-up

Step 2: Wait for Gemini Response

Check the Gemini tab for the transcription. For long videos, this may take 30-60 seconds.

Step 3: Save to Knowledge

Once you have the Gemini transcription, save it:

bash
bun src/skills/watch/scripts/save-learning.ts "$TITLE" "$URL" "$VIDEO_ID" "$TRANSCRIPT" "$CC_TEXT"

Or manually create a learning file at ψ/memory/learnings/YYYY-MM-DD_video-slug.md.

Step 4: Index to Oracle

code
oracle_learn({
  pattern: "YouTube transcript: [TITLE] - [key takeaways summary]",
  concepts: ["youtube", "transcript", "video", "[topic-tags from content]"],
  source: "/watch skill"
})

Output Summary

markdown
## 🎬 Video Learned: [TITLE]

**Source**: [YOUTUBE_URL]
**Gemini**: [GEMINI_CONVERSATION_URL]

### Key Takeaways
[From Gemini response]

### Saved To
- Learning: ψ/memory/learnings/[DATE]_[SLUG].md
- Oracle: Indexed ✓

### Quick Access
`/trace [SLUG]` or `oracle_search("[TITLE]")`

IMPORTANT: Save Gemini Conversation Link

Always save the Gemini conversation URL in the learning file frontmatter:

yaml
---
title: [Video Title]
source: YouTube - [Creator] (youtube_url)
gemini_conversation: https://gemini.google.com/app/[conversation_id]
---

Why:

  • Conversations persist and are revisitable
  • Can continue asking follow-up questions later
  • Provides audit trail of transcription source
  • URL visible in browser after sending request

Notes

  • Gemini has YouTube understanding built-in (can process video directly)
  • Long videos may take 30-60 seconds to process
  • If Gemini can't access video, it will say so — fallback to manual notes
  • Works with: youtube.com, youtu.be, youtube.com/shorts/

Error Handling

ErrorAction
Gemini blockedUser must be logged into Google
Video unavailableSave URL + notes manually
Rate limitedWait and retry
Browser tab closedRecreate tab, retry