监控Nate B Jones的YouTube频道,拉取每个新视频字幕(YouTube字幕或自动转录音频),生成摘要和要点总结。
Use this skill whenever you need to keep Richard (or any configured subscriber) up to date on new Nate B Jones videos. The workflow:
All runtime options live in references/config-example.yml. Copy that file, rename it (e.g. config.yml), fill in your preferences, and point the workflow to it.
references/config-example.yml to config.yml (or any path you prefer).channel_url or channel_id (the example already targets @NateBJones).poll_cron (default daily at 09:00 local).outputs.email.to, outputs.chat.targets, outputs.doc.type/path.gog skill.skills/nate-b-jones-digest/config.yml).Preferred: use the YouTube Data API playlistItems endpoint for the channel's uploads playlist. Example:
bash
curl "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&maxResults=5&playlistId=UPLOADS_PLAYLIST_ID&key=$YOUTUBE_API_KEY"
Lightweight alternative: use yt-dlp to check the latest upload ID without downloading video:
bash
yt-dlp --flat-playlist --dump-json "https://www.youtube.com/@NateBJones/videos" | head -n 1 > latest.json
jq -r '.id' latest.json
Compare the discovered video ID with the last processed ID stored in your run logs (e.g., a simple last_video.txt or a Notion/Sheets tracker). Only proceed if it's new.
Try official captions via youtube_transcript_api:
python
from youtube_transcript_api import YouTubeTranscriptApi
transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=['en'])
text = '\n'.join([chunk['text'] for chunk in transcript])
If captions are unavailable, download audio and run Whisper: bash
yt-dlp -f 140 -o audio.m4a "https://www.youtube.com/watch?v=$VIDEO_ID"
whisper audio.m4a --model medium --language en --task transcribe --output_format txt
Save the raw transcript alongside metadata (title, URL, publish date, duration). Keep it in your logs for traceability but do not distribute it by default.
Produce:
[05:42] Key insight).Template:
text
# Nate B Jones Daily Digest — {{DATE}}
**Video:** {{TITLE}} ({{DURATION}}) → {{URL}}
**Abstract:** ...
## Highlights
- ...
## References & Links
- {{URL}}
- ...
Do not attach the transcript unless someone explicitly asks for it—email only the digest body linked above.
bash
GOG_KEYRING_PASSWORD=... gog gmail send \
--to "{{config.outputs.email.to}}" \
--subject "Nate B Jones Digest — {{DATE}}" \
--body-file summary.txt \
--body-html summary.html
message action=send ...).config.outputs.chat.targets (list of surfaces).Google Docs: bash
gog docs create "Nate B Jones Digest {{DATE}}" --body summary.md
gog docs share <docId> --email {{config.outputs.doc.share_with}}
Markdown on disk: write to the specified path in outputs.doc.path.
Create a cron job or OpenClaw cron entry using poll_cron from config. Each run should:
Keep lightweight audit logs (CSV or JSON) so you can prove what was sent and avoid duplicate emails.
references/config-example.yml — copy/edit this to match each installation.youtube_transcript_api docs: https://pypi.org/project/youtube-transcript-api/Stick to the playbook format every time so downstream consumers get consistent digests, and always fall back to Whisper if captions are missing.