src/skills/watch/SKILL.md
Extract YouTube video transcripts via yt-dlp and pipe to /learn. Use when user says "watch", "youtube", "video", "transcript", or shares a YouTube URL.
npx skillsauth add Soul-Brews-Studio/oracle-skills-cli watchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Eyes that see. Ears that listen. Knowledge that stays.
Extract transcripts from YouTube videos using yt-dlp, then optionally pipe through /learn for deep analysis.
/watch <url> # Extract CC + summarize
/watch <url> --raw # Extract CC only, save raw SRT
/watch <url> --learn # Extract CC → /learn --deep pipeline
/watch <url> --summary # Extract CC → concise summary only
date "+🕐 %H:%M %Z (%A %d %B %Y)" && ORACLE_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -n "$ORACLE_ROOT" ] && [ -f "$ORACLE_ROOT/CLAUDE.md" ] && { [ -d "$ORACLE_ROOT/ψ" ] || [ -L "$ORACLE_ROOT/ψ" ]; }; then
PSI="$ORACLE_ROOT/ψ"
else
ORACLE_ROOT="$(pwd)"
PSI="$ORACLE_ROOT/ψ"
fi
if command -v yt-dlp &>/dev/null; then
YTDLP="yt-dlp"
elif [ -x /tmp/yt-dlp ]; then
YTDLP="/tmp/yt-dlp"
else
echo "⚠️ yt-dlp not found. Install: pip install yt-dlp OR curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /tmp/yt-dlp && chmod +x /tmp/yt-dlp"
exit 1
fi
Extract video ID from URL. Accept:
https://www.youtube.com/watch?v=XXXXXhttps://youtu.be/XXXXXhttps://youtube.com/watch?v=XXXXXVIDEO_URL="$1"
VIDEO_ID=$(echo "$VIDEO_URL" | grep -oP '(?:v=|youtu\.be/)[\w-]{11}' | head -1 | sed 's/v=//')
if [ -z "$VIDEO_ID" ]; then
echo "❌ Invalid YouTube URL: $VIDEO_URL"
exit 1
fi
echo "🎬 Video ID: $VIDEO_ID"
$YTDLP --print title --print duration_string --print channel --skip-download "$VIDEO_URL" 2>/dev/null
Save as variables: TITLE, DURATION, CHANNEL.
Try auto-generated English CC first, fall back to manual subs:
TMPDIR=$(mktemp -d)
$YTDLP --write-auto-sub --sub-lang en --sub-format srt --skip-download -o "$TMPDIR/%(id)s" "$VIDEO_URL" 2>/dev/null
# Check if SRT was downloaded
SRT_FILE="$TMPDIR/${VIDEO_ID}.en.srt"
if [ ! -f "$SRT_FILE" ]; then
# Try manual subs
$YTDLP --write-sub --sub-lang en --sub-format srt --skip-download -o "$TMPDIR/%(id)s" "$VIDEO_URL" 2>/dev/null
SRT_FILE=$(ls "$TMPDIR"/*.srt 2>/dev/null | head -1)
fi
if [ ! -f "$SRT_FILE" ]; then
echo "❌ No English subtitles found for this video."
echo "💡 Try: $YTDLP --list-subs '$VIDEO_URL' to see available languages."
exit 1
fi
SUB_COUNT=$(grep -c '^[0-9]\+$' "$SRT_FILE")
echo "📝 Extracted $SUB_COUNT subtitle blocks"
Strip SRT formatting (timestamps, numbers, blank lines) into plain text:
# Remove SRT formatting → clean text
sed '/^[0-9]*$/d; /^$/d; /-->/d' "$SRT_FILE" | sed 's/<[^>]*>//g' | sort -u > "$TMPDIR/clean.txt"
Read the clean transcript.
# Slugify title
SLUG=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g; s/--*/-/g; s/^-//; s/-$//' | cut -c1-50)
DATE=$(date +%Y-%m-%d)
OUT_DIR="$PSI/learn/$SLUG/$DATE"
mkdir -p "$OUT_DIR"
--rawSave raw SRT + clean text only:
cp "$SRT_FILE" "$OUT_DIR/raw-cc.srt"
cp "$TMPDIR/clean.txt" "$OUT_DIR/transcript.txt"
Output:
✅ Raw transcript saved
📁 $OUT_DIR/raw-cc.srt (SRT)
📁 $OUT_DIR/transcript.txt (clean)
🎬 $TITLE ($DURATION) by $CHANNEL
--summary (default)Read the clean transcript and produce a structured analysis:
# [TITLE]
**Source**: [YouTube URL]
**Duration**: [DURATION] | **Channel**: [CHANNEL]
**Extracted**: [DATE] via yt-dlp CC + Oracle analysis
---
## Thesis
[1-2 sentence core argument]
## Timestamped Summary
[Key points with timestamps from SRT]
## Key Quotes
[5-10 most important quotes]
## Relevance
[How this connects to our work — skills, fleet, philosophy]
Save to $OUT_DIR/analysis.md + raw files.
--learnSave raw files, then invoke the full /learn pipeline:
💡 Transcript extracted. Piping to /learn --deep...
Create a temporary markdown file with the full transcript content, then use it as input for deep analysis. The /learn pipeline will produce the full 5-document deep study.
rm -rf "$TMPDIR"
--skip-download always)en auto-subs, then manual, then fail with language hintARGUMENTS: $ARGUMENTS
testing
Cut a beta pre-release — bump CalVer with --beta, PR to beta branch, CI auto-tags + publishes to npm @beta. Use when user says 'release beta', 'cut beta', '/release-beta', or wants to publish a beta version for pre-release testing.
testing
Cut an alpha pre-release — bump CalVer, PR to alpha branch, CI auto-tags + publishes to npm @alpha. Use when user says 'release alpha', 'cut alpha', '/release-alpha', or wants to publish an alpha version.
tools
Talk to another oracle via maw federation. Uses fleet machine names (white, mba, clinic-nat, oracle-world, phaith). Auto-signs with current oracle's [host:handle] from CLAUDE.md. Global — works from any oracle repo.
development
Log information for future reference. Use when user says "fyi", "remember this", "note that", "for your info".