/effects
参数:$ARGUMENTS
所有操作均在此技能的文件夹(包含此文件的文件夹,通常为 ~/.claude/skills/effects)中运行。将其称为 SKILL_DIR。以用户的语言回复用户(默认为法语)。
1. 确保已安装
运行 node SKILL_DIR/scripts/effects.mjs doctor。如果显示任何 ✗,告知用户这是一次性安装(3-10分钟,下载约1-2 GB),并在后台运行 bash SKILL_DIR/setup.sh,然后再次运行 doctor。如果 doctor 提示没有显卡,则警告标有 ✂ 的特效会很慢(每张图像约15秒),并建议使用 --seconds 5 或 --fast。
2. 收集所需内容
- 视频片段:用户附件或指定的视频(最适合纵向9:16人脸摄像头;任何格式都会裁剪为1080×1920)。如果没有,请要求提供。切勿虚构路径。
- 特效:第一个参数。如果缺失或未知,运行
node SKILL_DIR/scripts/effects.mjs list,显示列表并要求选择。"all" / "toutes" / "aperçu" → 运行sheet命令(步骤4)。 - 用户资料:如果
SKILL_DIR/profile.json不存在,询问一次用户的名字或品牌以及 @,然后写入:{"name": "Salim", "handle": "@salim", "accent": "#ff2d87"}(accent 可选)。此后每次重复使用。 - 文本:如果用户提供了文字则使用,否则使用默认值。每个特效读取哪些选项见下方表格。
3. 渲染,并显示清单
创建一个包含以下5个步骤的任务列表,当脚本打印 ✓ n/5 行时勾选它们:
- 找到人脸
- 抠除背景
- 文字放置在你身后
- 色彩校正
- 4K渲染
node SKILL_DIR/scripts/effects.mjs render <特效> "<片段>" [选项]
如果耗时较长(标有 ✂ 的特效在有显卡的情况下每张图像约需1秒,因此10秒视频约需2-3分钟),则在后台运行,并转发进度行。输出文件位于片段旁边,命名为 <片段>-<特效>.mp4(2160×3840)。向用户提供该路径。
有用的选项:
| 选项 | 效果 |
|---|---|
--hd | 1080p而不是4K,速度快一倍 |
--start 3 --seconds 8 | 仅保留片段的一部分 |
--smooth | 以30fps而非15fps进行抠图(耗时加倍,快速运动时更平滑) |
--fast | 快速但粗糙的抠图(头发周围残留部分背景) |
--images <文件夹> | 用于轨道、手机扇、资料墙、层级列表的Reels截图 |
--grade warm|cool|bw|none | 色彩校正(默认 warm) |
--accent "#00c2ff" | 主色 |
--props '{"notes":["…"]}' | 任何其他属性(JSON) |
在长时间渲染 ✂ 特效之前,如果用户的文本较长或异常,请先运行一个预演(约30秒)并查看:
node SKILL_DIR/scripts/effects.mjs still <特效> "<片段>" [相同选项]
4. 在片段上查看所有36个特效
node SKILL_DIR/scripts/effects.mjs sheet "<片段>" [--name … --handle …]
它会生成 <片段>-36-effets.jpg(每个特效一帧)。向用户展示以便选择。
每个特效读取的文本
在 --headline 或 --title 中使用 *星号* 包裹单词可为其着色。\n 表示换行。
| 特效 | 读取的选项(默认值在括号中) |
|---|---|
| glass-widgets | --name --handle --followers [71K],--props '{"chart":{"values":[…],"labels":[…],"unit":"K"}}' |
| documentary ✂ | --headline ["UN *CLIP.*\n36 EFFETS.\n*ZÉRO* APP."] --name --handle --kicker --word(幽灵文本) |
| orbit ✂ | --images |
| kallaway-split | --props '{"chart":{"title":"Mes 7 meilleurs reels\npar *vues*","values":[615,353,…],"labels":["Reel 1",…],"unit":"K"}}' |
| spotlight ✂ | --word [CLAUDIT](一个短词效果最佳) |
| checklist | --props '{"steps":[["找到人脸","每一帧"],…]}'(5对) |
| timeline | --title ["Claude *le monte*"] --headline(芯片) |
| lineup | --title |
| shortcut-rain | 无 |
| red-collage ✂ | --headline --word(背景文字) |
| comment-box | --comment ["claude 🔥"] --handle |
| cover-star ✂ | --name(巨大标题)--headline --handle |
| headline-wall | --props '{"notes":["…","…","…","…"]}' |
| phone-fan | --word [我的Reels] --handle --images |
| rabbit-hole | 无 |
| profile-wall | --handle --name --followers --images |
| noise | 无 |
| the-bill | --name --handle |
| split-headline | --title ["Claude *monta* meus reels."](带星号的单词会高亮) |
| pastel-word ✂ | --word [REELS] |
| tier-list | --title --images |
| polaroid | --title(说明文字,默认使用名字) |
| filmstrip | 无 |
| comic-book | --word [BOUM] |
| glitch | --word [GLITCH] |
| duotone | --word [FOCUS] --accent |
| scanline | --title |
| cinema | --kicker [第一章] --title(副标题) |
| breaking-news | --headline --word --name --handle |
| quote-card | --title(引文)--name --handle |
| countdown | --accent |
| progress-ring | --word [已观看] --handle |
| emoji-burst | 无 |
| neon-frame | --word [直播] --accent |
| typewriter | --title 或 --headline |
| zoom-punch | --title(每个冲击一个词) |
如果出现问题
片段未找到:检查路径,如果包含空格请用引号括起来。- 字体来自Google Fonts,Remotion在首次渲染时会下载无头Chrome:两者都需要互联网。
- 对于标有 ✂ 的特效,如果人物几乎不可见或有多人:抠图会保留它看到的所有人物。请告知用户。
- 准备好的文件缓存在
SKILL_DIR/.work/中(每个片段一个文件夹)。可随时删除以释放空间。