Video Downloader
Download single videos from user-provided URLs with predictable quality, format, and output paths.
Setup
On first use, read setup.md for integration guidelines.
When to Use
Use this skill when the user asks to download a video or extract audio from a video URL.
It is optimized for one-off downloads with explicit quality and format requirements.
Architecture
Memory lives in ~/video-downloader/. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
Load only what you need to keep context small during execution.
| Topic | File |
|---|
| Setup flow | INLINECODE3 |
| Memory template |
memory-template.md |
| Command recipes |
commands.md |
| Download script |
download_video.py |
Core Rules
1. Confirm Rights and Target First
- - Ask for the exact URL and intended use when unclear.
- If the request implies unauthorized copying, refuse and suggest legal alternatives.
2. Inspect Metadata Before Downloading
- - Run metadata check first to confirm title, duration, and available formats.
- If metadata fetch fails, stop and report the exact error instead of retrying blindly.
3. Match Quality to User Intent
- - Use
best when user says "highest quality". - Use capped quality (
1080p, 720p, etc.) for smaller files or device limits. - Use audio-only mode only when they explicitly want audio extraction.
4. Use Deterministic Output Names
- - Save files as
%(title)s [%(id)s].%(ext)s to reduce collisions. - Keep downloads in a user-approved directory and never write outside it.
5. Prefer the Local Wrapper Script
- - Use
python3 download_video.py "<url>" ... for consistent behavior. - Fall back to raw
yt-dlp commands only if the user asks for custom flags not covered by the script.
6. Verify Output Before Declaring Success
- - Confirm file exists, extension matches request, and size is non-zero.
- For audio-only downloads, confirm output is
.mp3.
Common Traps
- - Downloading playlists accidentally -> use
--no-playlist by default. - Choosing
best for limited storage -> oversized files and slow transfers. - Re-trying blocked URLs repeatedly -> temporary ban risk and no progress.
- Saving with title only -> filename collisions across similar uploads.
- Skipping metadata check -> wrong media downloaded from redirected links.
External Endpoints
The downloader only contacts domains implied by the user-provided URL.
| Endpoint | Data Sent | Purpose |
|---|
User-provided video host URL domains (via yt-dlp) | Requested media URL and standard downloader headers | Fetch metadata and media streams |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - Only the target media URL and standard downloader request headers sent by
yt-dlp.
Data that stays local:
- - Downloaded files in the selected output folder.
- Optional memory notes under
~/video-downloader/.
This skill does NOT:
- - Store credentials in plain text.
- Access files outside user-approved output paths.
- Download playlists unless the user explicitly asks.
- Make undeclared network requests outside the target media host.
Trust
By using this skill, requests are sent to the video host domains behind the provided URL.
Only install if you trust those services with your request metadata.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
video — video processing workflows - INLINECODE21 — codec conversion tasks
- INLINECODE22 — audio cleanup workflows
- INLINECODE23 — transcript extraction
Feedback
- - If useful: INLINECODE24
- Stay updated: INLINECODE25
技能名称: Video Downloader
详细描述:
视频下载器
根据用户提供的URL,以可预测的质量、格式和输出路径下载单个视频。
设置
首次使用时,请阅读 setup.md 获取集成指南。
使用时机
当用户要求下载视频或从视频URL中提取音频时,使用此技能。
它针对具有明确质量和格式要求的单次下载进行了优化。
架构
记忆文件存储在 ~/video-downloader/ 目录下。结构请参见 memory-template.md。
text
~/video-downloader/
├── memory.md # 状态 + 用户偏好
├── downloads-log.md # 可选:已完成下载的历史记录
└── failed-downloads.md # 可选:重试和失败原因
快速参考
执行期间仅加载所需内容,以保持上下文精简。
memory-template.md |
| 命令示例 | commands.md |
| 下载脚本 | download_video.py |
核心规则
1. 首先确认权限和目标
- - 当不明确时,询问确切的URL和预期用途。
- 如果请求暗示未经授权的复制,则拒绝并建议合法的替代方案。
2. 下载前检查元数据
- - 首先运行元数据检查,以确认标题、时长和可用格式。
- 如果元数据获取失败,则停止并报告确切错误,而不是盲目重试。
3. 根据用户意图匹配质量
- - 当用户说最高质量时,使用 best。
- 对于较小的文件或设备限制,使用限制质量(1080p、720p 等)。
- 仅当用户明确要求提取音频时,才使用纯音频模式。
4. 使用确定性输出文件名
- - 将文件保存为 %(title)s [%(id)s].%(ext)s 以减少冲突。
- 将下载文件保存在用户批准的目录中,切勿写入该目录之外。
5. 优先使用本地包装脚本
- - 使用 python3 download_video.py ... 以获得一致的行为。
- 仅当用户要求脚本未涵盖的自定义标志时,才回退到原始 yt-dlp 命令。
6. 在声明成功前验证输出
- - 确认文件存在、扩展名与请求匹配且大小不为零。
- 对于纯音频下载,确认输出为 .mp3。
常见陷阱
- - 意外下载播放列表 -> 默认使用 --no-playlist。
- 为有限存储选择 best -> 文件过大且传输缓慢。
- 反复重试被屏蔽的URL -> 存在临时封禁风险且无进展。
- 仅使用标题保存 -> 类似上传的文件名冲突。
- 跳过元数据检查 -> 从重定向链接下载了错误的媒体。
外部端点
下载器仅联系用户提供的URL所隐含的域名。
| 端点 | 发送的数据 | 目的 |
|---|
| 用户提供的视频托管URL域名(通过 yt-dlp) | 请求的媒体URL和标准下载器标头 | 获取元数据和媒体流 |
不会向外部发送其他数据。
安全与隐私
离开您机器的数据:
- - 仅 yt-dlp 发送的目标媒体URL和标准下载器请求标头。
保留在本地的数据:
- - 所选输出文件夹中的已下载文件。
- ~/video-downloader/ 下的可选记忆笔记。
此技能不会:
- - 以纯文本形式存储凭据。
- 访问用户批准的输出路径之外的文件。
- 除非用户明确要求,否则下载播放列表。
- 向目标媒体主机之外的未声明网络发出请求。
信任
使用此技能,请求将发送到所提供URL背后的视频托管域名。
仅当您信任这些服务处理您的请求元数据时才安装。
相关技能
如果用户确认,使用 clawhub install
安装:
- - video — 视频处理工作流
- ffmpeg — 编解码器转换任务
- audio — 音频清理工作流
- youtube-video-transcript — 转录提取
反馈
- - 如果觉得有用:clawhub star video-downloader
- 保持更新:clawhub sync