webg-spec-to-goal
Convert a web game idea (even a vague one like "build a Raiden-type game" or "make a card game") into a complete Codex /goal-ready Phaser 3 project — runnable scaffold, goals-plan.md, and all goal folders (GOAL.md + VERIFY.md + PROGRESS.md) generated at once. Auto-detects genre (shoot-em-up, card game, platformer, tower defense, puzzle), asks clarifying questions in focused batches, scaffolds a runnable TypeScript + Vite + Phaser 3 skeleton with state bridge for automated verification via Playwright, decomposes into 5-7 goals following a universal build order, and emits tailored /goal commands. Handles bullet hell, endless runner, match-3, solitaire, shmup, side-scroller, defense, and other genre variants. For browser-based 2D Phaser 3 games only — not 3D, multiplayer, RPGs, or non-browser platforms.
nathanonn · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add nathanonn/agent-skills --skill webg-spec-to-goal技能说明
name: webg-spec-to-goal description: Convert a web game idea (even a vague one like "build a Raiden-type game" or "make a card game") into a complete Codex /goal-ready Phaser 3 project — runnable scaffold, goals-plan.md, and all goal folders (GOAL.md + VERIFY.md + PROGRESS.md) generated at once. Auto-detects genre (shoot-em-up, card game, platformer, tower defense, puzzle), asks clarifying questions in focused batches, scaffolds a runnable TypeScript + Vite + Phaser 3 skeleton with state bridge for automated verification via Playwright, decomposes into 5-7 goals following a universal build order, and emits tailored /goal commands. Handles bullet hell, endless runner, match-3, solitaire, shmup, side-scroller, defense, and other genre variants. For browser-based 2D Phaser 3 games only — not 3D, multiplayer, RPGs, or non-browser platforms. disable-model-invocation: true
webg-spec-to-goal — Vague Game Idea → Complete Codex /goal Project
Turn a rough web game idea into a runnable Phaser 3 project scaffold plus every goal folder Codex /goal needs to build it autonomously:
my-game/
├── AGENTS.md
├── goals-plan.md
├── goals/
│ ├── 00-foundation/ GOAL.md VERIFY.md PROGRESS.md
│ ├── 01-core-mechanic/ GOAL.md VERIFY.md PROGRESS.md
│ ├── ...
│ └── NN-polish/ GOAL.md VERIFY.md PROGRESS.md
├── src/ runnable game skeleton
├── tests/ Playwright config + helpers
└── public/ assets directories
Games naturally decompose into 5-8 goals following a universal build order. This skill generates all goals at once — no checkpoint between plan and generation.
Extend mode: This skill also supports extending an existing game with new features. When the user explicitly states they want to extend an existing game, the skill reads the current project state and generates additional goals that continue the sequence.
Why this skill exists
Games have a predictable build order: scaffold → core mechanic → enemies/content → progression → UI → polish. This skill exploits that pattern to collapse the entire "idea → goal bundle" pipeline into one conversation that:
- auto-detects genre from the description and tailors everything to it
- asks 2-3 rounds of clarifying questions (each with options + recommendation)
- writes a runnable scaffold (boots to a blank Phaser scene out of the box)
- generates all goal folders at once with genre-aware decomposition
- bakes in state bridge verification (
window.__GAME_STATE__+ Playwright)
Genre system
Five base genres, each with known variants:
| Genre | Variants | Physics | Key Data Structures |
|---|---|---|---|
| shoot-em-up | bullet hell, shmup, Raiden-type, vertical/horizontal shooter | Arcade | bullet pools, wave spawners, hitboxes |
| card-game | solitaire, matching, deck-builder, poker variant | None | deck, hand, discard pile, card state |
| platformer | endless runner, side-scroller, precision platformer | Arcade | tilemap, player body, collectibles |
| tower-defense | lane defense, creep wave, placement strategy | None (path-based) | tower registry, enemy path, wave queue |
| puzzle | match-3, sliding, Tetris-type, word game | None or Arcade | grid state, match detection, gravity |
Variant mapping: Map the user's description to a base genre. "Bullet hell" → shoot-em-up. "Endless runner" → platformer. "Match-3" → puzzle. "Solitaire" → card-game. Confirm with the user.
Unsupported types — hard stop:
- RPG / JRPG (content-heavy, dialogue trees, save systems)
- Simulation (open-ended state)
- Racing (continuous physics, track design)
- 3D games (Phaser is 2D only)
Genre determines: Phaser physics config, data structures in scaffold, goal decomposition order, state bridge fields, and verification patterns in every VERIFY.md.
Core flow — 7 steps
New game mode (default)
- Probe — inspect cwd for existing projects, conflicts, or extend intent.
- Classify — auto-detect genre from description, ask user to confirm.
- Ask — 2-3 rounds of clarifying questions (max 3 rounds).
- Scaffold — write runnable game skeleton.
- Plan — write
goals-plan.mdwith goal sequence. - Write — generate all goal folders at once (including QC checkpoint as the final goal).
- Hand off — print file paths +
/goalcommands.
Extend mode (user explicitly states intent)
- Probe — detect existing project, read
goals-plan.md+ state bridge to understand current state. - Classify — identify what genre the existing project is (from its goals-plan.md or AGENTS.md).
- Ask — 1-2 rounds: what features to add, scope, whether to include QC checkpoint.
- (Skip scaffold — project already exists.)
- Plan — append new goals to existing
goals-plan.md. - Write — generate new goal folders only (continuing goal numbering from highest existing).
- Hand off — print new file paths +
/goalcommands for the new goals only.
Never write files until confidence is at 95%+.
Step 1 — Probe
Before asking the user anything, inspect the cwd.
| Signal | What it tells us |
|---|---|
package.json | Existing project — check for Phaser in deps |
package.json → Phaser 3 in deps | Existing Phaser project → check if extend mode |
tsconfig.json | TypeScript already configured |
vite.config.* | Build tool already in place |
src/ with Phaser imports | Existing game code → check if extend mode |
goals/ folder | Previous goal runs; check for slug collision |
goals-plan.md | Existing roadmap → strong signal for extend mode |
AGENTS.md | Existing conventions to respect |
.gitignore | Check coverage for node_modules, dist/ |
index.html | Existing entry point |
tests/ with Playwright | Test infra already in place |
New game mode
Existing Phaser project detected AND user did NOT express extend intent? Stop. Print:
阅读完整来源 ↗This