new-game-scaffold
Creates a new game app in apps/ - scaffold script, game.config.ts, lockstep package.json, metro cache key, fonts, catalogs, owner IDs, the new-game checklist, a completeness check. Use when adding or starting a new game, or checking a game is complete. Not for the monorepo (monorepo-bootstrap).
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- new-game-scaffold
- description
- Creates a new game app in apps/ - scaffold script, game.config.ts, lockstep package.json, metro cache key, fonts, catalogs, owner IDs, the new-game checklist, a completeness check. Use when adding or starting a new game, or checking a game is complete. Not for the monorepo (monorepo-bootstrap).
02 资源文件 189
- 资产文件assets/copy-deck.json153.4 KB
- 资产文件assets/fonts/LilitaOne-OFL.txt4.3 KB
- 资产文件assets/fonts/LilitaOne.ttf27.4 KB
- 资产文件assets/fonts/Rubik-Bold.ttf266.4 KB
- 资产文件assets/fonts/Rubik-Medium.ttf260.6 KB
- 资产文件assets/fonts/Rubik-OFL.txt4.3 KB
- 资产文件assets/fonts/Rubik-Regular.ttf253.0 KB
- 资产文件assets/fonts/SOURCES.md4.2 KB
- 资产文件assets/fonts/Vazirmatn-Bold.ttf120.2 KB
- 资产文件assets/fonts/Vazirmatn-OFL.txt4.3 KB
- 资产文件assets/fonts/Vazirmatn-Regular.ttf119.9 KB
- 资产文件assets/line-siege-i18n/ckb.json2.4 KB
- 资产文件assets/line-siege-i18n/de.json1.8 KB
- 资产文件assets/line-siege-i18n/en.json1.6 KB
- 资产文件assets/line-siege-i18n/fa.json2.3 KB
- 资产文件assets/shared.json1.2 KB
- 参考文档examples/flock-tilt/en.json1.1 KB
- 脚本examples/flock-tilt/game.config.ts2.5 KB
- 参考文档examples/flock-tilt/scaffold-plan.txt1.3 KB
- 参考文档examples/owner-request.md2.1 KB
- 参考文档references/app-files.md15.7 KB
- 参考文档references/ids-and-names.md6.3 KB
- 参考文档references/new-game-checklist.md16.2 KB
- 脚本scripts/check-game-app.mjs6.0 KB
- 脚本scripts/check-lib.mjs44.4 KB
- 脚本scripts/lib/app-checks.mjs33.7 KB
- 脚本scripts/lib/app-files.mjs12.1 KB
- 脚本scripts/lib/app-modules.mjs2.8 KB
- 脚本scripts/lib/app-plan.mjs4.0 KB
- 脚本scripts/lib/assemble-fixtures.mjs3.5 KB
- 脚本scripts/lib/ship-placeholders.mjs15.7 KB
- 脚本scripts/lib/ts-scan.mjs3.0 KB
- 脚本scripts/scaffold-game.mjs11.3 KB
- 脚本scripts/selftest.mjs8.8 KB
- 脚本templates/app/app.config.ts195 B
- 其他templates/app/dot-gitignore40 B
- 脚本templates/app/game.config.ts2.6 KB
- 脚本templates/app/index.ts520 B
- 脚本templates/app/metro.config.js436 B
- 参考文档templates/app/package.json463 B
- 参考文档templates/app/src/i18n/ckb.json1.4 KB
- 参考文档templates/app/src/i18n/de.json1.1 KB
- 参考文档templates/app/src/i18n/en.json1.0 KB
- 参考文档templates/app/src/i18n/fa.json1.4 KB
- 参考文档templates/app/tsconfig.json331 B
- 脚本templates/tooling/new-game.ts1.3 KB
- 参考文档tests/fixtures/check-game-app-complete/bad-admob-placeholder-complete/EXPECT.txt296 B
- 参考文档tests/fixtures/check-game-app-complete/bad-admob-placeholder-complete/mutation.json371 B
- 参考文档tests/fixtures/check-game-app-complete/bad-assembly/EXPECT.txt48 B
- 参考文档tests/fixtures/check-game-app-complete/bad-assembly/mutation.json112 B
- 参考文档tests/fixtures/check-game-app-complete/bad-bundle-placeholder/EXPECT.txt101 B
- 参考文档tests/fixtures/check-game-app-complete/bad-bundle-placeholder/mutation.json153 B
- 参考文档tests/fixtures/check-game-app-complete/bad-complete-ads-off-g3-pending/EXPECT.txt315 B
- 参考文档tests/fixtures/check-game-app-complete/bad-complete-ads-off-g3-pending/mutation.json1.1 KB
- 参考文档tests/fixtures/check-game-app-complete/bad-complete-owner-placeholders-only/EXPECT.txt871 B
- 参考文档tests/fixtures/check-game-app-complete/bad-complete-owner-placeholders-only/mutation.json1.0 KB
- 参考文档tests/fixtures/check-game-app-complete/bad-config-contract/EXPECT.txt79 B
- 参考文档tests/fixtures/check-game-app-complete/bad-config-contract/mutation.json113 B
- 参考文档tests/fixtures/check-game-app-complete/bad-continue-without-rule/EXPECT.txt66 B
- 参考文档tests/fixtures/check-game-app-complete/bad-continue-without-rule/mutation.json194 B
- 参考文档tests/fixtures/check-game-app-complete/bad-entry-logic/EXPECT.txt67 B
- 参考文档tests/fixtures/check-game-app-complete/bad-entry-logic/mutation.json193 B
- 参考文档tests/fixtures/check-game-app-complete/bad-key-missing/EXPECT.txt53 B
- 参考文档tests/fixtures/check-game-app-complete/bad-key-missing/mutation.json181 B
- 参考文档tests/fixtures/check-game-app-complete/bad-missing-board/EXPECT.txt71 B
- 参考文档tests/fixtures/check-game-app-complete/bad-missing-board/mutation.json58 B
- 参考文档tests/fixtures/check-game-app-complete/bad-no-sims/EXPECT.txt47 B
- 参考文档tests/fixtures/check-game-app-complete/bad-no-sims/mutation.json39 B
- 参考文档tests/fixtures/check-game-app-complete/bad-pan-mode/EXPECT.txt86 B
- 参考文档tests/fixtures/check-game-app-complete/bad-pan-mode/mutation.json123 B
- 参考文档tests/fixtures/check-game-app-complete/bad-parity-facts-hints/EXPECT.txt117 B
- 参考文档tests/fixtures/check-game-app-complete/bad-parity-facts-hints/mutation.json115 B
- 参考文档tests/fixtures/check-game-app-complete/bad-parity-facts-missing/EXPECT.txt136 B
- 参考文档tests/fixtures/check-game-app-complete/bad-parity-facts-missing/mutation.json235 B
- 参考文档tests/fixtures/check-game-app-complete/bad-placeholder-entry/EXPECT.txt66 B
- 参考文档tests/fixtures/check-game-app-complete/bad-placeholder-entry/mutation.json253 B
- 参考文档tests/fixtures/check-game-app-complete/bad-privacy-example-host/EXPECT.txt252 B
- 参考文档tests/fixtures/check-game-app-complete/bad-privacy-example-host/mutation.json283 B
- 参考文档tests/fixtures/check-game-app-complete/bad-sample-ad-ids-complete/EXPECT.txt295 B
- 参考文档tests/fixtures/check-game-app-complete/bad-sample-ad-ids-complete/mutation.json371 B
- 参考文档tests/fixtures/check-game-app-complete/bad-shell-slice/EXPECT.txt51 B
- 参考文档tests/fixtures/check-game-app-complete/bad-shell-slice/mutation.json146 B
- 参考文档tests/fixtures/check-game-app-complete/bad-tagline/EXPECT.txt94 B
- 参考文档tests/fixtures/check-game-app-complete/bad-tagline/mutation.json117 B
- 参考文档tests/fixtures/check-game-app-complete/bad-types-bag/EXPECT.txt24 B
- 参考文档tests/fixtures/check-game-app-complete/bad-types-bag/mutation.json119 B
- 参考文档tests/fixtures/check-game-app-complete/bad-win-title/EXPECT.txt97 B
- 参考文档tests/fixtures/check-game-app-complete/bad-win-title/mutation.json120 B
- 参考文档tests/fixtures/check-game-app-complete/base/apps/flock-tilt/e2e/flows/smoke/10-level-1.yaml116 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/game.config.ts2.3 KB
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/index.ts164 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/art/game-art.ts75 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/art/logo-art.ts75 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/board-palettes.ts83 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/build-timeline.ts83 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/draw-board.ts79 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/flock-tilt-board.ts85 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/layout-board.ts81 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/board/to-view.ts76 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/contract.test.ts76 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/flock-tilt-types.ts252 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/index.ts1000 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/levels/flock-tilt-levels.ts276 B
- 参考文档tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/levels/pack-1.json3 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/parity-game-facts.test.ts218 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/apply-move.ts79 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/create.ts75 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/flock-tilt-engine.ts364 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/flock-tilt-persistence.ts91 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/flock-tilt-stats.ts85 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/flock-tilt-types.ts85 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/intent-to-move.ts83 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/list-moves.ts79 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/rules/outcome.ts76 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/sounds/sound-bank.ts80 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/testing/flock-tilt-testing.ts89 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/theme/palette.ts76 B
- 脚本tests/fixtures/check-game-app-complete/base/apps/flock-tilt/src/tutorial/flock-tilt-teaching.ts91 B
- 参考文档tests/fixtures/check-game-app-complete/base/parity/game-facts.json171 B
- 脚本tests/fixtures/check-game-app-complete/base/test/goldens/boards/flock-tilt-board.golden.test.ts91 B
- 脚本tests/fixtures/check-game-app-complete/base/test/sims/flock-tilt/balance.sim.test.ts80 B
- 参考文档tests/fixtures/check-game-app-pilot/bad-old-march-text/EXPECT.txt515 B
- 参考文档tests/fixtures/check-game-app-pilot/bad-old-march-text/mutation.json409 B
- 参考文档tests/fixtures/check-game-app-pilot/bad-retired-lose-key/EXPECT.txt121 B
- 参考文档tests/fixtures/check-game-app-pilot/bad-retired-lose-key/mutation.json251 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-app-config/EXPECT.txt13 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-app-config/mutation.json207 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-bundle-id/EXPECT.txt63 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-bundle-id/mutation.json143 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-bundle-not-applander/EXPECT.txt154 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-bundle-not-applander/mutation.json160 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-catalog-keys/EXPECT.txt48 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-catalog-keys/mutation.json174 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-deck-text/EXPECT.txt222 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-deck-text/mutation.json155 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-deps/EXPECT.txt70 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-deps/mutation.json127 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-font/EXPECT.txt52 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-font/mutation.json100 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-metro-cache/EXPECT.txt14 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-metro-cache/mutation.json174 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-missing-catalog/EXPECT.txt53 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-missing-catalog/mutation.json52 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-new-game-script/EXPECT.txt90 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-new-game-script/mutation.json247 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-placeholder-beside-pods/EXPECT.txt164 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-placeholder-beside-pods/mutation.json208 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-placeholder/EXPECT.txt31 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-placeholder/mutation.json139 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-premium-id-prefix/EXPECT.txt101 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-premium-id-prefix/mutation.json173 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-privacy-url/EXPECT.txt34 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-privacy-url/mutation.json132 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-template-key-missing/EXPECT.txt119 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-template-key-missing/mutation.json301 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-type-field/EXPECT.txt41 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-type-field/mutation.json145 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-wrong-id/EXPECT.txt59 B
- 参考文档tests/fixtures/check-game-app-scaffold/bad-wrong-id/mutation.json115 B
- 参考文档tests/fixtures/check-game-app-template-keys/bad-wrong-lose-slug/EXPECT.txt83 B
- 参考文档tests/fixtures/check-game-app-template-keys/bad-wrong-lose-slug/mutation.json156 B
- 参考文档tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/alpha/package.json151 B
- 参考文档tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/beta/package.json150 B
- 脚本tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/line-siege/app.config.ts194 B
- 脚本tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/line-siege/game.config.ts2.1 KB
- 脚本tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/line-siege/index.ts519 B
- 脚本tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/apps/line-siege/tsconfig.json331 B
- 参考文档tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/EXPECT.txt65 B
- 参考文档tests/fixtures/scaffold-game-add-missing/bad-deps-lockstep/package.json87 B
- 脚本tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/app.config.ts194 B
- 脚本tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/game.config.ts2.1 KB
- 脚本tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/index.ts519 B
- 脚本tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/package.json462 B
- 参考文档tests/fixtures/scaffold-game-add-missing/good/apps/line-siege/tsconfig.json331 B
- 参考文档tests/fixtures/scaffold-game-add-missing/good/package.json87 B
- 脚本tests/fixtures/scaffold-game/bad-conflict/apps/flock-tilt/game.config.ts86 B
- 参考文档tests/fixtures/scaffold-game/bad-conflict/apps/line-siege/package.json280 B
- 参考文档tests/fixtures/scaffold-game/bad-conflict/EXPECT.txt42 B
- 参考文档tests/fixtures/scaffold-game/bad-conflict/package.json87 B
- 参考文档tests/fixtures/scaffold-game/bad-not-lockstep/apps/line-siege/package.json280 B
- 参考文档tests/fixtures/scaffold-game/bad-not-lockstep/apps/tap-flip/package.json278 B
- 参考文档tests/fixtures/scaffold-game/bad-not-lockstep/EXPECT.txt70 B
- 参考文档tests/fixtures/scaffold-game/bad-not-lockstep/package.json87 B
- 参考文档tests/fixtures/scaffold-game/error-bundle-id-override/ARGS.txt89 B
- 参考文档tests/fixtures/scaffold-game/error-bundle-id-override/EXPECT.txt138 B
- 参考文档tests/fixtures/scaffold-game/good/apps/line-siege/package.json280 B
- 参考文档tests/fixtures/scaffold-game/good/package.json87 B
03 SKILL.md 正文
New game scaffold
Turns "the owner picked the next game" into apps/<game-id>/: a verified Expo SDK 57 app skeleton on the one Shell, written by a script from templates, with the configuration, fonts and catalogs every game needs; then walks the game through the build order and proves, with a second script, that the finished app is complete.
Rules that must hold
- Create the app with
scaffold-game.mjs, never by copying another game's folder. Why: a copied app carries the other game's ids, catalogs and dependency drift; the script fills every id form and refuses to overwrite. - One game = one app = one
apps/<game-id>/, and the game id (kebab-case, from the catalogue) is the folder, the package@e07/<game-id>,GameConfig.id,identity.id, the save'sgameIdand the catalog key prefix. Why: spec N4; the id is inside every save and never changes after release. - Every per-game store and runtime setting lives in
game.config.ts(spec 11), read only byapp.config.ts; app code never imports it, and nothing in it becomesnullinexpo.extra. Its settings follow the game's rules, never a default:hints.freePerDayfrom--hints none|solver(0 or 1),isContinueAllowedfrom--continue once|none,modes.endlessequal to the levels spec's endless kind, and the violence answer from--violence-rating(defaultNONE; the owner confirms it at step G1). What the game's code decides (the board'spanMode, the win title key, the logo) lives in the GameModule instead. Why: one file per game; a config that promises a hint or a continue the rules lack breaks the contract;nullarrived as{}on the device and broke a strict parser. app.config.tsis the one statementexport default withShell(gameConfig, process.env);with.tsimport extensions. Why: every native setting comes from the Shell's composer and plugins (continuous native generation); Node's type stripping needs the extensions.- The app's dependencies are exactly the other apps' dependencies (same packages, same versions; the scaffold copies the newest app's list, never the versions table). Why: native modules autolink per app and
expo install --checksees only an app's own list; a drift crashes or builds a different app, and knip fails on a package nothing imports. metro.config.jskeys the cache onEXPO_PUBLIC_APP_VARIANT. Why: without it a store build reused test-build transforms and shipped the debug menu (verified).- Bundle the five Toybox fonts and three OFL texts byte for byte, and keep four flat, sorted catalogs with identical keys, every key starting with
<game-id>., one<game-id>.lose.<reason>key per way of losing, every key the copied templates use, and, for a game in the copy deck, the deck's words. Why: the look, the licence list and RTL text depend on the exact files; a missing key breaks a translated screen and the contract test; the deck is the design's copy and changes (the Line Siege march text did on 2026-09-30). - The app ids are fixed; the store records, the AdMob ids and the privacy link are the owner's. Every app's iOS bundle id and Android package is
io.applander.<game id without hyphens>, all lowercase (io.applander.linesiege), and Premium is<bundle id>.premium(owner decision O4); the scaffold always writes them and has no option to change them. The owner names the app (G1), creates the record (G2), gives the privacy-policy host and support address (G3) and the AdMob ids (G5); until then the scaffold's documented placeholders stay.--stage completefails on every one of them (lead decision L14): oneowner-placeholderline per placeholder, naming the field, the placeholder and its owner step (G5: the AdMob app id and its three units; G3:example.comandsupport@example.com), thenOWNER STEPS PENDING: G3, G5(only the steps still pending) right beforeRESULT: FAIL. No option turns a placeholder into a pass, and the list is the one the ship gates refuse (scripts/lib/ship-placeholders.mjs, re-exported byapp-files.mjs). Why: they are outward-facing, account-bound values; a placeholder in a store build ships ads nobody is paid for or a dead privacy link. - Never overwrite an existing app.
--writecreates a new app and refuses on any conflict; an app that exists (the bootstrap's pilot) is completed with--add-missing, which writes only absent files. Why: the pilot and a grown app hold the owner's decisions. - Build the game in the documented order and finish with
check-game-app.mjs . --stage complete. Why: each layer is tested before anything depends on it, and the owner never reads code; the check proves nothing is missing.
Workflow
- Before code. Read references/new-game-checklist.md ("Before code"). Confirm with the owner: the game, modes, pack layout, star rule, difficulty bands, the input (taps, swipes, drags or aim: the engine's
panMode), and the app name (G1; the bundle id is fixed). Send the per-game requests in one message shaped like examples/owner-request.md; continue with placeholders meanwhile. - Plan the app. Read references/ids-and-names.md. Once per repo: the monorepo bootstrap already writes
packages/tooling/src/scaffold/new-game.ts(the rootnew-gamenpm script runs it); only if it is missing (an older repo), copytemplates/tooling/new-game.tsthere; it forwardsnpm run new-game -- <args>to this skill's generator. From the repo root runnode ${CLAUDE_SKILL_DIR}/scripts/scaffold-game.mjs --app <game-id> --name "<Name>" --hints none|solver --continue once|none(add--lose-reason <slug>,--endless,--no-daily,--violence-rating,--name-fa,--name-ckbas agreed; a game in the copy deck takes its names, texts, lose slug and modes from it). Read the plan (compare examples/flock-tilt/scaffold-plan.txt); adeps-lockstepfailure is fixed first with the dependency-management skill, aconflictby hand. The pilotline-siegealready exists after the bootstrap: never--writeit;--add-missingcompletes it if a file is missing. - Write it: the same command with
--write, thennpm install(links@e07/<game-id>, updatespackage-lock.json). Note the printed daily-salt suggestion for the levels step. - Check the skeleton. Read references/app-files.md if anything fails. Run
node ${CLAUDE_SKILL_DIR}/scripts/check-game-app.mjs . --app <game-id> --stage scaffolduntilRESULT: PASS, thennpx expo config --jsoninapps/<game-id>for test/test, test/off and store/off,npx tsc --noEmit -p apps/<game-id>,npx eslint --max-warnings 0 apps/<game-id>andnpm run -s check:fast. Commitfeat(<game-id>): scaffold the app. - Build the game in order (the table in the checklist): rules (game-rules-engine), bots and sims (game-balance-and-bots), levels (level-generation-and-solvers), persistence, board and input (board-rendering-skia, board-gestures-and-input), palette (toybox-design-system), teaching, counters and texts, art and sounds, then the assembly and the 3-line
index.ts(game-host-integration), the game'sparity/game-facts.jsonentry (designGame,hasMusic,winLine,hasHints) with its pin test before the Shell frames (toybox-visual-parity), E2E flows and screenshot parity, audits. Each step test-first, each with its own skill's check. - Prove it complete:
node ${CLAUDE_SKILL_DIR}/scripts/check-game-app.mjs . --app <game-id>(stage complete; it also fails whileshell-slice.jsonexists, because a partial Shell never ships; for the pilot this is Shell step 12, after the scaffold stage passed at step 1). Eachmodule-part-missingorevidence-missingline names the skill that builds the part; fix and rerun until it printsRESULT: PASS, thennpm run verify. Until the owner supplies G3 and G5 the run ends with exactly theowner-placeholderlines (four AdMob ids, the privacy host, the support address),OWNER STEPS PENDING: G3, G5andRESULT: FAIL (6 problems): that is the finished state before the owner's steps (with ads off, only the two G3 lines andOWNER STEPS PENDING: G3). Any other FAIL line is a real problem to fix. - Report and hand over: outcome in players' words, the owner steps still open (G1-G8) with the placeholder each one replaces, the owner steps that never block (the native review of fa and ckb texts, the play-test, listening to the sound previews), what could not be verified (sound, haptics, 120 Hz, purchases need a device or TestFlight). A game handed over before G3 and G5 ends with a slice report (git-commits-and-reporting,
--kind slice): G3 and G5 under "Owner steps (not blocking)", citing theOWNER STEPS PENDINGline; the release report follows the first upload. Release only after the owner's blocking steps (ios-release-testflight); uploads and pushes are outward-facing, ask first. - Android, once the game's iOS version has shipped: port it in the Android order (Android steps 1-8: tooling and the Android Jest project; configuration and art; services; platform behaviour; first builds, audits and the kill test; screens on the Android profile; E2E and the screenshot matrix; release tooling and internal testing), read the checklist's Android section.
--stage completestays the iOS check (ads.ids.android: nullpasses); the Android gates own GP5.
Definition of done
- [ ]
apps/<game-id>/was written byscaffold-game.mjswith the game's--hintsand--continue, andcheck-game-app.mjs . --app <game-id> --stage scaffoldpassed before any game code. - [ ]
npx expo config --jsonworks in the app for test/test, test/off and store/off;npx tsc --noEmit -p apps/<game-id>andnpx eslint --max-warnings 0 apps/<game-id>pass. - [ ] Every module part, the assembly, the 3-line entry, catalog keys, the config contract, board goldens, bot sims and E2E flows exist (stage complete), and
npm run verifyis green. - [ ] The bundle id is
io.applander.<game id without hyphens>and Premium<bundle id>.premium; the owner's steps are listed in the report with the placeholder that applies until each is done. Until the owner supplies G3 and G5, the complete stage ends with exactly the sixowner-placeholderlines,OWNER STEPS PENDING: G3, G5andRESULT: FAIL (6 problems), by design (L14); the report lists G3 and G5 as owner steps. - [ ] The game's
parity/game-facts.jsonentry (designGame,hasMusic,winLine,hasHints) and its parity pin test exist before the Shell frames are compared. - [ ]
node ${CLAUDE_SKILL_DIR}/scripts/check-game-app.mjs . --app <game-id>printsRESULT: PASS
Anti-patterns
cp -R apps/line-siege apps/new-gameand search-and-replace. Old ids, texts and art survive in corners; scaffold instead.create-expo-appfor a new game. It brings Expo Router, web dependencies and route files; the scaffold's skeleton already holds everything.- Installing a package in the new app only. Every app lists the same set; install in all apps together or not at all.
- Importing
game.config.tsfromsrc/. Runtime values arrive throughexpo.extra.game(readGameExtra); the config file is for the composer. - Editing
ios/orandroid/. They are regenerated by prebuild; changegame.config.ts,withShellor a config plugin. - Choosing another bundle id (
com.<company>.<id>, a hyphen, capitals, a--bundle-idoption): every app isio.applander.<game id without hyphens>;check-game-app.mjsfails anything else at every stage (bundle-id,premium-id). - Inventing AdMob ids or a privacy link "for now" that look real, or calling the owner-placeholder FAIL a pass. Keep the documented placeholders until the owner's steps G5 and G3 (Google's sample test ids are no stand-in: they fail as
owner-placeholdertoo);--stage completenames each one (owner-placeholder) and endsOWNER STEPS PENDING: G3, G5withRESULT: FAIL. Report it as pending owner steps, never as a passed gate. - Switching
index.tsto the 3-line entry beforesrc/index.tsexists. The app stops type-checking; switch at assembly. - Moving files aside so
--writeworks on an existing app. Use--add-missing; it never overwrites and lists what it kept. - Accepting
hints.freePerDay: 1or a continue the rules do not have. Pass--hintsand--continuefrom the design notes;--stage completefails a continue withoutrules.continueRun. - Writing
<id>.lose-reasonor<id>.result.*keys. They are retired; each loss has<id>.lose.<reason>. - Treating
--stage scaffoldpassing as done. It proves the skeleton only; the game is done at--stage complete.
Files in this skill
| File | What it is | Read/run when |
|---|---|---|
| references/new-game-checklist.md | Before code, scaffold commands, the build order with skills and proofs, completion, owner steps, release, the Android order once the iOS version has shipped | Workflow steps 1, 5, 6 and 8 |
| references/app-files.md | Every generated file and why; game.config.ts field by field; catalogs and copy-deck keys; later src/ folders |
Step 4, or when a check names a file |
| references/ids-and-names.md | The game id's forms, owner-approved ids, placeholders, ids inside the game, outside names | Step 2 |
templates/app/ |
The app skeleton with __GAME_ID__, __BUNDLE_ID__, __NAME_EN__ and the settings placeholders (__MODE_DAILY__, __MODE_ENDLESS__, __HINTS_FREE_PER_DAY__, __IS_CONTINUE_ALLOWED__, __VIOLENCE_RATING__); dot-gitignore becomes .gitignore. package.json (the minimal first-app set), game.config.ts, index.ts (the placeholder), .gitignore, tsconfig.json, metro.config.js and app.config.ts are synced from the library, the same bytes the monorepo bootstrap writes for the pilot (do not edit them here) |
Read when resolving a conflict; the script writes it |
templates/app/src/i18n/ |
The template catalogs for a game outside the copy deck: every key the Tap Flip templates of the game skills use, in en, de, fa and ckb, with __GAME_ID__ and __LOSE_SLUG__ |
The script fills them; replace the texts with the game's own |
templates/tooling/new-game.ts |
packages/tooling/src/scaffold/new-game.ts: the root npm run new-game forwards to scaffold-game.mjs (synced from the library; do not edit here) |
Step 2, once per repo |
| examples/owner-request.md | The one message asking the owner for G1 to G5 with defaults | Step 1 |
examples/flock-tilt/ |
scaffold-plan.txt (a dry run with --hints solver --continue once), the generated game.config.ts and en.json from the copy deck (lose key flock-tilt.lose.wolf-got-sheep) |
Steps 2 and 4 |
scripts/scaffold-game.mjs |
Generator: plan (default), --write (a new app) or --add-missing (only the absent files of an existing app); --hints, --continue, --lose-reason, --violence-rating; the fixed io.applander.<id> bundle id (a --bundle-id with another value stops with exit 2); lockstep dependencies, catalogs, fonts; never overwrites |
Steps 2 and 3 |
scripts/check-game-app.mjs |
Checker: --stage scaffold (skeleton, the root new-game script's file, every key the copied templates use, the copy deck's words for a deck game (deck-text), placeholders outside ios/, build/, out/ and Pods) or complete (every part, assembly and identity, the engine's panMode, entry, keys, config contract, evidence, no shell-slice.json, every owner placeholder by name with its field and owner step (owner-placeholder, then OWNER STEPS PENDING: G3, G5 before the RESULT line), the parity/game-facts.json entry (parity-game-facts)); both stages require the fixed bundle and Premium ids (bundle-id, premium-id) |
Steps 4 and 6, and at the end |
scripts/lib/ |
app-plan.mjs (the file plan), app-checks.mjs (the checks), app-modules.mjs (loads TypeScript), ts-scan.mjs, assemble-fixtures.mjs, app-files.mjs (the per-app renderer shared with the monorepo bootstrap: pilot settings, game.config.ts rendering, catalogs, lose slugs; it re-exports PLACEHOLDERS) and ship-placeholders.mjs (the one placeholder list with each value's field and owner step, the owner-placeholder problem and the OWNER STEPS PENDING line, shared with the ship gates); both synced from the library, do not edit here |
When changing a script |
scripts/selftest.mjs |
Proves both scripts: the generator's plan, conflicts and --add-missing on a pilot (3 planted bugs and a --bundle-id override that stops with exit 2), and the checker on freshly scaffolded apps next to Pods and build noise, the completed pilot and a game outside the deck (40 planted bugs, among them a placeholder beside Pods, a missing template key, a retired lose key, a changed deck text, the pilot's old march text, a shell-slice.json, a bundle id outside io.applander, a Premium id with another prefix, the AdMob and privacy-link placeholders at the complete stage, an app whose only problems are the six owner placeholders (bad-complete-owner-placeholders-only: the six lines and OWNER STEPS PENDING: G3, G5), the same app with ads off (bad-complete-ads-off-g3-pending: the two G3 lines and OWNER STEPS PENDING: G3) and a parity/game-facts.json entry without hasHints); it also proves PLACEHOLDERS is the shared ship-gate list and pins its values, fields and owner steps |
After changing a script or a template |
scripts/check-lib.mjs |
Shared script helper, synced from the library (do not edit here) | Never by hand |
assets/fonts/ |
LilitaOne, Rubik, Vazirmatn TTFs, OFL texts, SOURCES.md (synced from the library) | The script copies them |
assets/copy-deck.json |
The copy deck: game names, texts, pack names, modes (synced from the library) | The script reads it |
assets/line-siege-i18n/ |
The canonical Line Siege catalogs en.json, de.json, fa.json, ckb.json (synced from the library) |
The script copies them for the pilot |
assets/shared.json |
Declares the shared files this skill copies in | When adding a shared file |
tests/fixtures/ |
scaffold-game/ and scaffold-game-add-missing/ repos, check-game-app-scaffold/bad-*, check-game-app-complete/ (base stubs and bad-*), check-game-app-pilot/ and check-game-app-template-keys/ |
When adding a rule |
Related skills
monorepo-bootstrap- the repo, the Shell packages and the pilot app before any second game.game-rules-engine- the rules, persistence, counters and bot of the new game.level-generation-and-solvers- solver, level plan, packs and the daily level.game-host-integration-src/index.ts, the types bag, teaching, the contract test and the 3-line entry.board-rendering-skiaandboard-gestures-and-input- the board and its input.toybox-design-system- the game's palette and fonts.i18n-strings-and-catalogs- writing and translating the game's texts.dependency-management- keeping every app's dependencies in lockstep.ios-release-testflight- the owner steps and the first TestFlight build.
04 同仓库更多 Skills
unit-and-component-tests
Sets up Jest and writes Pocket Arcade test code - three projects, RNTL 14 async via renderWithShell, root SDK mocks, fakes, fast-check, coverage, Stryker. Use when a test needs the Shell wrapper, a mock or a fake, or Jest fails. Not for the red-green loop (tdd-workflow) or goldens (golden-tests).
typescript-and-lint-rules
Enforces Pocket Arcade's strict TypeScript 6 tsconfigs, ESLint 9 flat config, Prettier and size limits. Use when writing or splitting .ts/.tsx or fixing a tsc or lint error. Not for gate wiring (quality-gates), names (naming-conventions) or import zones (architecture-and-boundaries).
demo-skill
Builds a demo. Use when testing the pitfall checker.
demo-skill
Builds a demo. Use when testing the pitfall checker.
troubleshooting-playbook
Diagnoses and fixes Pocket Arcade failures with a catalogue of 300+ known ones (symptom, cause, fix). Use when something errors, crashes, hangs or renders wrong, or an error or log needs explaining. Not for gate setup (quality-gates) or running builds (ios-simulator-build, ios-release-testflight).
toybox-visual-parity
Proves a built Pocket Arcade screen matches its Toybox design screenshot (light/dark, en/fa) and drives the fixes: capture, element gates, sheets, sign-off. Use when any screen is built or changed, or for visual parity, design match, screenshot compare. Not for building screens (toybox-screens).