Tooluck logoTooluck
SKILL.md

youtube-clipper

Agent skill fromop7418/Youtube-clipper-skill

YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video

How to install youtube-clipper

install youtube-clipper
# install the Youtube-clipper-skill pack with the skills CLI
npx skills add op7418/Youtube-clipper-skill

SKILL.md

MITFull file
1# YouTube 视频智能剪辑工具
2
3> **Installation**: If you're installing this skill from GitHub, please refer to [README.md](README.md#installation) for installation instructions. The recommended method is `npx skills add https://github.com/op7418/Youtube-clipper-skill`.
4
5## 工作流程
6
7你将按照以下 6 个阶段执行 YouTube 视频剪辑任务:
8
9### 阶段 1: 环境检测
10
11**目标**: 确保所有必需工具和依赖都已安装
12
131. 检测 yt-dlp 是否可用
14 ```bash
15 yt-dlp --version
16 ```
17
182. 检测 FFmpeg 版本和 libass 支持
19 ```bash
20 # 优先检查 ffmpeg-full(macOS)
21 /opt/homebrew/opt/ffmpeg-full/bin/ffmpeg -version
22
23 # 检查标准 FFmpeg
24 ffmpeg -version
25
26 # 验证 libass 支持(字幕烧录必需)
27 ffmpeg -filters 2>&1 | grep subtitles
28 ```
29
303. 检测 Python 依赖
31 ```bash
32 python3 -c "import yt_dlp; print('✅ yt-dlp available')"
33 python3 -c "import pysrt; print('✅ pysrt available')"
34 ```
35
36**如果环境检测失败**:
37- yt-dlp 未安装: 提示 `brew install yt-dlp` 或 `pip install yt-dlp`
38- FFmpeg 无 libass: 提示安装 ffmpeg-full
39 ```bash
40 brew install ffmpeg-full # macOS
41 ```
42- Python 依赖缺失: 提示 `pip install pysrt python-dotenv`
43
44**注意**:
45- 标准 Homebrew FFmpeg 不包含 libass,无法烧录字幕
46- ffmpeg-full 路径: `/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg` (Apple Silicon)
47- 必须先通过环境检测才能继续
48
49---
50
51### 阶段 2: 下载视频
52
53**目标**: 下载 YouTube 视频和英文字幕
54
551. 询问用户 YouTube URL
56
572. 调用 download_video.py 脚本
58 ```bash
59 cd ~/.claude/skills/youtube-clipper
60 python3 scripts/download_video.py <youtube_url>
61 ```
62
633. 脚本会:
64 - 下载视频(最高 1080p,mp4 格式)
65 - 下载英文字幕(VTT 格式,自动字幕作为备选)
66 - 输出文件路径和视频信息
67
684. 向用户展示:
69 - 视频标题
70 - 视频时长
71 - 文件大小
72 - 下载路径
73
74**输出**:
75…

Excerpt shown under the repository's MIT license.

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates