/autoclip:template-clonerfrom AutoClip
Reverse-engineers viral short-form video templates (from .mp4/.mov, screenshots, or style descriptions) into AutoClip TemplateSpec v2 packages with safety validation, local hot-install, and GitHub Releases publishing.
Ships in AutoClip. 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.
把任意爆款切片样式(如小红书技术访谈、播客金句、街头快剪、双语演讲)逆向还原成确定性、离线安全、可热更新的 AutoClip 模板包,无需修改任何 AutoClip 源码或重新发版。
开始写模板前,先快速查阅 references/spec-v2-cheatsheet.md 里的 TemplateSpec v2 字段与 window.setData 数据结构。
用户提供本地参考视频或截图时,先运行抽帧分析脚本:
python scripts/template_cloner.py extract-ref /path/to/reference.mp4 --out /tmp/ref_work --frames 6
如果用户发的是多张截图:
python scripts/template_cloner.py extract-ref /path/to/shot1.png /path/to/shot2.png --out /tmp/ref_work
用图像查看工具读取输出的 contact_sheet.jpg(或各张 frame_*.jpg)和 reference_brief.json。
不要凭感觉写样式,逐项把参考画面的视觉语法映射到 AutoClip 的声明式契约:
base.framing / head_zone / zoom):满屏人像(full_face)、画框窗口(window)还是方形(square)?镜头是缓慢推进(creep)还是节拍跳切(step + step_window: true)?base.grade / base.scrim):冷调、暖胶片还是高对比?底部字幕区是否需要渐变暗角衬托(用 base.scrim 声明,由 FFmpeg 单帧循环合成,不要在 CSS 里做大面积模糊)。base.progress_bar):是否有底部/边距进度条?用 progress_bar 声明高度(偶数像素)、边距、颜色和透明度,由 FFmpeg 随视频时钟驱动,避免每帧重绘 PNG。caption_layout):字号(font_px)、左右留白(inset_px)、短屏分句(grouped_screen)还是逐句(phrase / sentence)、中英双语对齐方式(synced / per_cue / sentence_screens)。style.css + template.js):主字幕颜色、强调词高亮色(seg.hl / seg.key)、描边/阴影/胶囊底色、英文字幕层级。overlay.slots & fields.optional):顶部 kicker 标签、讲者名片(speakers)、数字弹卡(numbers)、术语注释卡(gloss)。注意成片默认不烧入封面大标题(由 paint_fill 清空 title_lines)。overlay.safe_area):小红书(xiaohongshu)、抖音(douyin)、TikTok(tiktok)等,确保口播字幕严格落入避脸安全区(y: 1220..1520 或头顶 y: 160..320),严禁在清晰人脸上直接盖大字;只有配合 FFmpeg 时间轴虚化(base.grade: "gblur=sigma=14:enable='lt(t,1.35)'")或全屏纯色节奏插卡时,才允许短暂居中放巨幅标题。1.6.3+ 可选,「大字穿人像背后」):
template.yaml 中声明 base.subject_layer: true、overlay.back_entry: back.html、meta.min_app_version: "1.6.3";back.html + back.js 渲染在人物头肩背后(建议放在发际线景深带 y=505..535,保证上部 75%~80% 清晰可读、底部被发丝自然遮挡),且必须随每句口播动态进场 → 停留 → 淡出,不要常驻死字;index.html + template.js 渲染在人物前景安全区字幕与标签。ACMotion 原子动效库(1.6.4+ 推荐):
template.yaml 顶层声明 variables:(支持 kind: color | number | boolean | select,如 accent_color、font_scale (S/M/L)、depth_enabled),用户选中模板后即可在单行工具条实时改色/调字号/开关景深,渲染前引擎自动注入 fill.vars;./ac-template-sdk.js 内置 window.ACMotion 原子动效套件(springPop / blurIn / clipWipe / kineticSlam / staggerIndex / chunkCaption / safeBands / renderVignette / renderGrain / getVar),以及面向 GSAP 模板的 ACMotion.bindTimeline(tl) 确定性暂停时间轴桥接(motion_runtime: gsap)。.zip 模板包标准互传:用户可在 AutoClip 桌面端模板栏直接点击「导入模板包」导入 .zip,或在已安装模板下点击「导出」分享给他人。先用模板工厂生成标准骨架目录(slug 仅允许小写字母、数字、下划线或连字符,2–32 字符):
python scripts/template_factory.py scaffold <slug> \
--name-zh "中文风格名" \
--name-en "English Style Name" \
--desc-zh "一句话中文适用场景" \
--desc-en "One-line English description" \
--out ./custom_templates
再按第 2 步的拆解结果编辑生成的 4 个文件(脚手架已自动内嵌共享 SDK ./ac-template-sdk.js,可直接调用 ACTemplate.momentAt / moments / zhHtml / enText / activeGloss / occupiedRects / labels):
template.yaml:声明 caption_layout、base.scrim、base.progress_bar、base.grade、meta(3D 景深模版加 base.subject_layer: true 与 overlay.back_entry: back.html)index.html:透明背景 1080×1920 舞台,仅引用本地 ./style.css 和 ./template.js(可捆绑 OFL 开源 .ttf 字体到 ./fonts/)style.css:严格确定性样式(禁止 @keyframes、animation:、外部 http(s):// 字体/图片)template.js(及可选 back.js):必须暴露 window.setData(fill)、window.renderFrame(seconds) 和 window.occupiedRects()(禁止 Math.random、Date.now、performance.now、fetch(、XMLHttpRequest、WebSocket):
renderFrame(seconds) 在无字幕的静默帧也必须返回非空字符串(例如 return capD || 'IDLE'),否则采集器会判定截屏失败;ACTemplate.moments(state) 返回的每条 cue 起止时间字段是 t0 / t1(兼容 start / end);font-family 属性时,内部字体名用单引号(如 var SANS = "'ACSpace', Inter, sans-serif"),避免嵌套双引号导致 XML 静默回退为默认衬线体。python scripts/template_factory.py verify ./custom_templates/<slug>
python scripts/template_cloner.py install-local ./custom_templates/<slug>
安装完成后,模板已原子写入 <AUTOCLIP_DATA_DIR>/templates/<slug>/:
GET /api/v1/studio/templates、CLI --template <slug> 和 MCP list_styles / start_quick_output 会立即识别并可直接出片。要把新模板推送给所有 AutoClip 用户热更新:
python scripts/template_factory.py pack ./custom_templates/<slug> --out ./dist-templates
python scripts/template_factory.py build-catalog ./dist-templates \
--base-url "https://github.com/zhouxiaoka/autoclip-templates/releases/download/<tag>" \
--out ./dist-templates/catalog.json
或将模板文件夹合入仓库后,直接触发 GitHub Actions 工作流 .github/workflows/publish-templates.yml 自动校验、打包并发布 Release。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zhouxiaoka/autoclip --plugin autoclip3 skills in this plugin
/autoclip用 AutoClip 把一条 YouTube / B 站链接,或本地长视频(讲座、访谈、播客、课程),做成各平台成片、封面、发布文案和 ZIP 发布包。 当用户要「出片」「做封面」「写发布文案」「打包发布」「从这个链接做短视频」时使用。 只要原始高光切片、合集,或把旧切片发到 Upload-Post 时不要用这份说明,改读 references/legacy.md。/product-board维护 AutoClip 的公开社区看板。当用户要看社区反馈、整理功能呼声、把一条讨论放进路线图、 或问 GitHub Discussions、Projects、Quackback、Featurebase 该怎么接时使用。 想法留在 Discussions,只有人确认后才开 Issue。Other plugins' skills for the same job