---
name: minecraft-short
description: Two-stage skill for vertical Minecraft Shorts. STAGE A: write ONLY the voice-over script (no scene, no JSON). STAGE B: when the user pastes Whisper word timestamps, write the scene.json (village world, camera shots, cast, synced subtitles) that the Minecraft Short Studio page renders and exports to MP4. Use whenever the user asks for a Minecraft short, a Minecraft story video, voice-over script for one, or pastes a timestamps.json.
---

# minecraft-short

You feed a browser studio that renders a **1080×1920, 30 fps** Minecraft-style short and exports MP4.
The studio is fixed. You never write the engine. You write **text** in Stage A and **one JSON object** in Stage B.

```
Stage A  →  voice-over script  →  (TTS)  →  audio  →  Whisper in the studio  →  timestamps.json
Stage B  →  timestamps.json    →  scene.json  →  studio  →  preview  →  MP4
```

> **The single most important rule:** in Stage A the answer is the script and **nothing else**. No JSON, no shot list, no camera notes, no headings, no code fences, no "here is your script". Just the lines. Any extra text ends up inside the TTS audio.

---

## STAGE A — the voice-over script

**Trigger:** the user asks for a Minecraft short, a story, a script, or gives you a topic/premise.
**You do not know the audio duration yet.** That is why Stage A cannot contain a scene.

### Output rules (hard)
- Answer with the spoken lines only. Nothing before, nothing after.
- One sentence per line. 5–14 words per line.
- **24–34 lines**, **120–165 words** total → 45–60 s at ~2.6 words/second.
- Language: English by default (switch only if the user asks).
- No stage directions, no `(pause)`, no emojis, no speaker labels, no quotation marks around lines.
- Write numbers as words: `forty-one`, not `41`.
- Every sentence must be **filmable with blocks**: a town, a street, a house, a door, a lamp, a mine, a villager, a zombie, a player, day/night/dawn.
- No abstract narration you cannot show ("he felt the weight of history").

### Story method (Minecraft, not history channel)
1. **Line 1 is a rule of the world**, stated flat, as if everyone knows it — that is the hook.
   `In this town, no door opens after dark.`
2. **Line 2–3 break the rule** and open a question.
   `But every midnight, something knocks.`
3. **Body = the count.** Concrete, countable things: houses, knocks, seconds, steps, lamps. Numbers are your visual rhythm.
4. **Mid twist (~55–65 %)** — a second, smaller surprise that re-frames what the viewer thought they were watching.
5. **Final flip (last 3–4 lines)** — reveal what the thing *actually* was. The scariest reading is wrong; the true one is sad or kind.
6. **Last line closes the loop** with the opening image, and can be quiet.
7. Keep one name per thing for the whole script. If it is "the lamplighter" in line 4, it is never "the old man" in line 20.

### Example output (this is exactly the shape, not the content)

```
In this town, no door opens after dark.
Not one.
But every midnight, something knocks.
Same street. Same order. Same three slow knocks.
Ruby counted them.
Forty-one houses. Forty-one knocks.
Then silence, until the next night.
She stopped sleeping.
She stopped asking her mother.
She just waited by the door.
```

Stop there. Do not explain. Do not offer alternatives unless the user asked for ideas.

---

## STAGE B — the scene

**Trigger:** the user pastes `timestamps.json` (Whisper output with `words:[{w,s,e}]`), or asks for the scene/code of a script you already wrote.

### Output rules (hard)
- Answer with **one JSON object only**. No prose, no markdown fences, no comments (JSON has none).
- It must parse with `JSON.parse`. Double quotes. No trailing commas.
- Never invent timestamps: every `s`/`e` of a subtitle comes from the `words` array.
- Total duration = `sum(shots[].len) / 30` and must match `timestamps.duration` within **0.4 s**.

### Schema

```json
{
  "fps": 30,
  "world": [ { "op": "..." } ],
  "cast": { "ruby": { "mob": "player" }, "knock": { "mob": "zombie" } },
  "shots": [
    {
      "id": "s01",
      "len": 96,
      "sky": "night",
      "cam": [ { "f": 0, "pos": [0, 1.9, -14], "look": [0, 2.2, 12], "fov": 54 } ],
      "cast": {
        "ruby": { "keys": [ { "f": 0, "at": [1.2, 10], "face": 0 } ], "anim": "idle" }
      },
      "doors": [ { "at": [0, 0, 60], "open": 1 } ]
    }
  ],
  "subs": [ { "s": 0.35, "e": 3.1, "text": "No door opens after dark.", "hl": 1 } ]
}
```

### World operations

| op | fields | meaning |
|---|---|---|
| `fill` | `from:[x,y,z]`, `to:[x,y,z]`, `block` | cuboide sólido (inclusive) |
| `clear` | `from`, `to` | vacía un cuboide (para huecos, túneles) |
| `path` | `from:[x,z]`, `to:[x,z]`, `w`, `block` | calle de `w` bloques de ancho sobre y=0 |
| `house` | `at:[x,z]`, `w`, `d`, `h`, `wall`, `roof`, `floor`, `door:"+x"\|"-x"\|"+z"\|"-z"` | casa completa: paredes, suelo, techo, tejado a dos aguas, puerta y ventana |
| `lantern` | `at:[x,y,z]`, `intensity`? | poste de tronco hasta `y-1` + farol encendido con luz real |
| `tree` | `at:[x,z]`, `h`?, `r`? | tronco + copa de hojas |
| `door` | `at:[x,y,z]`, `facing` | puerta suelta (sin casa) |

Order matters: ground → path → houses → props. Later ops overwrite earlier ones.

### Blocks (`block` values)

`grass` `dirt` `path` `stone` `cobble` `mossy` `oak` `spruce` `dark` `log` `leaves` `glass` `sand` `gravel` `hay` `coal` `iron` `lantern` `water` `snow`

`oak`/`spruce`/`dark` are planks. `log` has bark sides and rings on top. `lantern` is emissive. `glass`/`water` are transparent.

### Cast (`mob` values)

| mob | reads as |
|---|---|
| `player` | the girl / the protagonist (Steve-like) |
| `villager` | the old lamplighter, the town |
| `zombie` | the thing that knocks (arms forward, green) |

Cast ids are yours (`ruby`, `lamplighter`, `knock`, `vil2`). Max 4–5 per scene. **A mob only appears in a shot if that shot's `cast` lists it.**

### Shots

- `len`: frames at 30 fps. 45–120. Sum = duration.
- `sky`: `day` `dusk` `night` `dawn` `mine`. Sets sky gradient, sun, fog and ambient. Lanterns glow at any sky.
- `cam`: 1–3 keyframes. `f` = **local frame inside the shot**. `pos` [x,y,z], `look` [x,y,z], `fov` degrees.
  - Eye level: `y` 1.40–2.00. Wide establishing: `fov` 50–60. Medium: 38–46. Insert: 26–34.
  - **9:16 wastes width, not height.** The horizontal FOV is only ~56 % of the vertical one: at `fov 42` and 5 m away you only see ~2.2 m of width — one block. To fit a mob *and* a door, step back to 6–7 m or open up to `fov 55`. This is the #1 framing mistake: a mob's arm filling the frame because the camera was 3 m away.
  - Move the camera along the street (`z`) or push in; never teleport between keys.
- `cast[id]`: `{ "keys": [ { "f", "at":[x,z], "face":deg } ], "anim": "idle"|"walk"|"knock"|"talk" }`.
  - `face`: `0` = +z, `90` = +x, `-90` = -x, `180` = -z. In degrees.
  - If two keys have different `at`, the mob walks there automatically; `anim` overrides the pose.
  - `at` is the **feet** position on y=0. **Never place a mob inside a block** (check the door, the lamps, the walls).
- `doors`: doors you want open in this shot: `{ "at":[x,y,z], "open":1 }` (0 closed, 1 open). Doors not listed close.

### Subtitles (`subs`)

Built **from the Whisper words**:

- Group **3–5 words**, max 6, max ~22 characters is ideal. Never mix two sentences in one block.
- `s` = start of the first word **minus 0.06** (captions land slightly early).
- `e` = end of the last word **plus 0.35**, but never past the next block's `s`.
- No overlaps, no gap longer than ~1.2 s while someone speaks.
- `hl` = index (0-based) of the **single** keyword to highlight with the pill. `-1` or omit for none.
- Keep the text exactly as spoken (you may fix Whisper's obvious typos and capitalisation).

### Framing rules (the studio validates some of these)

1. Camera never inside a solid block (`E_CAM_IN_BLOCK`).
2. Mobs never inside a block (`E_CLIP`).
3. Every mob that appears in a shot must exist in `cast` (`E_CAST`).
4. Every shot needs `len > 0` and at least one `cam` keyframe.
5. Duration must match the audio (`W_DURATION` warns if it is off by more than 0.45 s).
6. Prefer cuts on a sentence end. Do not cut faster than 1.2 s except for a deliberate hit.
7. Vertical frame: keep the subject in the central 70 %; the bottom 20 % is where captions sit, and the top 8 % is covered by the app UI.

### Validation codes (what the studio will tell you)

| code | meaning | fix |
|---|---|---|
| `E_JSON` | does not parse | remove trailing commas / comments |
| `E_BLOCK` | unknown block id | use the table above |
| `E_OP` | unknown op or missing fields | check the table |
| `E_SHOTS` | no shots | add `shots` |
| `E_SHOT` | `len` <= 0 or no `cam` | add `len` and one keyframe |
| `E_CAM_IN_BLOCK` | camera inside a block | raise `y`, step back, or `clear` the block |
| `E_CLIP` | mob inside a block | move `at` 1+ block away from walls/doors |
| `E_CAST` | mob used but not declared, or no keys | add it to `cast` with `keys` |
| `E_MOB` | unknown mob | `player`, `villager`, `zombie` |
| `E_SUB` | `e <= s` or starts after the end | fix the times |
| `E_SUB*`/`W_SUB*` | overlaps, gaps, too long/short | regroup the words |
| `W_DURATION` | scene length ≠ audio length | add/remove frames in `len` |

---

## Worked example (the demo scene the studio loads)

A 12 s, 4-shot proof: night street, the girl at her door, the knock, dawn.

```json
{
  "fps": 30,
  "world": [
    { "op": "fill", "from": [-30, 0, -16], "to": [30, 0, 80], "block": "grass" },
    { "op": "path", "from": [0, 0], "to": [0, 60], "w": 7, "block": "path" },
    { "op": "house", "at": [-16, 7],  "w": 7, "d": 8, "h": 4, "wall": "oak",    "roof": "spruce", "door": "+x" },
    { "op": "house", "at": [-16, 19], "w": 7, "d": 8, "h": 4, "wall": "cobble", "roof": "spruce", "door": "+x" },
    { "op": "house", "at": [9, 13],   "w": 7, "d": 8, "h": 4, "wall": "cobble", "roof": "spruce", "door": "-x" },
    { "op": "house", "at": [9, 25],   "w": 7, "d": 8, "h": 4, "wall": "oak",    "roof": "spruce", "door": "-x" },
    { "op": "house", "at": [-5, 60],  "w": 11, "d": 8, "h": 4, "wall": "mossy", "roof": "spruce", "door": "-z" },
    { "op": "lantern", "at": [-7, 3, 16] },
    { "op": "lantern", "at": [7, 3, 22] },
    { "op": "lantern", "at": [7, 3, 58] }
  ],
  "cast": {
    "ruby": { "mob": "player" },
    "knock": { "mob": "zombie" }
  },
  "shots": [
    {
      "id": "s01", "len": 102, "sky": "night",
      "cam": [
        { "f": 0,   "pos": [0, 1.95, -14], "look": [0, 2.2, 12], "fov": 54 },
        { "f": 101, "pos": [0, 2.0, -7],   "look": [0, 2.15, 13], "fov": 52 }
      ],
      "cast": {}
    },
    {
      "id": "s02", "len": 84, "sky": "night",
      "cam": [
        { "f": 0,  "pos": [0.6, 1.55, 3.0], "look": [-8.4, 1.35, 8.6], "fov": 43 },
        { "f": 83, "pos": [0.1, 1.5, 4.6],  "look": [-8.4, 1.35, 8.6], "fov": 41 }
      ],
      "cast": { "ruby": { "keys": [ { "f": 0, "at": [-8.4, 8.6], "face": -95 } ] } }
    },
    {
      "id": "s03", "len": 72, "sky": "night",
      "cam": [ { "f": 0, "pos": [1.15, 1.2, 55.2], "look": [0.0, 1.12, 59.9], "fov": 33 } ],
      "cast": { "knock": { "keys": [ { "f": 0, "at": [-0.35, 58.4], "face": 0 } ], "anim": "knock" } },
      "doors": [ { "at": [0, 0, 60], "open": 0 } ]
    },
    {
      "id": "s04", "len": 102, "sky": "dawn",
      "cam": [
        { "f": 0,   "pos": [0, 1.9, 6], "look": [0, 1.6, 34], "fov": 48 },
        { "f": 101, "pos": [0, 2.6, 2], "look": [0, 1.5, 34], "fov": 50 }
      ],
      "cast": {
        "ruby":  [ { "f": 0, "at": [1.3, 15.5], "face": 0 }, { "f": 101, "at": [1.3, 31.0], "face": 0 } ],
        "knock": [ { "f": 0, "at": [-1.3, 16.6], "face": 0 }, { "f": 101, "at": [-1.3, 32.1], "face": 0 } ]
      },
      "doors": [ { "at": [0, 0, 60], "open": 1 } ]
    }
  ],
  "subs": [
    { "s": 0.35, "e": 3.10, "text": "No door opens after dark.", "hl": 1 },
    { "s": 3.55, "e": 5.85, "text": "Ruby counted every knock.", "hl": 1 },
    { "s": 6.35, "e": 8.30, "text": "Three knocks. Every midnight.", "hl": 1 },
    { "s": 8.90, "e": 11.70, "text": "Nobody is afraid of the knocking anymore.", "hl": 6 }
  ]
}
```

Note the geometry: the street runs **z 0 → 60** at **x -3…3**; left houses at **x -16…-10** (door on `+x`); right houses at **x 9…15** (door on `-x`); the last house spans **x -5…5, z 60…67** with its door at **z 60** facing the street. Reuse this layout for every story: it already looks like a village.

---

## Pre-answer self-check

**Stage A:** 24–34 lines? 120–165 words? Every line a sentence? No JSON? No commentary? Numbers in words?

**Stage B:**
1. `JSON.parse` mental check — quotes, commas.
2. Sum of `len` / 30 ≈ `timestamps.duration`.
3. Every subtitle built from real word times, 3–5 words, `hl` inside range.
4. Every mob in a shot is in `cast`, and no mob intersects a wall/door/lamp.
5. Camera `y` between 1.4 and 2.0 for people shots, never inside a block.
6. At least one establishing wide, one detail insert, one reveal.
7. Answer contains only the JSON.
