npx skills add nexu-io/open-design --skill youtube-clipper
kunhai-88/skills
youtube-clipper
YouTube 视频智能剪辑工?
Installation
npx skills add kunhai-88/skills --skill youtube-clipper
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Create high-click-through YouTube thumbnails and vertical video covers through the Higgsfield C…
42.8K installsDownloads YouTube video transcripts/subtitles and cover images by URL or video ID. Supports mul…
20K installsDownload YouTube videos with customizable quality and format options. Use this skill when the u…
5.3K installsAutomate YouTube content workflows including video management, analytics, scheduling, and chann…
4.4K installsExtract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or…
3.3K installsAlso in this package
Other skills from kunhai-88/skills · top by installs.
npx skills add kunhai-88/skills
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
npx skills add https://github.com/op7418/Youtube-clipper-skill
npx skills add smithery/op7418 --skill youtube-clipper
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md3,875 B -
docs
SUMMARY.md447 B
History
- First seen on skills.sh
- First recorded snapshot · 6 installs
SKILL.md
YouTube 视频智能剪辑工具
按照以下 6 个阶段执行 YouTube 视频剪辑任务:
阶段 1:环境检测
确保所有必需工具和依赖都已安装:
- 检测 yt-dlp 是否可用
- 检测 FFmpeg 版本和 libass 支持(字幕烧录必需)
- 检测 Python 依赖(yt_dlp、pysrt)
注意:标准 Homebrew FFmpeg 不包含 libass,无法烧录字幕。需要使用 ffmpeg-full(路径:/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg,Apple Silicon)。
阶段 2:下载视频
询问用户 YouTube URL,调用 download_video.py 脚本:
- 下载视频(最高 1080p,mp4 格式)
- 下载英文字幕(VTT 格式,自动字幕作为备选)
- 输出文件路径和视频信息(标题、时长、文件大小)
阶段 3:分析章节(核心差异化功能)
使用 Claude AI 分析字幕内容,生成精细章节(2-5 分钟级别):
- 调用
analyze_subtitles.py解析 VTT 字幕 - 执行 AI 分析:阅读完整字幕、理解内容语义与主题转换点、识别自然话题切换位置
- 为每个章节生成:标题(10-20 字)、时间范围、核心摘要(1-2 句话,50-100 字)、关键词(3-5 个)
- 章节生成原则:粒度 2-5 分钟、完整性(覆盖所有内容)、有意义(每个章节是相对独立话题)、自然切分(在主题转换点切分)
阶段 4:用户选择
让用户选择要剪辑的章节和处理选项:
- 使用 AskUserQuestion 工具让用户选择章节(支持多选)
- 询问处理选项:是否生成双语字幕、是否烧录字幕到视频、是否生成总结文案
- 确认用户选择并展示处理计划
阶段 5:剪辑处理(核心执行阶段)
对每个用户选择的章节,并行执行:
- 剪辑视频片段:使用 FFmpeg 精确剪辑,保持原始质量
- 提取字幕片段:从完整字幕中过滤出该时间段,调整时间戳,转换为 SRT
- 翻译字幕(如选择):批量翻译优化(每批 20 条,节省 95% API 调用),保持技术术语准确性,口语化表达,简洁流畅
- 生成双语字幕文件(如选择):合并英文与中文字幕,格式 SRT 双语(英文在上,中文在下)
- 烧录字幕到视频(如选择):使用 ffmpeg-full(libass 支持),使用临时目录解决路径空格问题,字幕样式(字体大小 24、底部边距 30、白色文字+黑色描边)
- 生成总结文案(如选择):基于章节标题、摘要和关键词,生成适合社交媒体的文案
进度展示:每个步骤显示进度和状态。
阶段 6:输出结果
组织输出文件并展示给用户:
- 创建输出目录
./youtube-clips/<日期时间>/ - 组织文件结构(原始剪辑、烧录字幕版本、双语字幕文件、总结文案)
- 展示输出目录路径、文件列表(带文件大小)、快速预览命令
- 询问是否继续剪辑其他章节
关键技术点
- FFmpeg 路径空格问题:使用临时目录解决
- 批量翻译优化:每批 20 条字幕一起翻译
- 章节分析精细度:生成 2-5 分钟粒度章节,避免半小时粗粒度
- FFmpeg vs ffmpeg-full:标准 FFmpeg 无 libass,ffmpeg-full 包含 libass
依赖
yt-dlp、FFmpeg(ffmpeg-full 用于字幕烧录)、Python(pysrt、python-dotenv)