How the animated-shorts parts of Nyxs Video work (3D kit, voice, sound effects, YouTube publishing, channel memory) and the mistakes made building them. Use when changing src-tauri/resources/video-template/nyxs/kit3d, voice, sfx, publish or channel code, the shorts sections of src/lib/video/skill/video.md, or when orchestrating sessions on them.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nyxs Shorts?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nyxs-code-nyxs-shorts)
---
name: nyxs-shorts
description: How the animated-shorts parts of Nyxs Video work (3D kit, voice, sound effects, YouTube publishing, channel memory) and the mistakes made building them. Use when changing src-tauri/resources/video-template/nyxs/kit3d, voice, sfx, publish or channel code, the shorts sections of src/lib/video/skill/video.md, or when orchestrating sessions on them.
---
# Animated shorts in Nyxs Video
## Where things are
- **3D kit** `@nyxs/3d`: `src-tauri/resources/video-template/nyxs/kit3d/`, API in
`docs/shorts-3d-api.md`, tests in `src/lib/video/__tests__/kit3d.test.ts`.
- **Directing by name** (framings, marks, beats, the plan's own check): `kit3d/direct.ts`, `place.ts`,
`Directed.tsx`, `clock.ts`; tests in `src/lib/video/__tests__/kit3dDirect.test.ts`. How it is built:
`docs/shorts-3d-api.md`, "Directing by name".
- **Voice**: `src-tauri/src/video/voice*.rs`, `nyxs/voice.mjs`, `src/lib/video/voiceTool.ts`,
`docs/shorts-voice-api.md`. Settings: `VoiceSettingsSection` (its place is provisional).
- **Sound**: `nyxs/sfx.mjs`, `nyxs/lib/sampleSfx.mjs`, `nyxs/loudness.mjs`, `src/lib/video/sfxTool.ts`;
the user's sound library in `src-tauri/src/video/sfx_library.rs` (`~/.nyxs/sound-library`).
- **YouTube**: `src-tauri/src/video/publish*.rs`, `src/lib/video/publish*.ts`, `youtubeAuth.ts`,
`src/components/video/publish/`.
- **Checker**: `nyxs/lib/audit.mjs` (rules, pure), `kit3d/audit.ts` (what the kit notes), `check` in `nyxs/review.mjs`; `nyxs/lib/frameCache.mjs` keeps the frames it drew for the sheets.
- **Second look**: `src/lib/video/watchTool.ts`, a model that takes video watching the draft.
- **Channel memory**: `src-tauri/src/video/channel.rs`, `src/lib/video/channel*.ts`. It goes by
workspace folder.
- **What the agent reads**: `src/lib/video/skill/video.md`. A rule that any user's short needs goes
there; one channel's decisions go in that channel's own `.nyxs/skills/`.
## Rules the user set
- Uploading takes the user's real press; the agent has no upload tool, and private is the default.
- No robot on youtube.com or YouTube Studio: YouTube's terms forbid it. Official API only.
- API data is shown, sorted, summed and averaged. Scores, predictions, grouping by our own tags and
the retention curve joined to the script stay off (`channelPolicy.ts`) until Google grants the
derived-metrics permission.
- Results are read with `youtubeReadToken()`, never the token that can upload. The consent text must
say exactly what the code does, in the 10 languages.
- A paid voice never spends without the amount the user accepted, and nothing switches voice alone.
- Sound effects are recorded once with the user's ElevenLabs key and kept in their library, never shipped in
Nyxs: ElevenLabs lets them be used in videos but not handed out as a collection. The user hears each new take
and the ones they reject are removed (`sound_library` with `remove`) and made again.
- Never clone a real person's voice, or take it from a channel's audio.
- Renders use the GPU by default and say when they fall back.
## Mistakes to avoid
- `npx tsc --noEmit` at the root checks nothing. Use `npx tsc --noEmit -p tsconfig.app.json` and
`-p tsconfig.node.json`.
- A near arm drawn after the head covers the face, and front and side poses computed apart jump when
turning. One skeleton (`rig.ts`) and the numeric tests over poses, turns and bodies.
- Stills don't show sliding feet, pops between poses or a camera through a head: look at a short
proxy too.
- A shadow may fall on the set but not on a character's face, and must leave from the feet.
- Voice speed isn't linear: Kokoro jumped from 3.4 to 4.1 words a second between 1.3 and 1.4.
Measure the pace of what came out.
- 3D packages that `require` React broke the player but not the render. Check every path: player,
screenshot, contact_sheet, proxy, render, still and standalone export.
- Anything `<Canvas>` takes as a prop is applied again on every frame in the player. `fitPreview` changed
only the store's `dpr`, so each frame resized (and emptied) the canvas twice and playback was blank, while
paused it looked fine (2026-12-03, editor at 1266x878: 948 resizes in 6 s, 30 in 8 s after). Check a 3D
scene *playing*, with the picture shown small.
- Every shot is a `<World>` with its own WebGL canvas, so a cut painted one empty frame (12 cuts in 20 s;
`premountFor` didn't help). `World` now covers the new canvas with the last picture of the one that left
(2026-12-03: 0 empty frames in the whole `marathon-1904`, and the still of a render is byte-identical).
Count empty frames with CDP's `Page.startScreencast`: screenshots miss most of them.
- A test folder with a junction to the runtime's `node_modules`: delete the junction, check it is gone, and
only then delete the folder, in separate steps (a failed `rmdir` before an `rm -rf` nearly emptied it).
- A render's tabs take one frame in every N: something that changes with `frame % 2` never changes inside
a tab. Test a fix per tab, and prove it paints (the captions' repaint box, 2026-12-03: 2 ghosts in 15
renders at 1440x2560 before, 0 in 20 after; captions that flip in have no box).
- Measure speed with nothing else rendering: the same frame took 0.05 s or 0.24 s.
- Deleting a copy whose `node_modules` is a link can delete the original's. Remove the link first.
- The backend's file commands only read the project and the allowed folders: a file the user picks from
anywhere (the Google JSON in Downloads) is read by an `<input type="file">`.
- Anything that needs the runtime's ffmpeg waits for `useVideoRuntime`: after an update the Video view
may never have been opened (the publish window failed there).
- A channel's ideas and decisions stay in its own folder: this repo is public.
- The browser's upload tool only reads files inside the project.
- Two sessions can't share one runtime copy: give each its own and one owner for the kit.
- A fault found by eye is worth a rule in `audit.mjs` with a test. Tune rules on two shorts: the approved one
must come out nearly clean (12 lines for the pilot, 59 for the second short before its review, 2026-12-03).
- A new kit piece that draws a character by other means than `Character` isn't noted: call `noteCharacter`.
- Reviewing takes the check's frames: 1,794 frames in 87 to 98 s (RTX 5070, another session on the card), and
then 1.8 s a sheet. Sheet by sheet with stills it was 27 s each (2026-12-03).
- The bundle's key is the project's code and the runtime's folder name: after editing a test copy of the kit,
delete the copy's `bundles` and `frames`, or it draws the old one.
- The runtime's ffmpeg has no `rawvideo` muxer and no `fps` or `tile` filter; `-c:v rawvideo -f image2pipe` works.
- `videoTools.ts` is imported by the turn: a tool that calls a model loads `modelClient` and `turnStream` inside
its `run`, or the imports close a circle and the app doesn't start.
- Run review tasks with the runtime as the current folder: from elsewhere Remotion downloads its browser again.
- A step's length comes from how far the foot goes back while it's on the ground (`strideOf`), and `Character`
adds up steps frame by frame. Counted from a fixed stride, the feet slid about twice too far; a test in
`kit3d.test.ts` keeps them still (2026-12-03).
- An arm in front of the face starts under the head: only its forearm and hand are drawn over it
(`drawArmOver`). Drawn whole, the arm came out of the cheek, and cut with a straight clip it lost a piece.
- Seen from the side the shoulder stays as high as from the front: lowered 40 units, its round end showed on the
chest. The far arm's upper half goes behind the body (`behind`). Check all the poses at 0.55, 1 and -0.8.
- The hand fits any drawing (`grip.ts`): it looks at the pixels around the hand, so no object needs its own grip.
Check a change with many kinds at once: thin, wide, small, flat, with a handle, too big, at three turns.
- A flat thing in a hand is taken by its edge with the fingers over it (`heldSheet`). With only the thumb in
front it still looked pierced.
- What goes to the mouth or an eye (`to`) without a `point` put the hand itself there, hiding the face: there is a
default `point` now. Check a hand at the face with both hands at five turns, not at one.
- Everything outdoors takes the same wind (`wind.ts`): never a sine of its own in a piece. What has ink or casts a
shadow moves with its matrix, because the ink and shadow passes ignore a shader's vertices; `Grass`, which has
neither, moves in its shader.
- Long hair is drawn behind the body: over it, it looked like a beard.
- A smooth ball with a leaf texture looks like cardboard, whatever its colour. A crown is sprays of drawn leaves on a
dark core (`plants.tsx`), turned to the camera and lit by the crown's own normals; the core has no ink
(`userData.set` keeps its shadow on characters). A negative scale turns a card's light off: never mirror with it.
- An animal is muscles (rounded cones on bones) melted into one skin (`animals/mesh.ts`, 0.1 to 0.4 s once per kind and coat), so a new
one is a list in `species.ts`. Colour comes from the muscles; what must be sharp (a nose, a jaw that opens, an eye's rim) is its own part
or a bite (`cut`). Look at every new one close, in every action, and at the three gaits before showing it.
- A bird's shape fields must not share a name with its colours (`legs`, `head`, `tail` are colours): the spread of the
colours overwrote the shape, and every bird got a rooster's tail. Upright birds (owl) stand so with the pelvis at
run time, not in the bind pose, or wings and tail stay flat.
- Birds walk the same way (`animals/steps.ts`): a foot on the ground stays while the body goes over it, and a hopper
waits on the ground and moves only in the air. Swinging the legs by an angle made them skate.
- Feet are sent to their place and the bones follow (`motion.ts`): a test keeps them from sliding.
- Synthesized sound effects sounded fake to the user, and free CC0 sites gave uneven takes: the effects are
ElevenLabs recordings (`eleven_text_to_sound_v3`; v2 goes away on 2027-03-01). A kind's words, length and
loop are in `sfx_library.rs` (`PROMPTS`); a test keeps them equal to `SFX_KINDS`. Backgrounds and things that
go on (engine, clock, purr) are made with `loop`, so they repeat without a seam.
- A kit piece that is only in the 3D reference doesn't get used: the agent plans from the recipe in `video.md`
(shot plan, storyboard check). Grass, trees, wind, weather, animals and walks went out in 0.8.76 and the next
short (spirit-photos, 2026-12-04) used only held sheets and pigeons. Every new piece needs a line in the recipe
that says when to use it.
- Audio tags (`[laughs]`) go only to ElevenLabs' v3 and v4 and never into the captions; ElevenLabs may time
them, so `align` skips what is between brackets. A voice's settings (`tone`) enter a line's cache key only
when set, or every narration made before would be paid for again.
- Typed coordinates were the cost: of 31 corrections to one short's scenes, 16 were camera numbers and 5
character positions, in six rounds of looking and fixing (2026-12-04). The same short directed by name
needed 7 changes of one word (a `size`, a `from`, a mark), 5 of them told by the plan before any picture
(same day, kit still changing: measure again on a new short). A new scene is directed, never typed.
- A place's `room` is where the camera may stand, not its walls: past the floor's edge the camera sees
into nothing, though no wall is there (the lobby's floor ends at z 5.5). Stages written as "open at the
front" gave pictures with a band of empty colour under the set.
- A framing is solved on the frame it lands; what happens while it is held has to count too: the slow push
(a 300-frame hold ended 24 % nearer, the head out of the safe area) and a prop taken half way through.
Both have tests; a new thing that changes during a hold needs one.
- The move between two framings curves round the subject (`cameraAt`'s `mix`), so it goes a little wider
than both: a framing stands a margin inside the room, smaller in a small place (a lift is 2.1 m wide),
and the plan still says when the way crosses a wall or a solid.
- In 9:16, heads a third of a body make an over-the-shoulder shot with a long lens a head wider than the
picture: `past` uses a 50 degree lens from 2.6 m behind. Two people side by side come out tiny: with no
`from`, they are seen along the line between them.
- A side to walk in from or out by is where the camera of that frame doesn't see: found with the camera of
the frame they get there, and turned away from a wall when straight across the picture goes through one
(the pizza man walked out through the tower).
- Where up or down the eyes go comes from the world, not the picture: a taller head further away is lower
in the picture, and the guard looked down to look up at his boss.
- To see why a directed scene looks as it does, `scene.describe()`; to run a plan with no browser, build the
stage and the `direct()` call in a scratch vitest file (the kit's pure files load there with `remotion`
mocked) and delete it afterwards.
- A test runtime: copy `entry/`, `nyxs/`, `package.json` and `tsconfig.json` of the template to a folder
with its own name and link `node_modules` to the dev runtime's; run `node nyxs/review.mjs --project
<copy of the project> <options.json>` from it; empty its cache after each change to the kit. Unlink
`node_modules` before deleting the folder.
## Several sessions
- A busy session's queue fills up and then refuses messages. Send one complete message; when it is
refused, leave the instructions in a file in the work folder and point to it later.
- Only a session's first reply comes back by itself: ask for later reports with `send_to_session`.
- Sessions say "done" from their own tests. Look at the pictures and repeat the checks before the
commit.
- Every refused or open question goes to the user once, with a recommendation.
## Keep this current
- After each change to these parts, and after each video that showed a problem in them, update this
skill in the same task: add the mistake, remove what can't happen any more, correct what turned
out wrong.
- A quality or speed lesson is worth keeping only with its measure: what was compared, on which
machine, with nothing else rendering. Write the number and the date.
- Prefer a fix in the code with a test, then a line in `video.md`, and only then a line here. A rule
any user's short needs goes to `video.md`, never to one channel's skill.