What it is
Reference to Game starts from a complaint most people who have prompted a game will recognise: "colorful" and "painterly" in a prompt do not pin down the size of an accent colour, a character's proportions or how far the camera sits. A reference does, but those decisions tend to get lost during implementation. The skill gives the agent a workflow to carry them through: inspect first, decide which reference governs each dimension, lock the style on a small scene, then expand. It accepts very different starting points. A single screenshot gets its style extracted and the missing mechanics authored and labelled. A gameplay video gets camera motion separated from object motion. A text-only idea gets an art direction that is marked as invented. The default output is Three.js with TypeScript and Vite, in 2D, layered 2.5D or full 3D, and the README warns that full 3D is not automatically the most faithful choice. The four worked games show the range: a jetboat racer, a candy-factory puzzle with three solvable levels, a painted 2.5D meadow game and a first-person train shooter. Each ships with its original image, development sheet, comparison and notes on what still differs. We read the README and did not build a game with it.
Who it's for
- Indie developers and artists who have concept art and want a playable prototype that still looks like it
- Game jam teams turning a mood board into a small Three.js game
- Developers reskinning an existing prototype with new art while keeping its rules
Requirements
Requirements
- Claude Code, Codex, Cursor or another agent that can load skills
- Python 3.10+ for the r2g.py CLI; Pillow for image tools
- ffmpeg and ffprobe for audio and video inspection
- Node 20+ for helper tests, Node 22+ recommended for the example games
- A fal key only if you choose to generate assets (paid)
Setup
Step 1
bashclaude plugin marketplace add gokayfem/reference-to-gameStep 2
bashclaude plugin install reference-to-game@reference-to-gameStep 3
bashOr, for agents using the skills CLI: npx skills add gokayfem/reference-to-gameStep 4
bashpython3 -m pip install -r skills/reference-to-game/scripts/requirements.txt
مهارة مع أداة سطر أوامر توجه وكيل البرمجة من مرجع (صورة أو فيديو أو لوحة تصميم أو نموذج أو صوت أو فكرة مكتوبة) إلى لعبة Three.js قابلة للعب تحافظ على شكل المرجع وألوانه، مع مقارنات وأدلة لعب. توليد الأصول عبر fal اختياري ومدفوع.
Examples
From an image and a development sheet
PromptMake a playable Three.js game from this image and full development sheet. The style and colors are the most important part. You can create fal assets.Expected output: Allows paid fal asset generation; drop the last sentence to stay on local assets.
Appearance from one source, motion from another
PromptUse this ink illustration for appearance and this clip for movement. Build a small exploration game without changing the drawing style.Expected output: Shows the skill's idea of assigning authority per dimension instead of averaging styles.
Reskin an existing prototype
PromptHere is an existing prototype and a new art reference. Keep the rules, replace the visual direction, and show comparisons.Expected output: Keeps mechanics and swaps the art direction.
Start a case from the command line
bashpython3 skills/reference-to-game/scripts/r2g.py init cases/my-game \
--input /path/to/concept.png \
--input /path/to/movement.mp4 \
--brief "Make this playable while preserving its style and colors"
python3 skills/reference-to-game/scripts/r2g.py inspect cases/my-game
python3 skills/reference-to-game/scripts/r2g.py prompt cases/my-game \
--out cases/my-game/IMPLEMENT.txtWhat it does: Copies and hashes the references, inspects them and writes an implementation handoff for your agent.
Run a worked example without a fal key
bashgit clone https://github.com/gokayfem/reference-to-game.git
cd reference-to-game/examples/petal-pals/app
npm ci
npm run devWhat it does: Starts the Petal Pals example locally.
Pros & cons
Pros
- Pro:Treats looking like the reference and being playable as separate checks, so neither hides a failure in the other
- Pro:References are copied and hashed, never modified
- Pro:Comparison tool does not stretch images or invent a similarity score
- Pro:fal jobs are recorded before any billable request and uncertain submissions are never silently retried
- Pro:Four runnable example games with references, style contracts and case notes; tests run without paid API calls
Cons
- Con:fal generation is paid, and the README says the budget bookkeeping is not a server-side spending cap
- Con:Only Three.js + TypeScript + Vite has verified project generators in this release
- Con:Example art and generated media have separate reuse terms; check CREDITS.md before reusing them
- Con:The worked games predate the skill and are not a controlled benchmark
- Con:A review pass checks that evidence exists, not that the game is artistically faithful