跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

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:

GenreVariantsPhysicsKey Data Structures
shoot-em-upbullet hell, shmup, Raiden-type, vertical/horizontal shooterArcadebullet pools, wave spawners, hitboxes
card-gamesolitaire, matching, deck-builder, poker variantNonedeck, hand, discard pile, card state
platformerendless runner, side-scroller, precision platformerArcadetilemap, player body, collectibles
tower-defenselane defense, creep wave, placement strategyNone (path-based)tower registry, enemy path, wave queue
puzzlematch-3, sliding, Tetris-type, word gameNone or Arcadegrid 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)

  1. Probe — inspect cwd for existing projects, conflicts, or extend intent.
  2. Classify — auto-detect genre from description, ask user to confirm.
  3. Ask — 2-3 rounds of clarifying questions (max 3 rounds).
  4. Scaffold — write runnable game skeleton.
  5. Plan — write goals-plan.md with goal sequence.
  6. Write — generate all goal folders at once (including QC checkpoint as the final goal).
  7. Hand off — print file paths + /goal commands.

Extend mode (user explicitly states intent)

  1. Probe — detect existing project, read goals-plan.md + state bridge to understand current state.
  2. Classify — identify what genre the existing project is (from its goals-plan.md or AGENTS.md).
  3. Ask — 1-2 rounds: what features to add, scope, whether to include QC checkpoint.
  4. (Skip scaffold — project already exists.)
  5. Plan — append new goals to existing goals-plan.md.
  6. Write — generate new goal folders only (continuing goal numbering from highest existing).
  7. Hand off — print new file paths + /goal commands for the new goals only.

Never write files until confidence is at 95%+.

Step 1 — Probe

Before asking the user anything, inspect the cwd.

SignalWhat it tells us
package.jsonExisting project — check for Phaser in deps
package.json → Phaser 3 in depsExisting Phaser project → check if extend mode
tsconfig.jsonTypeScript already configured
vite.config.*Build tool already in place
src/ with Phaser importsExisting game code → check if extend mode
goals/ folderPrevious goal runs; check for slug collision
goals-plan.mdExisting roadmap → strong signal for extend mode
AGENTS.mdExisting conventions to respect
.gitignoreCheck coverage for node_modules, dist/
index.htmlExisting entry point
tests/ with PlaywrightTest infra already in place

New game mode

Existing Phaser project detected AND user did NOT express extend intent? Stop. Print:

This

阅读完整来源 ↗