Game Trailer from Code (Steam trailer and store images)
/game-trailer-from-code
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.
- 许可证
- MIT
- 出品
- GameSkill 出品
我们测过
在 Node 20 + Chrome 156 headless + ffmpeg 7.1 (libx264, AAC) 上通过 35/35 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告GameSkill 测过的版本
GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。
GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

自检清单
- 只用了用户自己游戏的画面和合成音效 / Only the user's own game footage and synthesised sound
- 第一帧就是实机画面,每段镜头 1.2 到 4 秒,结尾卡不超过 2 秒 / Gameplay in the first frame, shots 1.2-4 s, end card at most 2 s
- check-trailer 对中英两个版本都是 PASS / check-trailer says PASS for both the en and zh versions
- capsule 和截图里除了游戏名没有其他文字 / No text but the title on capsules and screenshots
- 静音看过一遍,手机尺寸看过一遍 / Watched once muted and once at phone size
- 画面里有 AI 生成的素材就在内容调查问卷里写明 / AI-made assets on screen are listed in the Content Survey
- npm test 和 npm run test:browser 都通过 / npm test and npm run test:browser pass
推荐搭配
中文指南
这个 skill 做什么
GameSkill 出品(MIT)。用代码把你自己正在运行的游戏做成一段 15 秒的 Steam 实机预告片和全套商店图片:虚拟时钟逐帧采集(每次结果都一样)、JSON 剪辑表、中英字幕烧录加 SRT 文件、跟着游戏事件响的合成配乐、H.264/AAC 1920x1080 编码,再用检查器按 Steam 规则给出 PASS/FAIL:分辨率、30/60 fps、码率 5000 kbps 以上、44.1/48 kHz、响度和真峰值、Steam 从 6 段 1 秒片段拼成的 microtrailer、黑场和静止画面,以及 capsule、库图片和截图的尺寸。
什么时候用
- 第一次给游戏做 Steam 预告片、商店图或截图
- 预告片上传后 Steam 处理失败或者画面被改了
- 每次更新内容后用同一份剪辑表重新出片
怎么装
下载本页的 ZIP,把 game-trailer-from-code/ 文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),在文件夹里运行 npm ci,重启 agent。需要 Node.js 20+、Chrome 和 ffmpeg。
最小示例
node tools/make-trailer.mjs example/trailer.json 大约 60 秒,用我们自己的游戏《灯蛾》生成 out/trailer_en.mp4、out/trailer_zh.mp4、两份 SRT、5 张截图、9 张 capsule 和库图片、商店动图和逐秒总览图。node tools/check-trailer.mjs out/trailer_zh.mp4 --srt out/trailer_zh.srt --assets out/store 输出 PASS。
我们怎么测的
npm test 跑 10 个 Node 测试:Steam 规格的每条规则、响度和真峰值、剪辑表规则、时间换算、中英 SRT、microtrailer 逐秒检测、PNG 和商店图尺寸、音效事件和 WAV。npm run test:browser 做 11 项端到端检查:在无头 Chrome 里完整出片,中英两个版本都通过全部检查;字幕只在该出现的地方不同;配乐跟着拍翅、得分和一次撞击;同一帧两次采集逐字节一致;故意做坏的文件(25 fps、1500 kbps、1024x576、22 kHz、开头 1.5 秒黑场)和无声文件都被判 FAIL,理由正确。第一次出片时检查器抓到 AAC 编码后真峰值 -0.9 dBTP 超标,已在编码参数里留出余量。
致谢
质检思路(黑场、静止画面、响度、开头几秒)和分阶段检查参考了 win4r 的 video-director(MIT)。没有复制代码或文字,采集、剪辑表、Steam 检查、音效和文字都是我们写的。Steam 规则来自 Steamworks 官方文档(2026-10-28 核对)。
搭配
steam-launch-check:上架时间线、退款窗口、AI 披露和上架后复盘ccgs-launch-checklist:各平台上线清单web-audio-sfx-synth:游戏里的音效
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/game-trailer-from-code/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/game-trailer-from-code.zip -o /tmp/gameskill-game-trailer-from-code.zip
unzip -oq /tmp/gameskill-game-trailer-from-code.zip -d .claude/skills
rm /tmp/gameskill-game-trailer-from-code.zip包含内容
- tools/capture.mjs: a virtual clock for frame-exact, repeatable capture of a browser game
- tools/make-trailer.mjs: cut list to trailer_en.mp4 and trailer_zh.mp4, SRT files, 5 screenshots, 9 capsule and library images, store GIF/WebP, contact sheet
- tools/check-trailer.mjs: PASS/FAIL against Steam's trailer and store-asset rules, loudness, true peak, microtrailer seconds, black and frozen stretches
- src/sound.js: a synthesised music bed and cues on game events, no audio files
- Lantern Moth example and 10 Node tests plus 11 end-to-end checks
适合
- Indie and web games that need a first Steam trailer and store images
- Fixing trailer uploads Steam rejects or re-times (size, fps, bitrate, sample rate)
- Rebuilding the trailer after every content update with the same cut list
不适合
- Cinematic, story or live-action trailers that need an editor and a director
- Launch timing, refunds, reviews and sales retros: see steam-launch-check
试试这条提示词
Make a 15-second Steam gameplay trailer and the store capsules for my browser game, with Chinese and English captions.关于这个 Skill
A GameSkill original. Your own running game plus a JSON cut list becomes a Steam-ready 15-second gameplay trailer in two languages and the full set of store images, and a checker says PASS or FAIL against Steam's published rules.
Agent steps
- Only the user's own game: no other games' footage, music, logos or characters.
- Deterministic capture:
tools/capture.mjsswaps in a virtual clock (performance.now,Date.now,requestAnimationFrame,Math.random), so every build gives the same frames. - Cut list: 6 shots of 1.2-4 s, gameplay in the first frame, captions in en and zh, end card at most 2 s.
- Build: captions, card and capsules are HTML rendered to transparent PNGs; key art is re-captured without the HUD.
- Sound: a synthesised bed plus cues on game events, normalised to -14 LUFS with true-peak headroom for AAC.
- Check until PASS: Steam spec, loudness, every 1-second microtrailer window, black and frozen stretches, SRT timings, capsule and screenshot sizes.
- List AI-made assets that appear on screen in Steam's Content Survey, with the rest of the game's AI use.
Common errors it fixes
- Uploads at 1024x576, 25 fps or 22 kHz that Steam fails to process.
- Logo or black openings that turn into blank seconds in the microtrailer.
- Text or HUD numbers on capsules, and AAC encodes that push the true peak over -1 dBTP.
Credits
QA ideas (black and frozen frames, loudness, the first seconds) and staged checks from video-director by win4r (MIT). No code or text was copied; capture, cut list, checks, sound and text are ours. Steam rules from the Steamworks documentation, checked 2026-10-28.
环境要求
- Node.js 20+, Google Chrome and ffmpeg/ffprobe (libx264, AAC)
- A game with a demo or autopilot mode (browser games directly; native engines via a fixed-step replay)
相关主题
常见问题
基于 video-director (作者 win4r,MIT)的思路。代码和文字由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Launch Checklist (Claude Code Game Studios)
Launch readiness across every department: code, content, store, marketing, community, infrastructure, legal, go/no-go sign-offs.
Web Audio SFX Synth (no audio files)
A GameSkill original: 12 game sound effects made from code with the Web Audio API, plus the mixer around them: unlock on the first tap, a compressed master bus with mute, pitch and level variation, stereo pan, distance falloff and a voice limiter. Every sound is rendered offline and checked for clipping.
相似 skills
open-game-skills
An MIT pack of about 190 SKILL.md agent skills for game design: combat feel, camera, traversal, world, validation, 2D/Spine and art pipeline, with a dispatcher and adapters for Three.js, PixiJS, Phaser, Cocos, Godot, Unity and Unreal.
Kart Drift Boost (tiers, windows, ramps)
A GameSkill original: arcade kart drift-boost rules that reward skill. Drifts charge three tiers, release opens a 0.85 s window you must press in, counter-steer adds a CUT bonus, ramps give one air and one landing boost, boosts take the maximum instead of stacking, and walls cancel everything pending.
One-button Flight (fair tap-to-flap)
A GameSkill original: the rules of a one-button flight game that is never unfair. Flaps set speed instead of adding it, a fixed-step simulation plays the same at 30 and 144 fps, the hitbox forgives grazes, and a seeded gap generator stays inside the reachable band, checked by an autopilot.
Procedural Low-Poly Buildings (kit, validator, views)
A GameSkill original: build stylised low-poly buildings in code from a small spec, then prove them: plot and height limits, a triangle budget per tier, closed outward meshes, supported parts, level roofs and side-only taper measured from silhouettes, plus front, side, top and 3/4 renders checked against the geometry.