promo-video
БесплатноЗапускает вложенные скриптыНе проверенRecord a high-FPS autonomous promo video of a Phaser game using the Chrome DevTools protocol helper (scripts/cdp.mjs). Triggers on: promo video, gameplay…
от PlayableIntelligence★ 383 звезды на GitHubОб этом скилле
Promo Video Recording
Record smooth, autonomous promo footage of a Phaser game for marketing / social media. The output is a 50 FPS MP4 in mobile portrait (9:16) — ready for TikTok, Reels, Moltbook, or X.
Technique
recordVideo from scripts/cdp.mjs (Chrome screencast frames piped to FFmpeg) writes a 25 FPS WebM with no config option. We work around it:
- Slow the game to 0.5× by patching all 5 Phaser time subsystems
- Record for 2× the desired duration at the recorder's native 25 FPS
- FFmpeg speed-up 2× → effective 50 FPS output
| Parameter | Default | Effect |
|---|---|---|
SLOW_MO_FACTOR |
0.5 |
Game runs at half speed → 50 FPS output |
WALL_CLOCK_DURATION |
DESIRED_GAME_DURATION / SLOW_MO_FACTOR |
Record for 2× to get correct game-time |
VIEWPORT |
{ width: 1080, height: 1920 } |
9:16 mobile portrait (always default unless user specifies otherwise) |
DESIRED_GAME_DURATION |
13000 (ms) |
~13s of game-time → ~6.5s promo clip |
Prerequisites
- Browser helper — copy it into the game (
cp <plugin-root>/scripts/cdp.mjs <project-dir>/scripts/); it drives the installed Google Chrome (orBOOP_CHROME=/path/to/chrome), no npm install - FFmpeg — must be available on PATH (
brew install ffmpegon macOS) - Dev server running — game must be served on localhost
Check both before starting:
test -f scripts/cdp.mjs && node --version # Node 22+
ffmpeg -version | head -1
If FFmpeg is not found, warn the user and skip the promo video step (it's non-blocking — the game still works without it).
Capture Script — Game-Specific Adaptation
Every game gets a custom scripts/capture-promo.mjs. The subagent must read the game's source files to determine:
1. Death/Failure Patching (CRITICAL)
The video must show continuous gameplay — never game over. Read GameScene.js (or equivalent) to find the death/failure method and monkey-patch it out.
How to find it: Search for the method called on collision/death. Common patterns:
this.triggerGameOver()— dodge gamesthis.takeDamage()→this.lives <= 0— multi-life gamesthis.gameOver()— direct calleventBus.emit(Events.PLAYER_HIT)/eventBus.emit(Events.GAME_OVER)— event-driven
Patch template (adapt per game):
await page.evaluate(() => {
const scene = window.__GAME__.scene.getScene("GameScene");
if (scene) {
// Patch ALL paths to game over
scene.triggerGameOver = () => {};
scene.onPlayerHit = () => {};
// For multi-life games, also prevent damage:
// scene.takeDamage = () => {};
// scene.playerDied = () => {};
}
});
2. Input Sequence Generation
The video must show dynamic, natural-looking gameplay. Read the game's input handling to determine:
- Which keys — ArrowLeft/ArrowRight? Space? WASD? Mouse clicks?
- Input style — continuous hold (movement), tap (jump/shoot), or both?
- Movement pattern — should the player sweep across the screen, dodge reactively, jump rhythmically?
Input patterns by game type:
| Game Type | Input Keys | Pattern |
|---|---|---|
| Side dodger | ArrowLeft, ArrowRight | Alternating holds (150-600ms) with variable pauses, occasional double-taps |
| Platformer / Flappy | Space | Rhythmic taps (80-150ms hold) with variable gaps (200-800ms) |
| Top-down | WASD / Arrows | Mixed directional holds, figure-eight patterns |
| Shooter | ArrowLeft/Right + Space | Movement interleaved with rapid fire |
| Clicker/Tapper | Mouse click / Space | Rapid bursts separated by brief pauses |
Randomize timing to avoid robotic-looking movement:
const holdMs = 150 + Math.floor(Math.random() * 450);
const pauseMs = 50 + Math.floor(Math.random() * 250);
Add a pause at the start (1-2s) to let the entrance animation play — this is the hook.
3. Game Boot Detection
All Phaser games built with the /viral-game or /make-game pipelines expose these globals:
window.__GAME__— Phaser.Game instancewindow.__GAME_STATE__— GameState singletonwindow.__EVENT_BUS__— EventBus singleton
Wait for both boot and active gameplay:
await page.waitForFunction(() =>
Установить promo-video в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл promo-video?
Record a high-FPS autonomous promo video of a Phaser game using the Chrome DevTools protocol helper (scripts/cdp.mjs). Triggers on: promo video, gameplay recording, marketing video, game capture.
Как установить скилл promo-video?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл promo-video запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
gtm-enterprise-account-planning
Strategic account planning and execution for enterprise deals. Use when planning complex sales cycles, managing multiple stakeholders, applying MEDDICC…
от GitHubgtm-partnership-architecture
Build and scale partner ecosystems that drive revenue and platform adoption. Use when building partner programs from scratch, tiering partnerships, managing…
от GitHublanding-page-conversion-audit
Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review…
от GitHubpower-platform-architect
Use this skill when the user needs to transform business requirements, use case descriptions, or meeting transcripts into a technical Power Platform solution…
от GitHub