Skip to main content
WEB
SkillFreeBy GameSkillGameSkill original

Cutscene Script (in-engine cutscenes as checked data)

/cutscene-script

A GameSkill original for in-engine cutscenes in small 2D browser games: the scene is a list of beats (fade, move, say, camera, wait, cue, set) placed by time or after another beat. cutscene.js schedules them, computes the scene at any time t as a pure function, plays it with skip and seek and fires game cues exactly once. A Node checker prints the timeline and lints unreadable lines, overlapping moves, unknown actors and abrupt endings. Ships The Lantern Ferry, an original cutscene tested in headless Chrome.

License
MIT
By
By GameSkill
Download ZIP

Tested by GameSkill

29/29 checks passed on Canvas 2D in headless Chrome + Node 22 (2026-11-09): trigger, a runnable example, a screenshot and self-check, one job per skill, and English + Chinese docs. Trigger checks match prompts against skill descriptions; they are not a live agent run.

Test report

GameSkill's tested copy

Written and tested by GameSkill for gameskill.dev. The ZIP holds the whole skill: SKILL.md and its Chinese version, scripts, a runnable example, tests, the self-check list and our test report.

Download tested ZIP (36 KB)Roadmap: Gameplay mechanics

A GameSkill original, released under MIT. The ZIP keeps LICENSE and CREDITS.md, which lists the workflow inspiration, the CC0 test assets and the third-party libraries with their licenses.

Cutscene Script (in-engine cutscenes as checked data)

Self-check

  • cut_check --strict 通过:0 错误 0 警告 / cut_check --strict passes with 0 errors and 0 warnings
  • 只根据 state 绘制,同一个 t 像素相同 / Drawing uses only the state; the same t gives the same pixels
  • 跳过后事件只触发一次,并有跳过键 / A skip key exists and cues fire once after a skip

Install

Tell your AI

Install the skill from https://gameskill.dev/skills/cutscene-script/install.md

GameSkill's tested copy

Tested copy into .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/cutscene-script.zip -o /tmp/gameskill-cutscene-script.zip
unzip -oq /tmp/gameskill-cutscene-script.zip -d .claude/skills
rm /tmp/gameskill-cutscene-script.zip

What you get

  • cutscene.js: schedule, lint, pure stateAt(t), and a player with update, seek, skip and once-only cues
  • tools/cut_check.mjs: the timeline with start and end of every beat, state at chosen times, FAIL/WARN with fixes
  • The Lantern Ferry: an original 17 s scene with a ferry, a dock keeper, dialogue, a camera move, a bell cue and fades
  • 17 checks in test/run_tests.mjs, including pixel-identical renders for the same t in headless Chrome

Good fit

  • Intros, story beats and endings in browser games
  • Dialogue that vanishes before it can be read, and cues that fire twice on skip
  • Agents that need to test a cutscene without watching it

Not for

  • Rendered trailers and marketing video: use game-trailer-from-code
  • Branching dialogue trees and quest logic
  • Godot AnimationPlayer or Unity Timeline scenes

Try this prompt

Prompt
Add a skippable 15-second intro to my original browser game: the hero arrives by boat, two lines of dialogue, a camera push-in and a fade, then hand control to the player.

About this skill

A GameSkill original. Cutscenes built from ad-hoc timers break the same ways every time. A line disappears before anyone can read it, two moves fight over one character, a skip leaves the game mid-scene or fires a sound twice, and nobody can say what happens at second 9 without watching. Here the scene is data. cutscene.js computes the timing, makes the picture at any moment a pure function of t, and plays the scene with seek, skip and once-only cues. tools/cut_check.mjs prints the timeline and lints it before anyone watches.

Agent steps

  1. Write the scene as beats, with dur: 'auto' for lines.
  2. Check it with cut_check in strict mode and fix every FAIL and WARN.
  3. Play it with createPlayer, draw only from the state, bind a skip key, and test renders at chosen times.

Common problems it solves

  • Dialogue shorter than its reading time, and lines that overlap.
  • Moves on one character that overlap, and targets far off stage.
  • Skips that leave the game half-way or fire cues twice.

Credits

The idea of orchestrating game cutscenes with a coding agent comes from a post on X in our 2026-11-05 radar (idea only; no code or text was used). The Lantern Ferry, the code and the text are ours.

Requirements

  • Any browser for playback; cutscene.js has no dependencies
  • Node 22+ for tools/cut_check.mjs (standard library only)
  • Chrome or Chromium for the self-test

Topics

FAQ

MATCHED PRO KIT$49/yr

Game Polish Workflow

A repeatable workflow for getting an AI agent to actually improve your game: a 10-step polish loop, bilingual prompts, a troubleshooting guide for common AI-made game bugs, and playtest and release checklists.

Works well with

Skills the author points to as related or as the better fit for neighbouring tasks.

Game Trailer from Code
WEB
Skill
By GameSkill

Game Trailer from Code (Steam trailer and store images)

A GameSkill original: turn your own running game into a 15-second Steam gameplay trailer and every store image with code. Frame-exact capture, a JSON cut list, zh/en captions and SRT, a soundtrack synced to game events, an H.264/AAC encode, and a checker for Steam's trailer rules, loudness, the 6-second microtrailer and the capsule sizes. Version 1.1 adds a rhythm tool that finds every cut, dead air and black frames, matches cuts to the cut list and moves them onto the music's beat, plus stage-by-stage confirmation with the user.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Browser Game Input Check
WEB
Skill
By GameSkill

Browser Game Input Check (keyboard that just works)

A GameSkill original for keyboard input in browser games: a drop-in input.js that binds physical keys, ignores OS repeats, stops page scrolling, releases keys on alt-tab, never loses quick taps, ignores text fields and leaves browser shortcuts alone, plus a checker that drives the game in headless Chrome and prints PASS / FAIL with a fix for 15 checks, including one press acting once through a slow frame.

Web (Phaser / Three.js)Claude Code · Codex +2
Code Sprites 16
WEB
Skill
By GameSkill

Code Sprites 16 (pixel sprites drawn in code, locked palette)

A GameSkill original for browser games whose sprites are written in code: text rows of palette indices over a locked 16-colour palette, no image files. A dependency-free sprites.js validates, bakes and draws them crisp by origin; a Node checker fails ragged rows, illegal characters, empty or resized frames, extra colours and wrong sizes and writes a PNG contact sheet. Ships Seed Courier, an original 16-colour platformer tested in headless Chrome so every pixel on screen is a palette colour.

Web (Phaser / Three.js)Claude Code · Codex +2

Similar skills