Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add xiaomoBoy/claude-writing-skills --skill yt-dlp-directgit clone --depth 1 https://github.com/xiaomoBoy/claude-writing-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xiaomoboy/claude-writing-skills/yt-dlp-direct)<a href="https://agentmods.dev/skills/xiaomoboy/claude-writing-skills/yt-dlp-direct"><img src="https://agentmods.dev/badge/skills/xiaomoboy/claude-writing-skills/yt-dlp-direct/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xiaomoboy/claude-writing-skills/yt-dlp-direct"><img src="https://agentmods.dev/badge/skills/xiaomoboy/claude-writing-skills/yt-dlp-direct.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.01859 |
| Opus 5 | $0.00032 | $0.00929 |
| Sonnet 5 | $0.00013 | $0.00372 |
| Haiku 4.5 | $0.00006 | $0.00186 |
Grade A, and why
yt-dlp-direct scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
yt-dlp Direct
这个 skill 只负责一件事:
- 直接用本机已安装的
yt-dlpCLI 处理在线视频或音频下载任务
不负责:
- 讲版权合规政策
- 绕开平台 DRM
- 用浏览器手动录屏替代下载
- 重新安装
yt-dlp
一句话原则:如果用户要下载、提音频、拿字幕、看格式、抓播放列表,优先直接用 yt-dlp,不要先写一堆脚本。
When To Use
适用场景:
- 用户说“用
yt-dlp下载这个视频” - 用户说“帮我提成 mp3 / m4a”
- 用户说“把字幕也一起下了”
- 用户说“先看看有哪些格式”
- 用户说“下载整个 playlist / channel / 搜索结果”
- 用户说“这个站点能不能用
yt-dlp”
不适用场景:
- 用户只是想知道
yt-dlp是什么 - 用户要破解 DRM 或受保护流
- 用户要做复杂媒体剪辑,真正该用
ffmpeg
Preconditions
开始前先确认:
yt-dlp在 PATH 中- 当前目录或目标目录可写
- 如果任务涉及合并视频音频、转码、嵌入缩略图,最好已有
ffmpeg
优先检查:
which yt-dlp
yt-dlp --version
如需判断 ffmpeg 是否可用,可再看:
ffmpeg -version
ffprobe -version
Working Rules
- 默认先做只读探测,再真正下载
- 不清楚格式时,先
-F - 用户没指定落盘规则时,优先给安全输出模板
- 播放列表默认提醒数量和体积风险
- 涉及登录态时,优先
--cookies-from-browser - 需要更稳定的 YouTube 支持时,记得 JavaScript runtime / ejs 依赖
- 不要擅自覆盖大量文件;必要时显式指定输出路径
Core Workflow
1. Inspect First
先判断链接能不能被 extractor 识别:
yt-dlp --simulate --print "%(title)s" "<url>"
如果只是想看元信息而不下载:
yt-dlp --dump-single-json "<url>"
2. Check Formats Before Download
当用户要指定清晰度、编码、音轨,先看格式:
yt-dlp -F "<url>"
如果用户没明确要求,通常优先:
yt-dlp -f "bv*+ba/b" "<url>"
这也是 yt-dlp 当前默认偏好的组合思路。
3. Safe Single-Video Download
默认建议带输出模板:
yt-dlp -o "%(title)s [%(id)s].%(ext)s" "<url>"
如果需要固定目录:
yt-dlp -P "/target/dir" -o "%(title)s [%(id)s].%(ext)s" "<url>"
4. Extract Audio
用户要音频时,优先:
yt-dlp -x --audio-format mp3 "<url>"
更保守地保留高质量音频格式时:
yt-dlp -x --audio-format m4a "<url>"
5. Download Subtitles
只下字幕,不下视频:
yt-dlp --write-subs --write-auto-subs --skip-download "<url>"
如果用户只要特定语言:
yt-dlp --write-subs --sub-langs "en,zh-Hans,zh-Hant" --skip-download "<url>"
6. Playlists and Channels
用户给 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>"
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 306 lines · 63 tokens per session scan A 24bc453fb4ff
yt-dlp-direct is a skill published in the GitHub repository xiaomoBoy/claude-writing-skills (32 stars, last pushed 3mo ago), licensed MIT. It adds 63 tokens to every session and 1,859 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
story-import
A tool for turning an existing novel into a structured writing project. It analyzes the book and organizes its characters, settings, plot plans, chapters, and tracking data for later writing.
story-long-analyze
A long-form fiction analysis workflow for breaking down a novel’s opening chapters, characters, pacing, turning points, relationships, and overall structure.
story-deslop
A writing editor for Chinese web novels that detects writing patterns often associated with AI-generated text and makes the prose feel more natural.
story-short-analyze
A Chinese-language guide for analysing short popular web fiction, such as stories published on 番茄, 故事会, or 知乎盐选. It examines the core premise, plot structure, emotional arc, twists, writing techniques, and reader appeal.
story
A Chinese-language routing tool for fiction writers that directs requests to tools for outlining, writing, analysis, reviews, covers, importing novels, browser control, and project management.
story-long-write
A Chinese-language coaching workflow for creating long online novels, from the initial idea and outline through characters, plot threads, and chapter drafts. It also supports continuing, revising, or rewriting specified chapters.