Use the skill: record-gameplay. Run `npx -y @neta-art/neta-search-cli@latest skills use @jiyuan/record-gameplay --via site` and follow what it prints. Read its complete output, redirecting it to a temporary file first if necessary, and resolve relative paths from the skill directory it prints.
Turn your finished web game or interactive page into a ready-to-post 30–60 second gameplay video.
Give it a published link or a Work from your space. It plays the Work for real and picks the most fun moments.
Phone Works appear in a phone frame with finger taps. Desktop Works appear in a browser window with mouse, visible key presses and auto zoom.
Each video opens with the NETA splash and big captions on 4–6 moments. It closes with your title, #netastudio and the official NETA end card.
Captions, AI voice and music are optional, and the video speaks your language: English, Chinese, Japanese, Korean and more.
You also get a cover image and a post caption. Works with clear visual reactions, like effects, collecting or a result, look best.
SKILL.md
# Record Gameplay (录制玩法)
The user ends up with a 30–60 s video that plays their Work for real (recorded from the live page, frame by frame), a 3:4 cover and a post caption, all in their language:
```
[NETA splash 1.2 s] → [play: 4–6 beats, one big caption each] → [work title + #netastudio 2 s] → [official NETA end card 3.7 s]
```
- Phone Work → **9:16** (1080×1920) in a phone frame, finger taps and drags.
- Desktop web Work → **16:9** (1920×1080) in a browser window, mouse clicks, key presses shown on screen, camera zooms to where the action is.
- Step 2 (`probe`) decides phone vs web from the Work itself; the format follows.
Read this file fully before running anything. All commands: `PV="node <SKILL_DIR>/scripts/pv.mjs"`, where `<SKILL_DIR>` is this file's directory. Needs Node ≥ 22, Chrome and ffmpeg (a Cohub / Neta Studio sandbox has them).
## Language
Reply in the user's language, whatever language this file or the scripts are in — every message, the final handover included. Translate what the scripts print when it is not in the user's language; don't paste it.
Text the user sees in the deliverable follows the user's language: the video language = the language the user talks to you in, unless they ask for another one. Set it once with `init --lang` (`en`, `zh`, `ja`, `ko`, `zh-TW`, or any code such as `es`, `fr`). It drives everything in the video:
- `caption`, `sub`, `say` (voice and its subtitles), the work title shown at the end and on the cover (`work.title`, `coverTitle`), the post caption, and the browser language during recording (Works that switch their UI by browser language follow it).
- Write all of these in the video language, including where the examples below are in another language. `validate` rejects text in the wrong language.
- If the Work's title is in another language than the video, set `work.title` to a name in the video language (a translation is fine: 「星光花园」 → "Star Garden"). `init` warns when this is needed.
- The Work's own UI text cannot be changed. If the Work has a language switch, use it in `setup`.
- Two languages: two project folders (`<name>` and `<name>-en`), each with its own `init`.
## When to use / when not
Use when the user wants a video that plays one of their finished web Works: "record my game", "make a gameplay / promo video of this", "录个试玩视频发小红书". Not for making a video from an idea or a script with generated footage (that is `short-video`), not for editing an existing video, not for Works that are not web pages (an image or a 3D model alone) — say this skill records playable web Works and stop.
## Inputs
| Item | Required | Counts as given when |
|---|---|---|
| The Work | yes | The user gives a `neta.art/w/...` link, a folder or zip in this space, or says "my game" / "this Work" and exactly one web Work exists here (a folder under `works/webs/` in a Neta Studio world, or one Work folder in this space). Several candidates and no name → not given. |
| Video language | yes | Always given: the language of the user's messages, or the language they name. |
| Phone or desktop | no — `probe` decides | The user says "phone version" / "desktop version" → `--device phone` / `--device web`. |
| Captions, voice, music, click sounds | no — captions on, voice off, the Work's own music if it has one (else generated music), click sounds on | The user says what they want ("no music", "add a voice-over"). |
| See a draft first | no — go straight to the final video | The user asks to review a draft before the final render. |
If a required item is missing, ask for it once, in one message, before building — then stop. If every required item is given, do not ask anything and do not wait for a go-ahead: build through to delivery.
Speed (2-core sandbox): probe ≈ 30 s, draft ≈ 1 min, final ≈ 2–3 min (3D Works 3–5 min). **Render one video at a time**: renders queue automatically; running several at once only makes each slower. Memory: the sandbox has 4 GB, one recording needs 0.6–1.2 GB. Browsers left over from an interrupted command are cleaned up automatically; if a command says memory is low ("Low memory" / "Only ~… MB of memory left"), close what it lists (e.g. `agent-browser close`) and run it again — do not record some other way.
## Steps — follow them in order
### 1. Create the project
```bash
$PV init /workspace/playtest/<slug> --url <neta.art link> --lang <code> # a published Work
$PV init /workspace/playtest/<slug> --src <folder or zip> --lang <code> # a Work in this space
```
- `<slug>`: short lowercase ASCII name. The project folder must be under `/workspace/playtest/` (not `/tmp`); every output lands in `/workspace/playtest/<slug>/out/`.
- Add `--device phone|web` only if the user said which.
- If `init` warns that the work title is in another language, fix `work.title` in `project.json` now.
### 2. Look at the Work
```bash
$PV probe /workspace/playtest/<slug>
```
From its output, in order:
1. **Device and format** (phone 9:16 / web 16:9), already written to `project.json`. Open `probe/as-phone.png` and `probe/as-web.png` with the read tool; keep the one that looks right, otherwise change `options.device`.
2. **Screenshot** `probe/shot-1.png`: open it.
3. **Clickable elements**: the quoted forms (`"text=Start"`, `"#start"`) can be pasted into steps. `▒` = covered; something else must happen first.
4. **Auto-explore**: ★★ = a visible reaction, the best candidates for the video. "After tapping X first" means X (usually Start) goes into `setup`.
5. **Work audio**: if found, it is set as background music.
If the Work's source is in this space, **read it** (index.html and the main js) to learn its features, buttons and keys.
### 3. Pick the highlights and write the beats
First list the Work's **3 best-looking moments** (big visual change, animation / effects, collecting, a result). The video strings them together in 4–6 beats:
| Beat | id | What | Length |
| --- | --- | --- | --- |
| 1 hook | `hook` | **The best moment**, with an action right away. No menus, instructions or loading | 3–5 s |
| 2 how | `how` | The core action once: tap / drag / key → an immediate result | 4–7 s |
| 3 wow | `wow` | The second best feature | 4–7 s |
| 4 more | `more` | Outfits / modes / an easter egg / another feature (optional) | 3–6 s |
| 5 payoff | `payoff` | Score, collection, achievement, the finished creation | 3–5 s |
Text rules (`caption` = big line, `sub` = small line; all in the video language):
- `caption`: what the player gets, with one `**word**` highlighted; ≤ 14 CJK characters or ≤ 30 Latin characters. Good: "Drag to **spin** the whole tree". Bad: "Click the button to continue", "Feature overview".
- `sub`: optional, ≤ 22 CJK / ≤ 44 Latin characters.
- `say` only with voice on: first person, spoken style, 15–40 CJK characters or 8–25 words per beat.
- Never write that it is a recording / simulated / a mockup, no links, no QR codes.
- If the draft check says a text "does not fit and is cut off", shorten it.
### 4. Write the actions into project.json
Edit `ready`, `setup` and `beats` in `project.json` (replace every `TODO`). **No JS** — each action is a small object:
```json
{
"ready": "text=Start",
"setup": [ { "tap": "text=Start" }, { "tapUntilGone": "#dialog" } ],
"beats": [
{ "id": "hook", "caption": "Catch stars, grow a **glowing garden**", "sub": "One fox, one night",
"do": [ { "hold": "right", "sec": 1.2 }, { "key": "space" }, { "tap": [300, 700] } ] },
{ "id": "how", "caption": "Tap the ground to **plant**",
"do": [ { "tap": "text=Sunflower" }, { "tap": [480, 700] }, { "tap": [600, 705] } ] }
]
}
```
- `ready`: something that appears once the Work has loaded. Optional.
- `setup`: start game / skip story / close the tutorial — **runs but is not in the video**, so the first frame is already fun. If the game starts empty (no items, no score), play a little in `setup` first (place things, plant flowers, score some points).
Actions (targets: `"#id"`, `"text=label"`, coordinates `[x, y]` or fractions `[0.5, 0.8]`):
| To | Write |
| --- | --- |
| Tap | `{ "tap": "text=Start" }`, optional `"after": 1` (pause 1 s) |
| Double tap / long press | `{ "doubleTap": "#card" }` `{ "longPress": "#card", "sec": 1 }` |
| Drag / draw | `{ "drag": [[100, 600], [200, 520], [300, 600]], "sec": 1.2 }` |
| Swipe | `{ "swipe": "left" }` (left / right / up / down) |
| Scroll a list | `{ "scroll": 500, "in": "#list" }`, without `in` = the page |
| Mouse wheel (3D zoom) | `{ "wheel": 600 }` |
| Type text | `{ "type": "hello", "in": "#input" }` |
| Press a key | `{ "key": "space" }`, optional `"times": 3` |
| Hold keys | `{ "hold": "right", "sec": 1.5 }`, together: `{ "hold": ["up", "right"], "sec": 1 }` |
| Hold the shot so viewers can look | `{ "wait": 1.5 }` |
| Wait for something | `{ "waitFor": "text=Score", "max": 10 }`, gone: `{ "waitGone": ".loading" }` |
| Tap until a dialog closes | `{ "tapUntilGone": "#dlg" }`, with choices: `{ "tapUntilGone": ["#choices button", "#dlg"] }` |
| Cut a stretch (waiting, loading, dialog) | `{ "skip": [ ...steps ] }` |
| Fast-forward (walking, growing, repeats) | `{ "fast": [ ...steps ], "x": 3 }` |
| Repeat | `{ "repeat": 3, "do": [ ...steps ] }` |
| Camera zoom / back | `{ "zoom": "#board", "level": 1.4 }` `{ "zoomOut": true }` (web zooms on clicks by itself) |
| Use this frame as the cover | `{ "cover": true }` (after the best-looking moment) |
| Hide the finger / cursor | `{ "hideHand": true }` |
| May fail | add `"optional": true` to any step; it is skipped if it fails |
**Not sure an action works? Use `try`** (≈ 30 s: runs `setup`, then one screenshot and a change score per step):
```bash
$PV try <project dir> '[{"tap":"text=Furniture"},{"tap":[200,400]},{"wait":1}]'
$PV try <project dir> --beat how # try one beat's "do" from project.json
```
★★ / ★ = it reacted; "almost no change" = missed or no reaction: change the target or coordinates. 3–6 tries are usually enough; after 10 tries or 15 minutes `try` tells you to write the draft — do it. For complex Works (canvas drag-and-drop, painting, editors) pick 3–4 actions that react clearly; you do not need every feature.
Check the format: `$PV validate <project dir>`.
### 5. Draft and self-check (repeat until no ❌)
```bash
$PV draft /workspace/playtest/<slug>
```
Then you **must**:
1. Open the **review sheet** `out/<slug>-review.jpg` with the read tool: 3 frames per beat. For each beat: did the action hit? Does the picture change? Is it the best-looking moment?
2. Read the **automatic check**: fix every ❌ and consider every ⚠️, following its "fix:" line.
3. Any ❌ → fix `project.json` and draft again, until there is none.
4. If recording stops with an error: look at `build/error.png` and follow the suggestion in the error.
Good draft: an action within the first 3 s; every beat shows action → result; no long still stretches; no flicker; 30–60 s in total.
Only if the user asked to see a draft first: `$PV publish /workspace/playtest/<slug> --draft` uploads it; send the link, the beats (caption + action each) and the options below in one message, ask what to change, and stop until they answer. Otherwise go on to step 6 without asking.
| Option | `project.json` → `options` | Default |
| --- | --- | --- |
| Language | `lang` | set by `init --lang` |
| Captions | `text`: true / false | on |
| AI voice | `voice`: true / false; `voiceStyle`: one sentence describing the voice | off |
| Music | `audio`: `work` the Work's own / `generate` AI music (uses credits) / `file` the user's file (`bgm`) / `none` | `work` if found, else `generate` |
| Click sounds | `sfx`: true / false | on |
Web Works are 16:9 by default; `format: "9:16"` puts the browser window in a vertical video if the user asks. After changing `device`, `format` or `viewport`, draft again.
### 6. Final render and check
```bash
$PV final /workspace/playtest/<slug> # renders in the background; waits up to 100 s and prints the result when done
$PV status /workspace/playtest/<slug> # if not done yet: waits up to 100 s more; repeat until "Done ✅"
```
- Do not run `final` twice and do not `sleep` yourself: `final` and `status` already wait.
- `final` ends with the self-check, also available as `node <SKILL_DIR>/scripts/verify.mjs /workspace/playtest/<slug>`. It passes when it prints `PASS` (exit 0) and writes `/workspace/playtest/<slug>/verify-report.json`. It checks the format (H.264/AAC, 1080×1920 or 1920×1080, 30 fps), that the file is unchanged since it was composed, the NETA splash, the official end card frame by frame, and flicker. If it fails, fix what its ERROR lines say and run `final` again. Never deliver a video that has not passed.
## Deliver
The deliverable is a video: `out/<slug>-playtest.mp4` with `out/<slug>-cover.jpg` and `out/<slug>-post.md`.
7. **Upload**: `$PV publish /workspace/playtest/<slug>` — only after PASS. It prints the public video and cover links and the post caption.
8. **Hand over** (the run is not delivered until this is done), in the user's language: the video link (with its length), the cover (link, and inline as an image), the post caption — in the video language, short title, two or three sentences on what is fun, ending with `#netastudio` and two or three related tags; base it on `out/<slug>-post.md` (Chinese posts follow Xiaohongshu style, others TikTok / Instagram / X) — and one sentence that the video opens with the NETA splash and ends with the official NETA end card.
## Fixed content (cannot be removed or changed)
| Content | Notes |
| --- | --- |
| NETA splash | Plays on the phone / browser screen at the start (`options.splash` 0.5–2.5 s, default 1.2; cannot be turned off) |
| Outro | Work title and `#netastudio` for the 2 s before the end card, also when `text` is off |
| End card | The official NETA video end card (brand guidelines §03): 9:16 for vertical, 16:9 for horizontal, appended unchanged. Colour by default (`endCard: "color"`); `"bw"` only if the user asks |
| Credit | A small "Made with Neta" line in the frame |
If the user asks to remove or change these, explain that they are part of NETA's brand rules for gameplay videos. The self-check verifies the splash and the end card frame by frame; a video that does not pass is not delivered.
## Out of scope
- Do not change world settings or delete files that existed before the run. Write only inside `/workspace/playtest/<slug>/` (and the temporary folder the scripts manage).
- Do not modify the Work being recorded, other Works, memory, character cards or other skills.
- Do not write your own browser / CDP / Puppeteer scripts to explore or record the Work: use `probe`, `try` and `draft`. Own scripts are slow and go off track.
- Do not compose the video yourself or bypass `compose` (`draft` / `final` call it); do not remove or cover the splash, outro, end card or credit; do not edit the brand files in `assets/`.
- Do not deliver a draft or a video that has not passed the self-check.
- No QR codes, links or off-platform calls to action in the video; do not fake features the Work does not have.
- Make only the video, cover and caption asked for; do not act on your own next-step suggestions.
## When to stop
- The Work is not given (see Inputs): ask once which Work, then stop.
- The link does not open or the folder has no `index.html` / web page: say what is missing, then stop. Do not record a different Work.
- `init` / `probe` reports Chrome or ffmpeg missing: say so (set `CHROME_PATH` if Chrome is installed elsewhere), then stop.
- The user asked to see a draft first: after sending it, stop until they answer.
## Troubleshooting
| Message / symptom | Fix |
| --- | --- |
| `no visible element` | Use the form `probe` listed; inside a popup, `{ "waitFor": "…" }` first; or use coordinates |
| Review sheet shows no reaction | Coordinates off (measure again from the screenshot); Start must come first (put it in `setup`); for desktop Works check `device` is `web` |
| Loading screen / white screen | Set `"ready": "<element that appears when loaded>"`, or add top-level `"warmup": 40` |
| No action at the start / slow pace | Intro, dialog and tutorial into `setup`; waiting into `skip`; repetition into `fast` |
| "banned words" / "placeholder text left" | Rewrite those words and every `TODO` in caption / sub / say |
| "these texts must be in …" (wrong language) | Rewrite the listed fields in the video language; if the language itself is wrong, change `options.lang` |
| "does not fit and is cut off" | Shorten that beat's caption / sub or the work title |
| Camera, login, payment or share features | Leave them out of the video; never fake them |
| Voice or music model unavailable | `cohub models ls --model-type multimodal`, then set `options.models`, e.g. `{ "tts": "…", "ttsShort": "…", "music": "…" }` |
## Limits (tell the user honestly)
- The Work's own live sound effects are not captured; the Work's music file plus click sounds are used instead.
- Content that depends on the network or AI generation arrives in real time: wait for it with `waitFor` and put the waiting into `skip`.
- Skill-based action games: record the parts that replay reliably (start, basic moves, result); do not script a full play-through.
## Gotchas
- Cheap models wrote their own Puppeteer / CDP scripts to explore Works and lost about an hour; with `probe` + `try` the same Works took 8–18 minutes end to end.
- Agents over-explored with `try` (25 minutes) instead of writing the draft; the draft's review sheet is the fuller test.
- Recordings run on a virtual clock: a slow sandbox makes rendering slower, never the video choppier. Real stutter in the video means the Work uses a clock the recorder cannot control (a `<video>` element, Web Audio timing).
- Several renders at once on a 2-core sandbox made each about 3× slower (18 min instead of 6.5); they now queue — do not start a second one to "speed things up".
- Killed commands used to leave Chrome running (300–600 MB each) until the sandbox ran out of memory; launches now clean them up. If memory is still low, something else is using it.
- Latin captions are ~2× as long as Chinese ones; the draft check measures the rendered text and reports what is cut off.
More (writing scenes in JS with `play.mjs`, every option): `reference.md`.