leepokai/claude-mod-cutroom
关于这个 mod
claude-mod-cutroom
Cutroom 是一个位于 Claude Code 内的 HyperFrames 视频剪辑室。一条命令会在浏览器中打开 HyperFrames Studio(真实的预览和时间线),把实时画面缩略图和剪辑按钮放进 Claude Code 窗格,并让 Claude 知道你在 Studio 中选中了什么,因此 "make this bigger" 不需要再指出位置。
它有意不做另一个 NLE。Studio 才是画布。窗格执行的每次剪辑都是一次 HyperFrames CLI 调用(timeline、snapshot、check、render),而按钮无法表达的内容则会发送给 Claude,作为已经带有项目、Studio 选择、播放头、画面快照和时间线的提示。
my-launch · 45s · Studio ● [open Studio ↗] localhost:3061/#project/my-launch
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ← the frame under the
█████████████████▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████ playhead, as half-block
████████████████ Message your coding agents ████████████████ cells in any terminal,
████████████████ like teammates. ████████████████ real pixels on kitty /
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Ghostty and the desktop app
▶ |◀ -1s -.1 12.5s +.1 +1s ▶| ⟳ t=____ seek
Studio: 03 Demo · compositions/frames/03-demo.html
[ Trim in→┃ ] [ ┃←Trim out ] [ Split @┃ ] [ Move→┃ ] [ Duplicate ] [ Delete ] [ Undo (0) ]
[ Check ] [ Render draft ] [ Reload ] prompt context: on
Ask Claude › change what? (or just type in the main prompt)
graphics
▸ el-03-demo ····████┃······················· 9–16
el-04-feature ········█████···················· 15.5–22.1
安装
claude plugin marketplace add leepokai/claude-mod-cutroom
claude plugin install cutroom@claude-mod-cutroom
单次工作阶段不安装也可使用:claude --plugin-dir /path/to/claude-mod-cutroom。将此文件夹的符号链接放到 ~/.claude/skills/cutroom 下,也会在每个工作阶段自动加载。
要求:Node 22、PATH 中可用的 ffmpeg 和 curl,以及 HyperFrames Claude Code 插件(claude plugin install hyperframes@hyperframes,Cutroom 使用其中缓存的 CLI 启动器),或可访问网络以运行 npx hyperframes。画面预览会在支持 kitty 图形协议的终端(kitty、Ghostty)和 Claude 桌面应用中绘制真实像素,在其他终端中则使用半块字符。
使用
- 在 HyperFrames 项目(或其父目录,例如包含
videos/*的仓库)中执行cd,然后输入/cut。Studio 会在后台启动并在浏览器中打开;窗格会显示在 transcript 旁边(全屏布局中从 110 列起停靠,否则位于提示符上方)。如果当前目录有hyperframes.json,窗格会在工作阶段启动时自行打开(不会启动浏览器)。/cut <dir>会打开指定项目;有多个候选项目时,窗格会把它们列成按钮。 - **查看。**窗格显示播放头下的画面:Studio 的缩略图 API 大约用半秒渲染它。
▶(p)会以幻灯片方式播放,每隔 0.5 s 播放时间显示一帧,速度取决于帧到达的速度。|◀ -1s -.1 +.1 +1s ▶|用于拖动(窗格获得焦点时可使用快捷键a j h l k f:按 ctrl+x tab,或点击它);t=跳到指定时间;⟳(r)重新捕获。 - **指向。**在 Studio 的画布或时间线上点击任何内容。窗格每 1.5 s 轮询一次 Studio 的选择,显示选择内容,将它映射到承载它的片段,并把播放头移到 Studio 的时间。窗格中的行(或
1–9)可以在不使用 Studio 的情况下选择顶层片段。 - 使用 CLI 自带的编辑进行剪辑(每次都是一次可用 Undo 撤销的
hyperframes timeline …调用):Trim in→┃(i)让片段从播放头开始;┃←Trim out(o)让它在该处结束;Split @┃(s)创建<id>-2;Move→┃(m)保持长度;Duplicate(d)创建<id>-copy;Delete(x);Undo(u)还原窗格上一次编辑(收据位于<project>/.hyperframes/cutroom/)。Studio 会为在那里进行的拖动保留自己的撤销记录。 - **说出来。**只需在 Claude Code 的提示符中输入:项目打开且
prompt context已开启时(t切换它),你输入的每条提示都会带上 Studio 选择、承载片段、播放头、快照路径和精简时间线,因此 "把這個標題放大" 或 "cut this scene 1s shorter" 就够了。Ask Claude ›框在窗格内也会做同样的事。回合结束时窗格会重新加载时间线和画面,Studio 也会自行重新加载。 Check(c)运行hyperframes check --json;Render draft(v)写入renders/draft.mp4;Reload(z)重新读取时间线。
试用
- 如果还没有项目,先创建一个:
npx hyperframes init demo。 - 在 Claude Code 中输入
/cut demo。Studio 会在浏览器中打开;窗格显示第一帧。按下▶,再点击 Studio 时间线中的片段,看窗格跟随它。 - 在提示符中输入:"make the title 20% larger"。Claude 会编辑合成内容,Studio 和窗格会重新加载。
布局
Claude Code 插件由三个文件和一个类型契约组成(参见 Claude Code 中的 plugin-authoring 技能)。这个仓库就是这样的一个插件,同时也充当自己的插件市场。
.claude-plugin/plugin.json manifest
.claude-plugin/marketplace.json lets the marketplace command point here
hooks/hooks.json names the hooks module
hooks/register.tsx the whole mod: CLI runner, state atoms, edit
verbs, Studio bridge, prompt composer, Pane render
types/index.d.ts the state contract the pane draws from
tests/editor.test.tsx claude plugin test .
claude plugin validate .会列出引擎将看到的每个 hook 和$调用。claude plugin test .会使用真实引擎运行测试;插件下面的世界(fs、process、http、store、env、clock)由测试提供响应:片段列表、隐藏嵌套行、选择、跳转、让Split以精确 argv 到达 CLI、在任何操作运行前拒绝片段外的拆分;在模拟 Studio 时,还会验证选择轮询落入窗格,并在下一条输入提示中作为上下文传递。- 从你拥有的文件夹加载后,引擎会把 API 声明放在
.claude-plugin/types/下,而tsc -p .会对插件进行类型检查。
许可证
MIT,参见 LICENSE。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add leepokai/claude-mod-cutroom claude plugin install cutroom
原文 / README
claude-mod-cutroom
Cutroom is a cutting room for HyperFrames videos that lives inside Claude Code. One command opens HyperFrames Studio in your browser (the real preview and timeline), puts a live frame thumbnail and the cut buttons in a Claude Code pane, and makes Claude aware of what you have selected in Studio, so "make this bigger" needs no further pointing.
It is deliberately not another NLE. Studio is the canvas. Every cut the pane
makes is one HyperFrames CLI call (timeline, snapshot, check, render),
and everything a button cannot say goes to Claude as a prompt that already
carries the project, the Studio selection, the playhead, the frame snapshot
and the timeline.
my-launch · 45s · Studio ● [open Studio ↗] localhost:3061/#project/my-launch
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ← the frame under the
█████████████████▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████ playhead, as half-block
████████████████ Message your coding agents ████████████████ cells in any terminal,
████████████████ like teammates. ████████████████ real pixels on kitty /
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Ghostty and the desktop app
▶ |◀ -1s -.1 12.5s +.1 +1s ▶| ⟳ t=____ seek
Studio: 03 Demo · compositions/frames/03-demo.html
[ Trim in→┃ ] [ ┃←Trim out ] [ Split @┃ ] [ Move→┃ ] [ Duplicate ] [ Delete ] [ Undo (0) ]
[ Check ] [ Render draft ] [ Reload ] prompt context: on
Ask Claude › change what? (or just type in the main prompt)
graphics
▸ el-03-demo ····████┃······················· 9–16
el-04-feature ········█████···················· 15.5–22.1
Install
claude plugin marketplace add leepokai/claude-mod-cutroom
claude plugin install cutroom@claude-mod-cutroom
For one session without installing: claude --plugin-dir /path/to/claude-mod-cutroom.
A symlink to this folder under ~/.claude/skills/cutroom also auto-loads it in
every session.
Requirements: Node 22, ffmpeg and curl on PATH, and either the hyperframes Claude
Code plugin (claude plugin install hyperframes@hyperframes, whose cached CLI
launcher Cutroom uses) or network access for npx hyperframes. The frame
preview draws real pixels in terminals that speak the kitty graphics protocol
(kitty, Ghostty) and in the Claude desktop app, and half-block cells in every
other terminal.
Use
cdinto a HyperFrames project (or its parent, e.g. a repo withvideos/*) and type/cut. Studio starts in the background and opens in your browser; the pane opens beside the transcript (docked in the fullscreen layout from 110 columns, else above the prompt). Withhyperframes.jsonin the cwd the pane opens by itself at session start (without launching a browser)./cut <dir>opens a specific project; with several candidates the pane lists them as buttons.- Look. The pane shows the frame under the playhead: Studio's thumbnail
API renders it in about half a second.
▶(p) plays it as a slideshow, one frame every 0.5 s of timeline, as fast as frames arrive.|◀ -1s -.1 +.1 +1s ▶|scrub (hotkeysa j h l k fwhile the pane has focus: ctrl+x tab, or click it);t=seeks to a time;⟳(r) re-captures. - Point. Click anything in Studio, on the canvas or in its timeline. The
pane polls Studio's selection every 1.5 s, shows it, maps it to the clip
that hosts it, and moves the playhead to Studio's time. Rows in the pane
(or
1–9) select a top-level clip without Studio. - Cut with the CLI's own edits (each one
hyperframes timeline …call, undoable withUndo):Trim in→┃(i) starts the clip at the playhead;┃←Trim out(o) ends it there;Split @┃(s) makes<id>-2;Move→┃(m) keeps the length;Duplicate(d) makes<id>-copy;Delete(x);Undo(u) restores the previous pane edit (receipts in<project>/.hyperframes/cutroom/). Studio keeps its own undo for drags made there. - Say it. Just type in Claude Code's prompt: while a project is open and
prompt contextis on (ttoggles it), every prompt you type carries the Studio selection, the hosting clip, the playhead, the snapshot path and a compact timeline, so "把這個標題放大" or "cut this scene 1s shorter" is enough. TheAsk Claude ›box does the same from inside the pane. When the turn ends the pane reloads the timeline and the frame; Studio reloads itself. Check(c) runshyperframes check --json;Render draft(v) writesrenders/draft.mp4;Reload(z) re-reads the timeline.
Try it
- Make a project if you have none:
npx hyperframes init demo. - In Claude Code:
/cut demo. Studio opens in the browser; the pane shows the first frame. Press▶, then click a clip in Studio's timeline and watch the pane follow. - Type in the prompt: "make the title 20% larger". Claude edits the composition; Studio and the pane reload.
Layout
A Claude Code mod is three files plus a type contract (see the
plugin-authoring skill inside Claude Code). This repo is one such mod and
doubles as its own plugin marketplace.
.claude-plugin/plugin.json manifest
.claude-plugin/marketplace.json lets `claude plugin marketplace add` point here
hooks/hooks.json names the hooks module
hooks/register.tsx the whole mod: CLI runner, state atoms, edit
verbs, Studio bridge, prompt composer, Pane render
types/index.d.ts the $.state contract the pane draws from
tests/editor.test.tsx claude plugin test .
claude plugin validate .lists every hook and$call the engine will see.claude plugin test .runs the tests against the real engine, with the world beneath the plugin (fs, process, http, store, env, clock) answered by the tests: clips list, nested rows hidden, select, seek,Splitreaching the CLI with the exact argv, a split outside the clip refused before anything runs; and with Studio mocked, the selection poll landing in the pane and riding the next typed prompt as context.- Once loaded from a folder you own, the engine lays its API declarations under
.claude-plugin/types/, andtsc -p .type-checks the mod.
License
MIT, see LICENSE.

