
Media Downloader
Fetch stock images, stock clips, or YouTube segments from a plain-language brief so content and landing assets ship faster.
Overview
Media Downloader is an agent skill most often used in Grow (also Build) that searches and downloads images and video—including YouTube segments with auto-trim—from everyday language requests.
Install
npx skills add https://github.com/yizhiyanhua-ai/media-downloader --skill media-downloaderWhat is this skill?
- Natural-language triggers in Chinese and English (e.g. download images, find video, /media)
- Image search and download from stock libraries with on-demand Pexels API key setup only when needed
- YouTube download and automatic trim to a requested time range or duration
- Free-stock video clips with smart length trimming to match briefs
- Bilingual user guidance so non-English builders can drive the same workflows
- Example workflow cites downloading 5 cat images from a single request
- Defers Pexels API key configuration until the first image download
Adoption & trust: 523 installs on skills.sh; 387 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You know the visual or clip you need but waste time hunting stock sites, handling API keys, and cutting video length by hand.
Who is it for?
Content-focused solo builders who trigger downloads via chat commands and want YouTube clipping without a separate desktop tool chain.
Skip if: Rights-sensitive broadcast pipelines that need legal review of every asset, or workflows that forbid network access and external API keys.
When should I use this skill?
Triggers such as 下载图片, 找视频, download media, download images, find video, or /media when you need searched images or trimmed video from a description.
What do I get? / Deliverables
You receive downloaded images or trimmed video files matched to your description, with API key setup only when stock image access is first required.
- Downloaded image files from search results
- Trimmed video clips at requested duration or time range
- User-facing API key setup steps when stock access is first needed
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Media sourcing usually happens when you are producing posts, demos, or landing visuals during growth, though the same skill helps during build when assembling marketing prototypes. Downloading and trimming clips is a content-creation task—finding hero images, b-roll, and timed segments—not core application coding.
Where it fits
Download five on-brand cat images for a newsletter hero after a one-line Chinese prompt.
Pull sunset photos while mocking a landing page in the repo without leaving the agent session.
Grab a 30-second cooking b-roll clip trimmed for a short-form launch teaser.
How it compares
An agent-driven media fetch integration, not a self-hosted DAM or creative suite like Figma.
Common Questions / FAQ
Who is media-downloader for?
Indie creators and builders who assemble social posts, demos, and landing pages and want the coding agent to search, download, and trim media from short prompts.
When should I use media-downloader?
Use it in Grow when sourcing content assets; in Build when prototyping landing or demo visuals; and in Launch when you need quick b-roll or stills for distribution experiments.
Is media-downloader safe to install?
It uses network access and third-party APIs; review the Security Audits panel on this page, store Pexels keys in environment variables, and verify licensing for commercial use of downloaded media.
SKILL.md
READMESKILL.md - Media Downloader
# 🎬 Media Downloader / 智能媒体下载器 只需告诉我你想要什么,我就会帮你找到并下载相关的图片和视频! Just tell me what you want, and I'll find and download relevant images and videos for you! --- ## 🚀 我能帮你做什么?/ What Can I Do? | 你说... / You say... | 我会... / I will... | |---------------------|---------------------| | "下载一些可爱的猫咪图片" | 搜索并下载 5 张猫咪图片 | | "Download sunset photos" | Search and download sunset images | | "找一段海浪的视频,15秒左右" | 下载一段 15 秒的海浪视频 | | "Get me a 30-second cooking video" | Download a trimmed cooking clip | | "下载这个 YouTube 视频的 1:30-2:00" | 下载并自动剪辑指定片段 | --- ## ✨ 功能特点 / Features - 🖼️ **图片下载** - 从专业图库搜索高清图片 - 🎬 **视频素材** - 获取免费商用视频片段 - 📺 **YouTube 下载** - 支持下载和剪辑 - ✂️ **智能剪辑** - 自动裁剪到你需要的长度 - 🌍 **中英双语** - 支持中文和英文指令 --- ## 📋 Skill 执行逻辑 / Skill Execution Logic ### 🔑 API Key 按需配置 / On-Demand API Key Configuration **重要**:不要在用户安装时就要求配置 API Key!按以下逻辑处理: 1. **用户下载 YouTube 视频时**:直接执行,不需要任何 API Key 2. **用户首次下载图片时**: - 检查 `PEXELS_API_KEY` 环境变量是否存在 - 如果不存在,引导用户配置: ``` 检测到你还没有配置图库 API Key。下载图片需要一个免费的 API Key。 请按以下步骤操作: 1. 打开 https://www.pexels.com,点击 Join 注册(支持 Google/Apple 一键注册) 2. 注册后访问 https://www.pexels.com/api/,点击 Your API Key 3. 复制显示的密钥,粘贴给我 ``` - 用户提供 API Key 后,帮用户保存到系统环境变量: ```bash echo 'export PEXELS_API_KEY="用户的密钥"' >> ~/.zshrc && source ~/.zshrc ``` - 然后继续完成图片下载任务 ### 🎬 YouTube 下载优先 / YouTube First 当用户说「下载视频」但没有指定来源时,优先推荐 YouTube: - YouTube 不需要 API Key - 内容更丰富 - 支持时间段裁剪 --- ## 💬 使用示例 / Examples ### 下载图片 / Download Images ``` "帮我下载 5 张星空的图片" "Download 10 coffee shop photos" "找一些适合做壁纸的风景图" ``` ### 下载视频素材 / Download Video Clips ``` "下载一段城市夜景的视频,30秒以内" "Find me a 15-second ocean wave video" "找一些适合做背景的自然风光视频" ``` ### YouTube 下载与剪辑 / YouTube Download & Trim ``` "下载这个视频:https://youtube.com/watch?v=xxx" "下载这个 YouTube 视频的第 2 分钟到第 3 分钟" "只下载这个视频的音频" ``` --- ## 📁 下载位置 / Download Location 所有文件默认保存在: ``` ~/.claude/skills/media-downloader/downloads/ ``` --- ## ❓ 常见问题 / FAQ ### Q: 为什么搜索图片没有结果? A: 请确认已配置 API Key。运行 `status` 命令检查配置状态。 ### Q: YouTube 视频下载失败? A: YouTube 下载不需要 API Key,但需要安装 yt-dlp。运行 `pip install yt-dlp` 安装。 ### Q: 视频剪辑功能不工作? A: 需要安装 ffmpeg。macOS 用户运行 `brew install ffmpeg`。 ### Q: 这些图片/视频可以商用吗? A: Pexels、Pixabay、Unsplash 的素材都可以免费商用,无需署名(但署名是一种礼貌)。 --- ## 🛠️ CLI 命令参考 / CLI Reference 供高级用户直接使用命令行: ```bash # 检查配置状态 media_cli.py status # 下载图片 media_cli.py image "关键词" -n 数量 -o 输出目录 # 下载视频素材 media_cli.py video "关键词" -d 最大时长 -n 数量 # 下载 YouTube 视频 media_cli.py youtube "URL" --start 开始秒数 --end 结束秒数 # 搜索媒体(不下载) media_cli.py search "关键词" --type image/video/all # 剪辑本地视频 media_cli.py trim 输入文件 --start 开始 --end 结束 ``` --- ## 📦 支持的素材来源 / Supported Sources | 来源 Source | 类型 Type | 特点 Features | |-------------|-----------|---------------| | Pexels | 图片 + 视频 | 高质量,更新快 | | Pixabay | 图片 + 视频 | 数量多,种类全 | | Unsplash | 图片 | 艺术感强,适合壁纸 | | YouTube | 视频 | 内容丰富,支持剪辑 | --- 🎬 **开始使用吧!直接告诉我你想要什么图片或视频!** 🎬 **Start using! Just tell me what images or videos you want!** # 🎬 智能媒体下载器 > 根据你的描述自动搜索和下载图片、视频片段,支持视频自动剪辑。 [🇬🇧 English](./README.md) --- ## 🚀 我能帮你做什么? | 你说... | 我会... | |---------|---------| | "下载一些可爱的猫咪图片" | 搜索并下载 5 张猫咪图片 | | "找一段海浪的视频,15秒左右" | 下载一段 15 秒的海浪视频 | | "下载一段 30 秒的烹饪视频" | 下载并剪辑烹饪视频 | | "下载这个 YouTube 视频的 1:30-2:00" | 下载并自动剪辑指定片段 | --- ## ✨ 功能特点 - 🖼️ **图片下载** - 从专业图库搜索高清图片 - 🎬 **视频素材** - 获取免费商用视频片段 - 📺 **YouTube 下载** - 支持下载和剪辑 - ✂️ **智能剪辑** - 自动裁剪到你需要的长度 - 🌍 **中英双语** - 支持中文和英文指令 --- ## ⚡ 一句话安装 在 Claude Code 中对 Claude 说: > **"帮我安装 https://github.com/yizhiyanhua-ai/media-downloader.git 这个 skill 和它的所有依赖,并配置 yt-dlp 使用浏览器 cookies"** Claude 会自动完成: - 下载 skill 到正确位置 - 安装 yt-dlp、ffmpeg 等依赖工具 - 配置浏览器 cookies(解决 YouTube「确认你不是机器人」的问题) - 检查