agentleFS
runesleorunesleo/x-reader/skills/video/SKILL.md

video

Skill988 starsChanged 17 days agoMITView on GitHub

Transcribe and summarize video or podcast links, including YouTube, Bilibili, X video, Xiaoyuzhou, Apple Podcasts, and direct media URLs.

  • Reads credentials
  • Sends data out

61 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use popups, co-marketing and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CesarjoquinSkill

    popups

    When the user wants to create or optimize popups, modals, overlays, slide-ins, or banners for conversion purposes. Also use when the user mentions "exit intent," "popup conversions," "modal optimization," "lead capture popup," "email popup," "announcement banner," "overlay," "collect emails with a popup," "exit popup," "scroll trigger," "sticky bar," or "notification bar." Use this for any overlay or interrupt-style conversion element. For forms outside of popups, see cro. For general page conversion optimization, see cro.

    Also in 22 projects that use this

  • CesarjoquinSkill

    co-marketing

    When the user wants to find co-marketing partners, plan joint campaigns, or brainstorm partnership opportunities. Use when the user says 'co-marketing,' 'partner marketing,' 'joint campaign,' 'who should we partner with,' 'integration marketing,' 'cross-promotion,' 'collaborate with another company,' 'partnership ideas,' or 'co-brand.' For customer referral programs, see referrals. For launch-specific partnerships, see launch.

    Also in 24 projects that use this

  • coreyhaines31Skill

    marketing-council

    When the user wants multiple expert perspectives on a marketing question — a simulated board of advisors staffed by legendary marketers (Seth Godin, David Ogilvy, Eugene Schwartz, April Dunford, Rory Sutherland, Alex Hormozi, Byron Sharp, and more). Also use when the user mentions 'marketing council,' 'board of advisors,' 'advisory board,' 'what would Seth Godin say,' 'what would Ogilvy think,' 'channel Hormozi,' 'get multiple perspectives,' 'debate this,' 'have the council review,' 'marketing mentors,' or asks how a famous marketer would approach their problem. The council gives each advisor's take through their documented frameworks, surfaces where they disagree, and synthesizes a recommendation. For executing the winning direction, hand off to positioning, offers, copywriting, ads, or the relevant skill.

    Also in 17 projects that use this

  • ukunal91appSkill

    community-marketing

    Build and leverage online communities to drive product growth and brand loyalty. Use when the user wants to create a community strategy, grow a Discord or Slack community, manage a forum or subreddit, build brand advocates, increase word-of-mouth, drive community-led growth, engage users post-signup, or turn customers into evangelists. Trigger phrases: "build a community," "community strategy," "Discord community," "Slack community," "community-led growth," "brand advocates," "user community," "forum strategy," "community engagement," "grow our community," "ambassador program," "community flywheel.

    Also in 26 projects that use this

  • roerohanSkill

    emails

    When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," "lifecycle emails," "trigger-based emails," "email funnel," "email workflow," "what emails should I send," "welcome series," or "email cadence." Use this for any multi-email automated flow. For cold outreach emails, see cold-email. For in-app onboarding, see onboarding.

    Also in 19 projects that use this

  • +7 more from Cesarjoquin

The file

Files
SKILL.md

Video & Podcast Digest Skill

Send a video/podcast link → get full transcript + structured summary

Supported Platforms

PlatformTypeSubtitlesWhisper Transcription
YouTubeVideo✅✅
BilibiliVideo✅✅
X/TwitterVideo❌✅
Xiaoyuzhou (小宇宙)Podcast❌✅
Apple PodcastsPodcast❌✅
Direct links (mp3/mp4/m3u8)Any❌✅

Trigger

Auto-triggered when a media URL is detected:

  • YouTube: youtube.com, youtu.be
  • Bilibili: bilibili.com, b23.tv
  • X/Twitter: x.com, twitter.com (tweets with video)
  • Xiaoyuzhou: xiaoyuzhoufm.com
  • Apple Podcasts: podcasts.apple.com
  • Direct: .mp3, .mp4, .m3u8, .m4a, .webm

Pipeline

Step 0: Detect Media Type

URL PatternTypePipeline
xiaoyuzhoufm.com/episode/Podcast→ Step 1b (Xiaoyuzhou)
podcasts.apple.comPodcast→ Step 1c (Apple)
bilibili.com, b23.tvVideo→ Step 1d (Bilibili API)
.mp3, .m4a direct linkAudio→ Step 2b (direct download)
OtherVideo→ Step 1a (subtitle extraction)

Step 1a: Video — Extract Subtitles

# Clean up temp files
rm -f /tmp/media_sub*.vtt /tmp/media_audio.mp3 /tmp/media_transcript*.json /tmp/media_segment_*.mp3 2>/dev/null || true

# YouTube (prefer English, fallback Chinese)
yt-dlp --skip-download --write-auto-sub --sub-lang "en,zh-Hans" -o "/tmp/media_sub" "VIDEO_URL"

# Bilibili
yt-dlp --skip-download --write-auto-sub --sub-lang "zh-Hans,zh" -o "/tmp/media_sub" "VIDEO_URL"

Check for subtitles:

ls /tmp/media_sub*.vtt 2>/dev/null
  • Has subtitles → Read VTT content, skip to Step 3
  • No subtitles → Step 2a (download audio)

Step 1b: Xiaoyuzhou (小宇宙) — Extract Audio URL

# Extract CDN direct link from __NEXT_DATA__
# Xiaoyuzhou is a Next.js SPA, but initial HTML contains audio URL in __NEXT_DATA__
AUDIO_URL=$(curl -sL -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" \
  "EPISODE_URL" \
  | grep -oE 'https://media\.xyzcdn\.net/[^"]+\.(m4a|mp3)' \
  | head -1)

echo "Audio URL: $AUDIO_URL"

# Download audio
curl -L -o /tmp/media_audio.mp3 "$AUDIO_URL"

If curl extraction is empty (rare), fallback: use Puppeteer/browser to get rendered page and extract.

→ Step 2b (check size & transcribe)

Step 1c: Apple Podcasts — via yt-dlp

yt-dlp -f "ba[ext=m4a]/ba/b" --extract-audio --audio-format mp3 --audio-quality 5 \
  -o "/tmp/media_audio.%(ext)s" "APPLE_PODCAST_URL"

→ Step 2b (check size & transcribe)

Step 1d: Bilibili — API Direct Audio Stream

yt-dlp returns 412 for Bilibili even with cookies. Use Bilibili's API instead:

# 1. Extract BV number from URL
BV="BV1xxxxx"  # Replace with actual BV number

# 2. Get video info (title, duration, CID)
curl -s "https://api.bilibili.com/x/web-interface/view?bvid=$BV" \
  -H "User-Agent: Mozilla/5.0" -H "Referer: https://www.bilibili.com/" \
  | python3 -c "import json,sys; d=json.load(sys.stdin)['data']; print(f\"Title: {d['title']}\nDuration: {d['duration']}s\nCID: {d['cid']}\")"

# 3. Get audio stream URL
CID=<CID from previous step>
AUDIO_URL=$(curl -s "https://api.bilibili.com/x/player/playurl?bvid=$BV&cid=$CID&fnval=16&qn=64" \
  -H "User-Agent: Mozilla/5.0" -H "Referer: https://www.bilibili.com/" \
  | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['dash']['audio'][0]['baseUrl'])")

# 4. Download audio (Referer header required, otherwise 403)
curl -L -o /tmp/media_audio.m4s \
  -H "User-Agent: Mozilla/5.0" -H "Referer: https://www.bilibili.com/" "$AUDIO_URL"

# 5. Convert to mp3
ffmpeg -y -i /tmp/media_audio.m4s -acodec libmp3lame -q:a 5 /tmp/media_audio.mp3

→ Step 2b (check size & transcribe)

Step 2a: Video — Download Audio (when no subtitles)

# YouTube may need --cookies-from-browser chrome to bypass bot detection
yt-dlp --cookies-from-browser chrome -f "ba[ext=m4a]/ba/b" --extract-audio --audio-format mp3 --audio-quality 5 \
  -o "/tmp/media_audio.%(ext)s" "VIDEO_URL"

Step 2b: Check Audio Size & Segment

FILE_SIZE=$(stat -f%z /tmp/media_audio.* 2>/dev/null || stat -c%s /tmp/media_audio.* 2>/dev/null)
echo "File size: $FILE_SIZE bytes"
  • ≤ 25MB (25000000) → Step 2c (transcribe directly)
  • > 25MB → Split first, then transcribe each segment

Splitting large audio (>25MB):

# Get total duration
DURATION=$(ffprobe -v error -show_entries format=duration -of csv=p=0 /tmp/media_audio.* | head -1)

# Split into 10-minute segments (keeps each under 25MB)
SEGMENT_SEC=600
SEGMENTS=$(python3 -c "import math; print(math.ceil(float('$DURATION')/$SEGMENT_SEC))")

# Cut segments
for i in $(seq 0 $((SEGMENTS-1))); do
  START=$((i * SEGMENT_SEC))
  ffmpeg -y -i /tmp/media_audio.* -ss $START -t $SEGMENT_SEC -acodec libmp3lame -q:a 5 \
    "/tmp/media_segment_${i}.mp3" 2>/dev/null
done

→ Call Step 2c for each segment sequentially (parallel triggers Groq 524 timeout), concatenate results

Step 2c: Whisper Transcription

Prerequisite: GROQ_API_KEY environment variable

# Check API key
if [ -z "$GROQ_API_KEY" ]; then
  echo "❌ GROQ_API_KEY not set. Get one at: https://console.groq.com/keys"
  exit 1
fi

# Transcribe single file (replace AUDIO_FILE with actual path)
curl -s -X POST "https://api.groq.com/openai/v1/audio/transcriptions" \
  -H "Authorization: Bearer $GROQ_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@AUDIO_FILE" \
  -F "model=whisper-large-v3-turbo" \
  -F "response_format=verbose_json" \
  -F "language=zh" \
  > /tmp/media_transcript.json

# Extract plain text
python3 -c "import json; print(json.load(open('/tmp/media_transcript.json'))['text'])"

Whisper model options:

ModelSpeedAccuracyUse Case
whisper-large-v3-turbo10x realtimeHighDefault choice
whisper-large-v35x realtimeHighestProfessional/noisy content

Language parameter:

  • Chinese: language=zh
  • English: language=en
  • Auto-detect: omit language parameter

Step 3: Structured Summary

Choose output format based on media type:

Video (≤20 min):

  1. Overview (1-2 sentences)
  2. Key Points (3-5 bullet points)
  3. Notable Quotes (if any)
  4. Action Items (if applicable)

Podcast (>20 min):

  1. Overview (2-3 sentences: who discussed what)
  2. Chapter Summary (segmented by topic, 2-3 sentences each)
  3. Key Points (5-8 bullet points)
  4. Notable Quotes
  5. Action Items (if applicable)

Output Format

Video

## 📺 Video Digest

**Title**: [Video Title]
**Duration**: [x minutes]
**Language**: [Chinese/English]

### Overview
[1-2 sentence summary]

### Key Points
1. [Point 1]
2. [Point 2]
...

### Notable Quotes
> "xxx" — [timestamp]

### Action Items
- [if applicable]

Podcast

## 🎙️ Podcast Digest

**Show**: [Podcast Name]
**Episode**: [Episode Title]
**Duration**: [x minutes]
**Guests**: [if any]

### Overview
[2-3 sentences: who discussed what, core conclusions]

### Chapter Summary
#### 1. [Topic] (~xx:xx-xx:xx)
[2-3 sentences of core content]

#### 2. [Topic] (~xx:xx-xx:xx)
[2-3 sentences of core content]
...

### Key Points
1. [Point 1]
2. [Point 2]
...

### Notable Quotes
> "xxx"

### Action Items
- [if applicable]

Error Handling

SituationAction
No subtitles + no GROQ_API_KEYPrompt user to set API key
No subtitles + has API keyAuto Whisper transcription
Xiaoyuzhou curl extraction emptyUse Puppeteer/browser to get rendered HTML
Audio >25MBffmpeg segment (10min/segment), transcribe sequentially
Podcast >2 hoursWarn user about duration, confirm before proceeding
Groq 524 timeoutDo NOT parallelize — transcribe sequentially, sleep 5-8s between segments
Groq 429 rate limit7200s/hour limit, wait for retry-after header, then retry
yt-dlp Bilibili 412Use Bilibili API instead (Step 1d)
yt-dlp YouTube bot detectionAdd --cookies-from-browser chrome
Network timeoutRetry once
Spotify linksInform user: not supported (DRM protected)

Groq Whisper Limits

  • Max 25MB per request
  • Free tier: 7200 seconds of audio/hour (rolling window), ~20 hours/day
  • Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm

Dependencies

  • yt-dlp: video download + subtitle extraction
  • ffmpeg: audio conversion + segmentation
  • curl: Xiaoyuzhou audio download, Bilibili API
  • GROQ_API_KEY: Whisper transcription API (free at https://console.groq.com/keys)

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.