cutroom
Cutroom: a cutting-room pane for HyperFrames projects inside Claude Code — frame preview, timeline, trim/split/move/delete/undo, Studio selection bridge, and point-and-ask edits sent to Claude.
What it does
- Draws a pane, toasts
- Adds /cut
- Hooks prompt.submit, session.start, turn.complete, ui.close
- Keeps its own state between turns
- Calls the network
Good points
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like cutroom by leepokai (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/leepokai-cutroom/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Cutroom" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button, Link, Input } = $.ui.resolve(e)
const base = '…'
const fmt = '…'
const studioUrl = '…'
const fmt2 = '…'
const where = '…'
const length = '…'
const msg = '…'
const kind = '…'
const id = '…'
const bar = '…'
const fmt3 = '…'
const fmt4 = '…'
const bar2 = '…'
const fmt5 = '…'
const fmt6 = '…'
const bar3 = '…'
const fmt7 = '…'
const fmt8 = '…'
const kind2 = '…'
const bar4 = '…'
const fmt9 = '…'
const fmt10 = '…'
const bar5 = '…'
const fmt11 = '…'
const fmt12 = '…'
const bar6 = '…'
const fmt13 = '…'
const fmt14 = '…'
const kind3 = '…'
const bar7 = '…'
const fmt15 = '…'
const fmt16 = '…'
const bar8 = '…'
const fmt17 = '…'
const fmt18 = '…'
const bar9 = '…'
const fmt19 = '…'
const fmt20 = '…'
return (
<Box flexDirection="column">
<Box gap={1}>
<Text bold>
{base}
</Text>
<Text dimColor>
{"· "}
{fmt}
{"s · Studio "}
●
</Text>
<Button plain hotkey="g" label="[open Studio ↗]" />
<Link href={`${studioUrl}`} label={`${studioUrl}`} />
</Box>
<Box gap={1}>
<Button plain hotkey="p" label="■" />
<Button plain hotkey="a" label="|◀" />
<Button plain hotkey="j" label="-1s" />
<Button plain hotkey="h" label="-.1" />
<Text bold>
{" "}
{fmt2}
{"s "}
</Text>
<Button plain hotkey="l" label="+.1" />
<Button plain hotkey="k" label="+1s" />
<Button plain hotkey="f" label="▶|" />
<Button plain hotkey="r" label="⟳" />
<Input placeholder="t=" submitLabel="seek" />
</Box>
<Text dimColor>
{where}
</Text>
<Box gap={1} flexWrap="wrap">
<Button hotkey="i" label="Trim in→┃" />
<Button hotkey="o" label="┃←Trim out" />
<Button hotkey="s" label="Split @┃" />
<Button hotkey="m" label="Move→┃" />
<Button hotkey="d" label="Duplicate" />
<Button hotkey="x" label="Delete" />
<Button hotkey="u" label={`Undo (${length})`} />
<Button hotkey="c" label="Check" />
<Button hotkey="v" label="Render draft" />
<Button hotkey="z" label="Reload" />
<Button plain hotkey="t" label="prompt context: on" />
</Box>
<Input label="Ask Claude ›" placeholder="change what? e.g. 把這段標題放大、進場再慢一點 (or just type in the main prompt)" submitLabel="send" />
<Text dimColor>
{msg}
</Text>
<Box flexDirection="column">
<Box flexDirection="column">
<Text dimColor>
{kind}
</Text>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar}
{" "}
</Text>
<Text dimColor>
{fmt3}
–
{fmt4}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar2}
{" "}
</Text>
<Text dimColor>
{fmt5}
–
{fmt6}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar3}
{" "}
</Text>
<Text dimColor>
{fmt7}
–
{fmt8}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text dimColor>
{kind2}
</Text>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar4}
{" "}
</Text>
<Text dimColor>
{fmt9}
–
{fmt10}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar5}
{" "}
</Text>
<Text dimColor>
{fmt11}
–
{fmt12}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar6}
{" "}
</Text>
<Text dimColor>
{fmt13}
–
{fmt14}
</Text>
</Box>
</Box>
<Box flexDirection="column">
<Text dimColor>
{kind3}
</Text>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar7}
{" "}
</Text>
<Text dimColor>
{fmt15}
–
{fmt16}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar8}
{" "}
</Text>
<Text dimColor>
{fmt17}
–
{fmt18}
</Text>
</Box>
<Box>
<Text>
▸
</Text>
<Button plain label={`${id}`} />
<Text>
{" "}
{bar9}
{" "}
</Text>
<Text dimColor>
{fmt19}
–
{fmt20}
</Text>
</Box>
</Box>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const out = '…'
await $.ui.toast(`Cutroom: draft rendered → ${out}`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
hooks/register.tsx lines 626–785 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
if (e.surface === 'mobile') {
const { Box, Text } = $.ui.resolve(e)
return (
<Box>
<Text dimColor>Cutroom needs the terminal or desktop surface.</Text>
</Box>
)
}
const { Box, Text, Button, Input, Link } = $.ui.resolve(e)
const width = Math.max(48, e.props.bodyColumns - 1)
const [dir, tl, selId, t, pv, srv, sel, msg, job, rc, cands, ctxOn, isPlaying] = await Promise.all([
read($, project),
read($, timeline),
read($, selected),
read($, playhead),
read($, preview),
read($, studio),
read($, selection),
read($, status),
read($, busy),
read($, receipts),
read($, candidates),
read($, autoContext),
read($, playing),
])
if (!dir) {
return (
<Box flexDirection="column" gap={1}>
<Text bold>Cutroom</Text>
{cands.length > 0 ? (
<Text dimColor>Pick a project:</Text>
) : (
<Text dimColor>No HyperFrames project under this directory. Run /cut <project-dir>.</Text>
)}
{cands.map((c, i) => (
<Button
key={`cand:${c}`}
plain
{...(i < 9 ? { hotkey: String(i + 1) } : {})}
label={c}
onPress={() => void openProject($, c, true)}
/>
))}
{msg !== '' && <Text dimColor>{msg}</Text>}
</Box>
)
}
const clips = tl?.clips ?? []
const clip = clips.find(c => c.id === selId)
const duration = tl?.duration ?? 0
// the frame: kitty pixels, half-block cells, or an Svg on the desktop
let frame: JSX.Element
if (!pv || !pv.rgb) {
frame = <Text dimColor>{job || 'no frame yet — press ⟳ (r)'}</Text>
} else if (e.surface === 'terminal') {
const inline = e.props.placement === 'inline'
if (hasPixels) {
const { Image } = $.ui.resolve(e)
const b64 = await cachedBase64($, pv.png, pv.gen)
const { width: w, height: h } = pngSize(b64)
const maxRows = inline ? 10 : 30
const cols = Math.max(8, Math.min(255, width - 2, Math.round((maxRows * 2.1 * w) / h)))
const rows = Math.max(2, Math.min(255, Math.round((cols * h) / w / 2.1)))
frame = <Image key="frame" source={{ png: b64 }} columns={cols} rows={rows} alt={`frame @ ${fmt(pv.at)}s → ${pv.png}`} />
} else {
const { Raster } = $.ui.resolve(e)
const bytes = fromB64(await cachedBase64($, pv.rgb, pv.gen))
const srcW = pv.rgbW
const srcH = Math.floor(bytes.length / (srcW * 3))
if (srcH < 2) {
frame = <Text dimColor>frame @ {fmt(pv.at)}s → {pv.png}</Text>
} else {
const maxRows = inline ? 10 : 28
const cols = Math.max(8, Math.min(width - 2, 512, Math.round((maxRows * 2 * srcW) / srcH)))
const rows = Math.max(1, Math.min(256, Math.round((cols * srcH) / srcW / 2)))
frame = <Raster key="frame" columns={cols} rows={rows} cells={rasterCells(bytes, srcW, srcH, cols, rows)} />
}
}
} else {
const { Svg } = $.ui.resolve(e)
const b64 = await cachedBase64($, pv.jpg, pv.gen)
const png = await cachedBase64($, pv.png, pv.gen)
const { width: w0, height: h0 } = pngSize(png)
const w = 480
const h = Math.max(1, Math.round((w * h0) / w0))
frame = (
<Svg
source={`<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}"><image href="data:image/jpeg;base64,${b64}" width="${w}" height="${h}"/></svg>`}
alt={`frame @ ${fmt(pv.at)}s`}
width={w}
height={h}
/>
)
}
// compact clip list, grouped by track kind
const kinds = [...TRACK_ORDER.filter(k => clips.some(c => c.trackKind === k)), ...clips.map(c => c.trackKind).filter(k => !TRACK_ORDER.includes(k))].filter(
(k, i, all) => all.indexOf(k) === i,
)
const barW = Math.max(10, width - 36)
let n = 0
const rows = kinds.map(kind => (
<Box flexDirection="column">
<Text dimColor>{kind}</Text>
{clips
.filter(c => c.trackKind === kind)
.map(c => {
const i = n++
const isSel = c.id === selId
return (
<Box>
<Text bold={isSel}>{isSel ? '▸' : ' '}</Text>
<Button
key={`clip:${c.id}`}
plain
dimColor={!isSel}
{...(i < 9 ? { hotkey: String(i + 1) } : {})}
label={pad(c.id, 15)}
onPress={() => void selectClip($, dir, c)}
/>
<Text dimColor={!isSel}> {bar(barW, duration, c.absStart, c.absEnd, t)} </Text>
<Text dimColor>
{fmt(c.absStart)}–{fmt(c.absEnd)}
</Text>
</Box>
)
})}
</Box>
))
const go = (to: number) => () => void seek($, dir, to)
const op = (label: string, args: (clip: HfClip, t: number) => string[] | string) => () =>
void withClip($, async (c, at) => {
const a = args(c, at)
if (typeof a === 'string') {
await say($, a)
return
}
await edit($, dir, label, a)
})
const where = sel
? `Studio: ${sel.label ?? sel.id ?? sel.selector ?? '?'}${sel.file ? ` · ${sel.file}` : ''}${clip && clip.id !== sel.id ? ` · in clip ${clip.id}` : ''}`
: clip
? `clip ${clip.id} · ${fmt(clip.absStart)}–${fmt(clip.absEnd)}s · ${clip.file}${clip.src ? ` · ${clip.src}` : ''}`
: 'nothing selected — click something in Studio, or a row below'
return (
<Box flexDirection="column">
<Box gap={1}>
<Text bold>{base(dir)}</Text>
<Text dimColor>
· {fmt(duration)}s · Studio {srv ? '●' : '○'}
</Text>
<Button key="studio-open" plain hotkey="g" label={srv ? '[open Studio ↗]' : '[start Studio]'} onPress={() => void ensureStudio($, dir, true)} />
{srv !== null && <Link href={srv.studioUrl} label={srv.studioUrl.replace(/^https?:\/\//, '')} />}Licence text (MIT)
MIT License Copyright (c) 2026 leepokai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
networkruns programswrites filesenv varsdrives Clauderemembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit 3757beae6e2d on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.1 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).hooks/register.tsx:187 open (not on Windows); hooks/register.tsx:188 xdg-open (not on Windows); hooks/register.tsx:324 mv (not on Windows) |
| Network | Whether every fetch names its https host in the code.hooks/register.tsx:202 fetch(url) |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.tsx:66 a program named at run time; hooks/register.tsx:312 curl (reaches the network) |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add leepokai/claude-mod-cutroom/plugin install cutroom@claude-mod-cutroomThis installs the marketplace's latest commit, which may not be the one read here (3757beae6e2d). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "leepokai-cutroom" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…Rook♜ R O O Kr · refresh r────────31 · chat 2 31 · chat 2 31 · chat 2Search “Older” on Oldera · all sessions asearch words or a regex, then enter · empty shows the newest searchworking…✓ Services✗ SitesNo session matches that.┌ buildLatest messages────────● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”┌ buildLatest messages────────● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”┌ buildLatest messages────────● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”● Fix login LIVERook “…Handoffs…”────────tab / arrows move · enter opens · esc returns to the prompt · ✻ claude ◆ codex
-
What it does
- Draws a band above the prompt, a pane
- Watches tool calls and can refuse them
- Hooks config.describe, session.start, turn.complete, ui.close
- Keeps its own state between turns
-
Ask Claude…GitHub inboxGitHubloading…Refresh rbuildbuildbuildClose xStealth IssuesNo open issues in this view.#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopenPull requestsNo open pull requests.#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopenChecks for #3Plain
-
Ask Claude…ReviewPR #3 Fix loginbranche couranteà traiter ▸3 ▸3 ▸3 · en relecture ▸3 ▸3 ▸3▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review▸◉3 a1b2c3d ↩ répondu obsolète → Claude Review────────fil 31/3 Review ↗ GitHub
Review@alexReview@alexReview@alexReviewRéponse : Review publierEntrée publie · Esc annule la réponse · les touches n, p… tapent dans le champ… ReviewLe panneau n'a pas le clavier : ctrl+x tab ou un clic, et les touches marchent.p préc. n suiv. t PR suiv. x démarquer a tout démarquer f corriger (3) r répondre v résoudre o web q fermer -
Ask Claude…◉ Subcommands◆ acme/app● Backlog build▲ Backlog build⇄ Backlog build✗ Backlog buildPriorityBacklog 3%◌ syncing… r⚙ Set up build for the board◌ Reading the repo, its project and its issues…Couldn't read what setup needs: Item closed/issues check says what is missing and how to fix it.Projectnone is linked to buildFix login (#3)buildApply will:● Fix login Item closed● Fix login Item closed● Fix login Item closedarea labels to create: Off track updateWhich Status is whichInbox (folds)Inbox (folds)Inbox (folds)In the project's Workflows settings, by hand: · turn on Off track · turn off Inactive: it marks every closed issue Done, even an abandoned one; the board moves issues closed as comp… · new issues arrive with Status Todo, GitHub's default, so they skip the Inbox: open Item added to project and set it…↗ WorkflowsNo issue template has an Acceptance list.◌ Applying…build █████░░░ Off trackbuild █████░░░ Off tracklast 12 weeks✗ Setup needed⋯Fix loginSubcommandsSubcommands↗ example.comFix loginSubcommandsSubcommands↗ example.comFix loginSubcommandsSubcommands↗ example.com
-
Ask Claude…LensRecently reviewedThis folder is not in a git repository. Pick a repo (its number), or name one: /lens ~/Code/my-repo build EnterThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10mbuild Enter✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10mbuild Enter✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forget