cutaway
/cutaway
Build a robotic cutaway of any object or creature from one reference image - a three.js scene written entirely in code that takes itself apart on camera, a page with a button for every part, and a 60 fps film with a synced procedural score. Claude matches the build to the picture, grades it line by line, measures its density and proportions, and films it only after the user approves the still. Use when someone hands over a picture of a robotic animal, machine or device and wants it built in 3D, opened up part by part, or recorded; or asks for a "cutaway", an "exploded view", a "robot animal si
- Author
- meya232026 ↗
- Repository
- Magic-Factory ↗
- Licence
- MIT
- Last repository change
- 09.11.2026
Assessment and security
- Files in this package
- 96
- Scripts
- 64
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 64 scripts in this package. Review them before installing, as Claude may execute them.
- Paczka skrócona: część plików jest zbyt duża or wykonywalna. Pełny folder jest w repozytorium.
Scripts: __init__.py, __main__.py, anchors_dump.mjs, beats.py, bee.js, build.mjs, cam_track.mjs, capture.mjs, check.mjs, console (18).js, console (3).js, console (8).js, console.js, director.js, dsp.py, film.mjs, gait.js, guides (19).js, guides (9).js, guides.js, hud.js, jump.js, look.js, loudness.py, main (1).js, main (14).js, main (16).js, main (4).js, main (6).js, main.js
What it does and when to use it
Build a robotic cutaway of any object or creature from one reference image - a three.js scene written entirely in code that takes itself apart on camera, a page with a button for every part, and a 60 fps film with a synced procedural score. Claude matches the build to the picture, grades it line by line, measures its density and proportions, and films it only after the user approves the still. Use when someone hands over a picture of a robotic animal, machine or device and wants it built in 3D, opened up part by part, or recorded; or asks for a "cutaway", an "exploded view", a "robot animal si
Triggers from the description
Original author description
Build a robotic cutaway of any object or creature from one reference image - a three.js scene written entirely in code that takes itself apart on camera, a page with a button for every part, and a 60 fps film with a synced procedural score. Claude matches the build to the picture, grades it line by line, measures its density and proportions, and films it only after the user approves the still. Use when someone hands over a picture of a robotic animal, machine or device and wants it built in 3D, opened up part by part, or recorded; or asks for a "cutaway", an "exploded view", a "robot animal si
How it works
- First run
- The 3 examples
- The method
- How an object is built
- Rules that decide whether it works
- The green look
- render(t) contract
- Commands
- Review loop
- three.js traps the examples already hit
SKILL.md preview
---
name: cutaway
description: Build a robotic cutaway of any object or creature from one reference image - a three.js scene written entirely in code that takes itself apart on camera, a page with a button for every part, and a 60 fps film with a synced procedural score. Claude matches the build to the picture, grades it line by line, measures its density and proportions, and films it only after the user approves the still. Use when someone hands over a picture of a robotic animal, machine or device and wants it built in 3D, opened up part by part, or recorded; or asks for a "cutaway", an "exploded view", a "robot animal simulator" or "make this image a 3D model that comes apart".
---
# Cutaway
One picture in, one object out: built from code, opened part by part, filmed. The visitor sees the object move, a cursor presses a button, and that part comes apart under its own camera while live cards around it react. The same code records the film frame by frame, with a score built on the same timeline.
`SKILL_DIR` below is the folder this file lives in. Builds and renders go to `./cutaway-out` of the folder you run from.
## First run
```
cd "$SKILL_DIR" && npm install && npx playwright install chromium
```
The pages need nothing else. The video needs `ffmpeg` on PATH and the score needs Python 3 (standard library only). Set `FFMPEG`, `PYTHON` or `CHROMIUM` to point at other binaries. `node "$SKILL_DIR/check.mjs"` checks the install, every timeline and every bundle in seconds, no GPU needed.
## The 3 examples
Build one, open the HTML, watch it take itself apart. Start a new object from the example whose body is closest.
| | The object | Its parts | Worth stealing |
|---|---|---|---|
| `tarantula-*` | A robotic tarantula on 8 bristled legs, a glass abdomen full of lit coils. | Optics, a front leg coming apart on its servos, the abdomen cage opening, the head plates lifting; two jumps. | A walking body: an alternating tetrapod gait integrated from velocity keys, a jump with a crouch and a tuck. |
| `piranha-*` | A deep-bodied robotic piranha with 2 rows of glass fangs and a glass flank over drive gears. | The eye unscrewing in macro, the tail stalk telescoping, the glass flank opening from above, the jaw dropping from below. | One camera per beat aimed at its own part; a mirrored scene; a lunge at the lens. |
| `wasp-*` | A robotic wasp with frosted wings, a telescoping abdomen and a glass stinger. | Optics, a wing pulled out of its hinge and turned over, thorax gears, the abdomen telescoping. | A slow-motion explode as a warp of film time into scene time; a dive in from above and a climb out of the frame. |
Each comes in 3 folders: `<name>-shared/` holds the object, `<name>-film/` the full film (it also opens as a looping page), `<name>-demo/` a 10-second version with its own script.
```
node "$SKILL_DIR/sims/build.mjs" piranha-film # → cutaway-out/dist/piranha-film.html, offline, ~900 KB
node "$SKILL_DIR/sims/build.mjs" # all of them
```
## The method
The 4 files in `docs/` are the method. Read them before the first object, and keep `docs/JOB_DESCRIPTION.md` open the whole time.
| File | What it holds |
|---|---|
| `docs/JOB_DESCRIPTION.md` | The brief: the look, the order of work, the camera, the film, the short version. Every correction the user gives goes into it, one line per mistake. |
| `docs/CHECKLIST.md` | How to write 10 to 12 numbered lines on what one picture stands on, a template and a full example. |
| `docs/PROMPTS.md` | Every prompt, from the reference image to the sound. |
| `docs/LESSONS.md` | Every mistake so far and the line it added to the brief. |
The order, every time:
1. **The reference.** One picture. If the user has none, generate one with the prompt in `docs/PROMPTS.md`. It sets the look and nothing else: never import it, rebuild it.
2. **Measure the picture.** Body height, head length, jaw or limb length as shares of the body length. Dark-pixel share (luma under 80) in its bounding box.
3. **Write the checklist** for this picture before the first line of code.
4. **The still loop.** Build, render a still posed like the reference, stack reference | still | an approved still, plus the stack at 900 px wide, grade every line yes / partial / no against the picture. **Stop after round 2 and show the user.** Nothing gets filmed until they say yes.
5. **The film.** Port the example with the closest body 1:1: its tour, its beat times, its moves, distances scaled. Change the body only. Give every part its own camera.
6. **The short version.** Its own script, never pieces of the long film.
7. **Render and score.**
## How an object is built
One folder per object, split by job. The examples follow this exactly:
| File | Job |
|---|---|
| `spider.js` / `piranha.js` / `bee.js` | The body, built from code: shells, gears, pistons, hoses, lenses, membranes. Every part that comes apart is its own group with a named anchor; `pose(state)` sets the whole object for one moment. |
| `parts.js` | The shop: materials (gloss white shell, accent, graphite, black, steel, lens, glass) and shape helpers. `PAL` holds the colours. |
| `stage.js` | The studio: paper backdrop, lights, soft floor shadow, post. `frame(cam)` draws one frame. |
| `tour.js` / `tour_bee.js` / `tour_v2.js` | The film as functions of time: each act's clock, the flight or walk, the explode, every camera, the telemetry for the page. |
| `sim_green.js` | The wiring: state for t → pose, flight, camera, page. Applies the green look. |
| `../green/` | The page around every object (title, pill buttons the cursor presses, a section list, 4 cards, labels with leaders) and the green look (`look.js`). |
| `score.py` | The sound on the film's timeline. |
For an object outside `SKILL_DIR`, make a folder with a `main.js` and import the kit by name: `import {runSim} from 'cutaway-kit/runtime.js'`. Build it with `node "$SKILL_DIR/sims/build.mjs" ./my-object`.
## Rules that decide whether it works
1. **Start from the picture, never from imagination.** Asked for a robot animal with nothing to match, the model returns a generic toy. With a picture and a checklist it rebuilds what is in front of it.
2. **Port the closest approved film.** A new body on an existing choreography works; a new body on a new choreography is twice the rounds. Flag an object with no close body before starting.
3. **Measure, don't eyeball.** Features pass the checklist while the whole reads as a tidy white diagram. Dark share must reach 0.8 of the reference's; proportions must match within a few hundredths.
4. **One main set of limbs.** Legs, or wings, or tentacles. Two systems fighting for the same half second is noise.
5. **Dense core, plates with gaps.** Break white surfaces into separate curved plates in 3 sizes with gaps over the mechanism. A long smooth shell reads as a toy however many rounds it gets.
6. **Every beat its own camera.** Aim at the part itself, from its own side and height, and push in while it hangs open. Check with `sims/green/cam_track.mjs`: if az, el and distance barely move between beats, the film looks parked.
7. **Review after round 2, 2 objects at a time.** A note after round 2 changes the outcome; after round 6 it only costs tokens.
## The green look
`sims/green/look.js` turns any object green without touching its code: set `PAL.orange` and the paper before the build, then call `retint(root)` after the build and after every pose. It handles material colours, emissive glows, HDR glow colours above 1, colours a pose rewrites every frame, lights and vertex colours. `SHIFT` moves the subject into the page's 3D window. Before a render, run `node sims/green/probe_warm.mjs <entry> <t>`: it lists any warm colour left (`{}` means none).
## render(t) contract
```js
import {runSim} from '../kit/runtime.js';
const DEFAULTS = {duration: 20, fps: 60, hud: {enabled: false}, director: {enabled: false}};
runSim(DEFAULTS, async ({cfg, canvas, capture}) => {
// build the scene, precompute anything stateful
return {render(t) { /* draw frame t from scratch */ return {}; }, resize() {}};
});
```
- `render(t)` is pure: no `Math.random` (use `rng(seed)` from `kit/util.js` at setup), no `Date`, no state carried between frames. Capture calls it at arbitrary times.
- Anything integrated over time (a gait, the gears' busy clock, a speed ramp) is tabulated at load; `render` only reads the tables.
- Every beat goes into `<name>-film/timeline.json` as `{"t": seconds, "act": name}` in `script`, in time order. The score reads the same file.
- A short version may run its scene faster than the film: `{"duration": 11.3, "film": 10.0}` plays 11.3 s of scene in 10 s. Script times stay in scene seconds; the review tools move them to film time themselves.
- Other top-level numbers are settings, not beats (the piranha's `push` and `opt` camera factors). `node check.mjs` and every build warn about a script out of order or outside the duration.
- Frame 0 is the thumbnail. It must already show the object big, front 3/4, moving.
## Commands
One command for a finished film: build, 4K capture, score, stretch for a demo, mux to 1080p, beat sheets and the loudness check.
```
node "$SKILL_DIR/film.mjs" piranha-film # → cutaway-out/piranha-film.mp4, _sheets/, _wave.png
node "$SKILL_DIR/film.mjs" tarantula-demo # the scene's score is stretched by duration / film itself
node "$SKILL_DIR/film.mjs" ./my-object --score ./my-object/score.py
```
The same steps by hand, for a still or a partial redo:
```
node "$SKILL_DIR/sims/build.mjs" piranha-film
node "$SKILL_DIR/sims/capture.mjs" piranha-film --size 1600x900 --dpr 1.2 --stills beats --cols 4 --out cutaway-out/piranha-beats.png
node "$SKILL_DIR/sims/capture.mjs" piranha-film --size 1600x900 --dpr 1.2 --still 9.4 --out cutaway-out/piranha-9.4.png
node "$SKILL_DIR/sims/capture.mjs" piranha-film --size 1600x900 --dpr 2.4 --out cutaway-out/piranha-4k.mp4
python3 "$SKILL_DIR/run_sfx.py" "$SKILL_DIR/sims/piranha-shared/score.py"
ffmpeg -y -i cutaway-out/piranha-4k.mp4 -i cutaway-out/piranha-score.wav -map 0:v -map 1:a -vf scale=1920:1080:flags=lanczos -c:v libx264 -crf 16 -pix_fmt yuv420p -c:a aac -b:a 256k -shortest -movflags +faststart cutaway-out/piranha.mp4
```
(`python` on Windows.) For a demo whose scene runs faster than its film, score the scene and stretch the sound by duration / film (11.2 / 10 = 1.12 here):
```
TL="$SKILL_DIR/sims/piranha-demo/timeline.json" OUT=cutaway-out/piranha-demo-scene.wav python3 "$SKILL_DIR/run_sfx.py" "$SKILL_DIR/sims/piranha-shared/score.py"
ffmpeg -y -i cutaway-out/piranha-demo-scene.wav -af atempo=1.12 cutaway-out/piranha-demo-score.wav
```
Which cue sheet scores which entry: `<name>-shared/score.py` on the entry's timeline (`TL=`), except `wasp-demo`, which has its own `wasp-shared/score_demo.py` and no stretch.
`--size` is the CSS layout and `--dpr` multiplies it: 1600 x 900 at 1.2 gives 1920 x 1080, at 2.4 gives 4K to bring down to 1080p (thin veins stay sharp). Capture prints the GPU it got; a software renderer means the GPU flags in `paths.mjs` did not take.
## Review loop
You cannot watch the video; you can look at frames. Never report an object as done without reading sheets of the current render.
1. `--stills beats`: one tile per timeline beat, 0.3 s after it, each labelled `t=` in film seconds.
2. Read every tile against the checklist below.
3. Zoom in: `--stills every:0.2 --from A --to B` for a transition, `--still T` for one full frame.
4. `node sims/green/cam_track.mjs <entry>` prints the camera every 0.5 s of film; `node sims/green/anchors_dump.mjs <entry> [t]` prints the parts' points to aim cameras at (the piranha's rest table, or every named anchor at film time `t`). Both find the page's global themselves (`SP`, `PIRANHA`, `WASP`; a new object's `sim_green.js` sets `window.<NAME> = {st, T, <body>}`); pass the name as the second argument to choose.
5. Fix, rebuild, go back to 1. Stop when a full pass finds nothing.
6. Final: `node "$SKILL_DIR/sheet.mjs" --video <final.mp4> --timeline <timeline.json>` and `node "$SKILL_DIR/wave.mjs" <final.mp4> --timeline <timeline.json>`, and read both (`film.mjs` makes them).
Checklist:
- **The object.** Every part that comes apart goes back where it was; nothing passes through anything; the cards match the motion.
- **Composition.** The opening part fills the frame; the rest may run off. Labels never cover the part they name.
- **The look.** No warm colour left (`probe_warm.mjs`). Green only as lines and glows, never dots.
- **Camera.** A new side, height or distance at every beat. No beat parked.
- **Timing.** A part opens in about 1 s, holds, closes in 0.5 s; a new beat every 2 to 3 s.
## three.js traps the examples already hit
- A glow colour above 1 (an HDR `MeshBasicMaterial`) breaks `getHSL`: read and write it at unit peak.
- A colour the pose rewrites every frame comes back each frame: retint whatever changed since the last write.
- Colours baked into vertex attributes ignore the material: retint the `color` attribute too.
- `smoothstep(a, b, x)` with `a > b` returns 0 on Windows (ANGLE/D3D). Write `1.0 - smoothstep(b, a, x)`.
- One NaN pixel blacks out the whole frame through bloom. Clamp every `pow()` base in a shader.
## Sound
`sfx/` synthesises every sound in pure Python (48 kHz, reproducible) and reads the film's timeline, so sound cannot drift out of sync. `python3 "$SKILL_DIR/run_sfx.py" --list` shows the generators; `sample("<file>")` plays one of the recorded sounds in `sfx/samples/` (decoded with ffmpeg). `sfx/score_kit.py` has the bed and accents the 3 scores use: a chord bed with soft drums, a pad, airy whooshes, clicks and ticks.
- Every time comes from the timeline, never a typed number.
- Mastering is automatic: −14 LUFS, true peak ≤ −2 dBFS.
- Accent, never narrate: a quiet click per button, a short accent on every part that moves, continuous motion silent.
## Taste, with numbers
- Frame 0: the front 3/4 hero view, the object big and already moving.
- A beat every 2 to 3 s. Visible wing beats 1.5 to 2.5 Hz; faster only as a motion-blurred fan.
- Bristles and spikes 0.15 to 0.25 of the limb's thickness.
- The object fills 60-70% of the 3D window at rest; the opening part fills the frame.
- One accent colour, and it marks what is moving right now.
## Credits
The kit, frame capture, sfx engine and review rules come from [whaleyxbt/claude-motion](https://github.com/whaleyxbt/claude-motion) (MIT). The recorded samples are CC0 from Freesound, trimmed by [Barty-Bart/motion-graphics](https://github.com/Barty-Bart/motion-graphics) (MIT); sources in `sfx/samples/SOURCES.md`.
Files in this package (96)
- CHANGELOG.md 4 KB
- CHECKLIST.md 4 KB
- JOB_DESCRIPTION.md 4 KB
- LESSONS.md 2 KB
- LICENSE 1 KB
- PROMPTS.md 4 KB
- README.md 5 KB
- SKILL.md 14 KB
- SOURCES.md 2 KB
- __init__.py 1 KB
- __main__.py 3 KB
- anchors_dump.mjs 2 KB
- beats.py 7 KB
- bee.js 74 KB
- build.mjs 7 KB
- cam_track.mjs 2 KB
- capture.mjs 11 KB
- check.mjs 6 KB
- check.yml 1 KB
- console (18).js 25 KB
- console (3).js 25 KB
- console (8).js 26 KB
- console.js 13 KB
- director.js 11 KB
- download 1 KB
- dsp.py 13 KB
- film.mjs 6 KB
- fs-258269-mouth-pop.ogg 8 KB
- fs-323432-typing.ogg 60 KB
- fs-329533-room-tone-in-an-apartment-livi.ogg 141 KB
- fs-329569-roomtone-bedroom-yew.ogg 166 KB
- fs-339521-vhs-rewind-forward-and-eject.ogg 35 KB
- fs-349504-triangle-open-04.ogg 30 KB
- fs-416777-digital-typing-wav.ogg 18 KB
- fs-426767-apartment-room-tone-wav.ogg 167 KB
- fs-447909-keyboard-typing.ogg 48 KB
- fs-447910-plop.ogg 6 KB
- fs-79388-keyboard-typing-wav.ogg 67 KB
- fs-824189-pop-in-sfx.ogg 7 KB
- gait.js 6 KB
- guides (19).js 6 KB
- guides (9).js 6 KB
- guides.js 6 KB
- hud.js 7 KB
- jump.js 2 KB
- look.js 6 KB
- loudness.py 2 KB
- main (1).js 1 KB
- main (14).js 1 KB
- main (16).js 1 KB
- main (4).js 1 KB
- main (6).js 1 KB
- main.js 1 KB
- mix.py 5 KB
- open.mjs 2 KB
- package-lock.json 16 KB
- package.json 1 KB
- parts (10).js 14 KB
- parts (20).js 14 KB
- parts.js 18 KB
- paths.mjs 3 KB
- piranha.js 81 KB
- probe_warm.mjs 3 KB
- run_sfx.py 1 KB
- runtime.js 5 KB
- score (11).py 6 KB
- score (21).py 4 KB
- score.py 6 KB
- score_demo.py 6 KB
- score_kit.py 8 KB
- sheet.mjs 6 KB
- sim_green (12).js 5 KB
- sim_green (22).js 6 KB
- sim_green.js 6 KB
- spider.js 72 KB
- stage (13).js 15 KB
- stage (23).js 16 KB
- stage.js 16 KB
- stage3d.js 4 KB
- style.css 7 KB
- synth.py 10 KB
- timeline (15).json 1 KB
- timeline (17).json 1 KB
- timeline (2).json 1 KB
- timeline (5).json 1 KB
- timeline (7).json 1 KB
- timeline.json 1 KB
- timeline.mjs 4 KB
- tour (24).js 16 KB
- tour.js 24 KB
- tour_10.js 18 KB
- tour_bee.js 25 KB
- tour_v2.js 18 KB
- util.js 3 KB
- warm.js 4 KB
- wave.mjs 4 KB
Omitted from the package: 2 (too large or executable); available in the repository.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · meya232026/Magic-Factory | 95 | MIT |
| Nyxera0x/cutaway | 100 | MIT |
Database snapshot: 13.11.2026 · package version af86ad57daf3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95teardown
Build an interactive 3D simulator of a real machine or mechanism (an engine, a landing gear, a walking linkage, a pump, a gearbox) as one offline HTML page people can take apart, with live panels driven by the same model that moves the parts, a button for every subsystem,… - 95product-viz
Build an interactive 3D visualization of a real product, as one offline HTML page plus a 60 fps video with a generated score. Use when the user wants a product taken apart in 3D, an exploded view, a cutaway, a teardown video, a 3D model or demo page of a physical product, or a… - 100teardown
Build an interactive 3D simulator of a real machine or mechanism (an engine, a landing gear, a walking linkage, a pump, a gearbox) as one offline HTML page people can take apart, with live panels driven by the same model that moves the parts, a button for every subsystem,… - 1003d-short
Make a finished vertical 3D explainer Short (1080x1920, 30 fps, ~40 s MP4 with voice, captions, labels and music) from one prompt such as "make a Short about how a jet engine works". Builds a stylized 3D object in Blender, opens it up (cutaway, X-ray or exploded view), animates… - 100exploded-view
Builds interactive 3D explainers of how a machine or product works, in three.js, with a staged exploded view driven by a slider or scroll, x-ray shells, a section cut through the casing, labels pinned to parts with leader lines that never cover the model, and hover or click to… - 100blueprint-teardown
Create exploded technical illustrations of physical things and layered build-ups, such as semiconductor packages (CoWoS, InFO, flip-chip BGA, HBM stacks), boards, devices and their internals, or a concept drawn as stacked plates, as an interactive page with assembled and…