Phaser3 scene debug console
Skill bokuwalily/claude-code-skills/skills/phaser3-scene-debug-console
75 battle-tested Claude Code skills from shipping 20+ apps solo — macOS, Next.js, Vercel, iOS/Expo, Cloudflare, Phaser, local AI media & more
npx -y skills add bokuwalily/claude-code-skills --skill phaser3-scene-debug-consoleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Phaser3ゲームのシーンをwindowに公開し、ブラウザコンソールから決定論的にゲームロジックをテストしたいとき
SKILL.md
2.0 KB, 587 tokens by cl100k_base, as published. Nobody here has run it
Procedure
-
GameScene の
create()または適当な初期化箇所に1行追加してシーンを公開する// GameScene.ts の create() 末尾 (window as any).scene = this; -
devサーバーを起動する(HMRが有効なので保存後に自動反映)
npm run dev -
ブラウザのコンソールで任意のゲームロジックを呼び出して検証する
// スライムのHP・ダメージ・討伐カウントを確認 const slimes = window.scene.slimes; console.log('alive slimes:', slimes.filter(s => s.hp > 0).length); // プレイヤーが特定のモンスターを攻撃 const target = slimes[0]; window.scene.player.attack(target); console.log('slime hp after hit:', target.hp); // XP・レベルアップを強制検証 window.scene.player.gainXP(999); console.log('level:', window.scene.player.level); -
検証が完了したら本番ビルドでは window 公開行を削除する
grep -rn "window as any" src/
Pitfalls
(window as any)はTypeScriptの型チェックを回避するため、本番コードに残さないこと- HMRが効いているので変更後はページリロード不要だが、シーンの再初期化が走る場合はゲーム状態がリセットされることがある
- ブラウザの
devtoolsで console を開いたまま操作すると、キーイベントがゲームに届かないことがある(focus()を確認)
Verification
// コンソールで動作確認
typeof window.scene !== 'undefined' // → true であれば公開成功
window.scene.constructor.name // → "GameScene" 等のクラス名が返る
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.