Compresses video files to minimal size with minimal quality loss using HEVC CRF 28, optional target size, VMAF quality gate, and replace-original mode. Activated when user asks to shrink a video.
Ships in video-creation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
把一个或多个视频文件压缩成体积尽可能小、肉眼看不出明显损失的 MP4。默认策略是
libx265 CRF 28、保留分辨率与帧率、AAC 96k,输出 <原名>-compressed.mp4 放在原
文件旁边,原文件不动。质量档、目标体积、VMAF 门禁和替换模式都是可选开关。
lov-list-videoslov-media-creatorlov-media-preprocessorbaoyu-compress-imageEvery generated Skill is connected to the shared user-profile/v1 contract in
skill.yaml. Read the shared user, brand, workspace, preferences, and this
Skill's skills.<skill_id> namespace at the start of every run. Keep the source
portable: resolved personal values belong in the shared profile, never here.
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
本 Skill 读取的长期记录(都可选):
| 记录 | 含义 |
|---|---|
records.default_quality | smallest / small(默认)/ balanced / high |
records.default_codec | hevc(默认)/ h264 / av1 |
records.default_preset | x264/x265 preset,默认按质量档选 |
records.audio_bitrate | AAC 码率 kbit/s,默认按质量档选 |
records.max_edge | 长边像素上限,默认不缩放 |
records.min_vmaf | 画质门禁分数,设置后每次都会测 VMAF 并按需重编 |
records.output_dir | 固定输出目录,默认放原文件旁边 |
records.replace_original | true 时默认替换原文件;只有用户明确说过才可写入 |
Read references/skill-composition.md before deciding whether to invoke or
extend any adjacent capability. The record distinguishes optional upstream and
downstream handoffs from embedded Kit modules. Do not silently depend on a
sibling Skill that is not shipped with this source.
You MUST follow these steps in order.
SKILL_DIR if the environment provides it.scripts/compress_video.py、scripts/profile_store.py、
references/encoding-guide.md、references/skill-composition.md 均存在。ffmpeg -encoders 里必须有 libx265;缺 libvmaf 时不能用 --vmaf /
--min-vmaf,缺 libsvtav1 时不能用 --codec av1。When running scripts manually:
export SKILL_DIR="/path/to/lov-compress-video"
Resolve context.profile on every invocation. The precedence is current request,
project context, Skill-specific profile records, shared preferences, shared
brand/user profile, then safe defaults. A direct user statement about a durable
preference or brand fact should be saved with scripts/profile_store.py record
using --confirm, followed by a concise saved-path report.
--output-dir 或替换模式。small:CRF 28)--quality balanced 或 high--quality smallest(CRF 32、slow、长边 1080、64k 音频)--target-size XXM(两遍码率模式)--codec h264--fast(VideoToolbox,体积大约多两成,画质分更低)--replace;原文件进废纸篓,--permanent 才直接删除replace_original。--min-vmaf 90:脚本会测分并在不达标时降 CRF
重编,最多两次。VMAF 测量约等于再解码一遍两条视频,长片要先告知耗时。references/skill-composition.md。批量场景的上游是 lov-list-videos
(先列出候选再压),下游是 lov-media-publisher(压完上传)。python3 "$SKILL_DIR/scripts/compress_video.py" input.mov --dry-run
python3 "$SKILL_DIR/scripts/compress_video.py" input.mov
# 画质门禁:VMAF 不到 90 就降 CRF 重编
python3 "$SKILL_DIR/scripts/compress_video.py" input.mov --min-vmaf 90
# 目标体积 50 MB(两遍编码)
python3 "$SKILL_DIR/scripts/compress_video.py" input.mov --target-size 50M
# 4K 压成 1080p、30fps、H.264,给兼容性优先的场景
python3 "$SKILL_DIR/scripts/compress_video.py" input.mov --max-edge 1080 --fps 30 --codec h264
# 批量:输出到一个目录,JSON 结果供后续统计
python3 "$SKILL_DIR/scripts/compress_video.py" *.MP4 --output-dir ~/compressed --json
# 替换模式:写 <原名>.mp4,原文件移到废纸篓
python3 "$SKILL_DIR/scripts/compress_video.py" input.mov --replace
进度显示在 stderr:百分比、速度倍数与 ETA。长片可以直接告诉用户预计时长 (1080p 在 Apple Silicon 上 libx265 medium 约 3 到 6 倍速,即 1 小时视频 10 到 20 分钟)。
用户说出长期偏好时写回 Profile,例如“以后都用 h264”:
python3 "$SKILL_DIR/scripts/profile_store.py" record \
--skill-id lov-compress-video \
--path records.default_codec \
--value '"h264"' \
--confirm
duration-mismatch;输出不比源小会丢弃并报 skipped-larger(--force 保留)。
两种情况下替换模式都不会动原文件。--json 里已包含这些字段。--fast)或磁盘空间不足。skill-card.yaml, cases/cases.json, and pricing-card.yaml as the
standard trust bundle for this Skill.--codec h264 需 libx264,--codec av1 需
libsvtav1,--vmaf / --min-vmaf 需 libvmaf;Homebrew 的 ffmpeg 默认全部包含--fast 与废纸篓式 --replace 依赖 macOS(VideoToolbox、Finder)references/skill-composition.mdCHANGELOG.md (opens in a new tab)LICENSE (opens in a new tab)README.md (opens in a new tab)cases/cases.json (opens in a new tab)pricing-card.yaml (opens in a new tab)references/encoding-guide.md (opens in a new tab)references/skill-card-standard.md (opens in a new tab)references/skill-composition.md (opens in a new tab)references/user-profile.md (opens in a new tab)scripts/compress_video.py (opens in a new tab)scripts/profile_store.py (opens in a new tab)scripts/validate_skill.py (opens in a new tab)skill-card.md (opens in a new tab)skill-card.yaml (opens in a new tab)skill.yaml (opens in a new tab)tests/test_compress_video.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/lov-branding-consistency面向公众号、网站、App、策划案、海报等真实发布场景,为读者可见文本建立受众、品牌角色、组件惯例与信息可见性门禁。Use when generating, editing, rendering, publishing, or reviewing audience-facing copy for brand and context fit.
/lov-koubo-media-creator口播短片:输入一个主题,产出 AI 工具类竖版口播的调研、脚本、提词器、上屏素材与封面;作者录完口播后自动剪成上素材下出镜的成片。 Use for 做一条口播短视频、topic to talking-head short.
/lov-laozhang-style-media-creator依据带时间证据的老张心理视频风格包,把新选题和事实素材写成口播脚本、分镜与剪辑时间线,并核验风格和事实边界。Use to create evidence-grounded short videos in this reference style.
/lov-logo-sting所有视频 Skill 共用的品牌片尾(media end):把官方 Logo SVG 做成片尾动画与同帧合成音效,笔画逐拍砸入、字标落在小节线;一条命令按共享 Profile 生成,一条命令并进整片混音。用于「片尾品牌动画」「Logo 收尾」「给视频加品牌片尾」;Use for a logo sting, brand outro or the shared media end.
/lov-media-cloner复刻任一博主的视频风格:冻结样本与留出拆分,全片测量、转写与 OCR,写出带时间证据的八维规则,交付可校验的风格包、说明书与包装模板,可再封装成专属 Skill。Use to clone a creator's video style, e.g. 复刻这个博主的视频风格.
/lov-media-preprocessor对实录视频做全片增强与内容分段,保留有价值内容、剔除已核验无效区间,输出素材库与源时间码。Use when 用户说“全片提亮”“智能分段”“清理课程素材”或 “preprocess and segment video”。
/video-creation:lov-compress-videofrom video-creation
npx claudepluginhub lovstudio/skills --plugin video-creationOther plugins' skills for the same job