/claude-writing-skills:yt-dlp-directfrom claude-writing-skills
Downloads or inspects online audio/video using the installed yt-dlp CLI. Handles single videos, playlists, audio extraction, subtitles, format inspection, output templates, and cookie-based authentication.
Ships in claude-writing-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
这个 skill 只负责一件事:
yt-dlp CLI 处理在线视频或音频下载任务不负责:
yt-dlp一句话原则:如果用户要下载、提音频、拿字幕、看格式、抓播放列表,优先直接用 yt-dlp,不要先写一堆脚本。
适用场景:
yt-dlp 下载这个视频”yt-dlp”不适用场景:
yt-dlp 是什么ffmpeg开始前先确认:
yt-dlp 在 PATH 中ffmpeg优先检查:
which yt-dlp
yt-dlp --version
如需判断 ffmpeg 是否可用,可再看:
ffmpeg -version
ffprobe -version
-F--cookies-from-browser先判断链接能不能被 extractor 识别:
yt-dlp --simulate --print "%(title)s" "<url>"
如果只是想看元信息而不下载:
yt-dlp --dump-single-json "<url>"
当用户要指定清晰度、编码、音轨,先看格式:
yt-dlp -F "<url>"
如果用户没明确要求,通常优先:
yt-dlp -f "bv*+ba/b" "<url>"
这也是 yt-dlp 当前默认偏好的组合思路。
默认建议带输出模板:
yt-dlp -o "%(title)s [%(id)s].%(ext)s" "<url>"
如果需要固定目录:
yt-dlp -P "/target/dir" -o "%(title)s [%(id)s].%(ext)s" "<url>"
用户要音频时,优先:
yt-dlp -x --audio-format mp3 "<url>"
更保守地保留高质量音频格式时:
yt-dlp -x --audio-format m4a "<url>"
只下字幕,不下视频:
yt-dlp --write-subs --write-auto-subs --skip-download "<url>"
如果用户只要特定语言:
yt-dlp --write-subs --sub-langs "en,zh-Hans,zh-Hant" --skip-download "<url>"
用户给 playlist 时,先提醒量级。常用命令:
yt-dlp --flat-playlist "<playlist-url>"
yt-dlp -I 1:10 "<playlist-url>"
yt-dlp -o "%(playlist_index)s - %(title)s [%(id)s].%(ext)s" "<playlist-url>"
先用 --flat-playlist 看条目,再决定是否全下。
如果用户只有关键词,没有直接链接,可以用搜索前缀:
yt-dlp "ytsearch5:Claude Code skills"
只拿结果,不立即下载时:
yt-dlp --simulate --print "%(title)s | %(webpage_url)s" "ytsearch5:Claude Code skills"
很多站点或私有内容需要登录态。优先顺序:
--cookies-from-browser--cookies <file>高频用法:
yt-dlp --cookies-from-browser chrome "<url>"
yt-dlp --cookies-from-browser safari "<url>"
yt-dlp --cookies cookies.txt "<url>"
如果站点要求浏览器指纹或 TLS 模拟,可考虑:
yt-dlp --impersonate chrome "<url>"
默认模板建议:
%(title)s [%(id)s].%(ext)s
播放列表常用:
%(playlist_index)s - %(title)s [%(id)s].%(ext)s
按上传者归档:
%(uploader)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s
ffmpeg-x 是提取音频,不是原封不动复制音轨-f、-S、--remux-video、--recode-video常见例子:
yt-dlp -S "res:1080,ext:mp4:m4a" "<url>"
yt-dlp --remux-video mp4 "<url>"
yt-dlp --embed-thumbnail --add-metadata "<url>"
yt-dlp 支持站点很多,但“列在清单里”不等于今天一定能用。
判断顺序:
--simulate需要时读取:
执行后,回复里至少说明:
先看版本:
yt-dlp --version
如果太旧,提醒用户更新。
优先检查:
ffmpeg -version
优先试:
yt-dlp --cookies-from-browser <browser> "<url>"
先加详细日志:
yt-dlp -v "<url>"
先用:
yt-dlp --flat-playlist "<url>"
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/article-optimizerUse when the user wants to improve a specific article under a fixed viral-scoring rubric, iterate on one article to raise its score, or run single-article scoring plus rewrite loops. Best for content optimization experiments where the scoring prompt stays fixed and the article text is the thing being changed./publisher-wechatsyncUse when the user has a finished blog master draft and wants to publish it to multiple content platforms (知乎/掘金/CSDN/公众号 等) via the @wechatsync/cli tool. Handles pre-flight auth checks, platform selection, dry-run preview, and the actual sync. Do NOT use for writing, rewriting, compliance rewriting, or topic selection — this skill only publishes existing drafts as-is./npx claudepluginhub xiaomoboy/claude-writing-skills --plugin claude-writing-skillsOther plugins' skills for the same job