phaser-2d-game

phaser-2d-game is a skill for Codex from fanfan-de/anybox. It costs 48 tokens per session (679 once invoked), scanned A, original, MIT.

A development guide for making two-dimensional browser games with Phaser, TypeScript, and Vite. Phaser is a game framework that handles drawing, timing, sprites, cameras, and game scenes.

In plain words
What is it for?
Use it to build browser-game scenes, movement and combat systems, sprite animation, cameras, effects, and HTML-based game interfaces.
Why use it?
It gives the game a clear separation between gameplay rules and what is displayed on screen. This makes scenes easier to replace and keeps game state from being scattered through display code.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to build browser-game scenes, movement and combat systems, sprite animation, cameras, effects, and HTML-based game interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fanfan-de/anybox/phaser-2d-game
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fanfan-de/anybox --skill phaser-2d-game
Clone the repo
git clone --depth 1 https://github.com/fanfan-de/anybox

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phaser-2d-game

README.md
[![agentmods](https://agentmods.dev/badge/skills/fanfan-de/anybox/phaser-2d-game/github.svg)](https://agentmods.dev/skills/fanfan-de/anybox/phaser-2d-game)
Your own site
<a href="https://agentmods.dev/skills/fanfan-de/anybox/phaser-2d-game"><img src="https://agentmods.dev/badge/skills/fanfan-de/anybox/phaser-2d-game/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for phaser-2d-game

Your own site · 80×15
<a href="https://agentmods.dev/skills/fanfan-de/anybox/phaser-2d-game"><img src="https://agentmods.dev/badge/skills/fanfan-de/anybox/phaser-2d-game.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.00679
Opus 5 $0.00024 $0.00340
Sonnet 5 $0.00010 $0.00136
Haiku 4.5 $0.00005 $0.00068

Measured 6d ago against content hash f740df62cb4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

phaser-2d-game scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/Anybox-Plugins/game-studio/skills/phaser-2d-game/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Phaser 2D Game

Overview

Use this skill for the main execution path in this plugin. Phaser is the default stack for 2D browser games here because it handles rendering, timing, sprites, cameras, and scene orchestration well without forcing gameplay rules into the framework.

Preferred stack:

  • Phaser
  • TypeScript
  • Vite
  • DOM-based HUD or menus layered over the game canvas

Architecture

  1. Keep gameplay state outside Phaser scenes.
    • Systems own rules, turn order, movement, combat, inventory, objectives, and progression.
    • Phaser scenes adapt system state into sprites, camera motion, animation playback, and effects.
  2. Make scenes thin.
    • Boot and asset preload
    • Menu or shell scene
    • Gameplay scene
    • Optional overlay or debug scene
  3. Keep renderer-facing objects disposable.
    • Sprite containers, emitters, tweens, and camera rigs are view state, not source of truth.
  4. Favor stable asset manifest keys over direct file-path references throughout gameplay code.

Implementation Guidance

  • Use one integration boundary where the scene reads simulation state and emits input actions back.
  • Prefer deterministic system updates over scene-local mutation.
  • Treat HUD and menus as DOM when text, status density, or responsiveness matter.
  • Keep animation state derived from gameplay state rather than ad hoc sprite flags.

2D Modes Covered Well

  • Turn-based grids and tactics
  • Top-down exploration
  • Side-view action platformers
  • Character-action combat with sprite animation
  • Lightweight management or deck-driven battle scenes

Camera and Presentation

  • Choose the camera model early: locked, follow, room-based, or tactical-pan.
  • Keep camera logic separate from game rules.
  • Use restrained screen shake, hit-stop, and parallax. Effects should improve readability, not obscure it.

UI Integration

  • Use DOM overlays for HUD, command menus, settings, and narrative panels.
  • Keep the canvas responsible for the world, combat readability, and motion.
  • Avoid shoving dense text or complex settings UIs into Phaser unless the project explicitly needs an in-canvas presentation.

Read the full file on GitHub · 89 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 89 lines · 48 tokens per session scan A f740df62cb4c

Subscribe to this mod's changes

phaser-2d-game is a skill published in the GitHub repository fanfan-de/anybox (57 stars, last pushed 26d ago), licensed MIT. It adds 48 tokens to every session and 679 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

onejs-setup-and-overview

Use this skill whenever the user wants to build or set up user interface in a Unity project using OneJS, React, TypeScript, or JSX, e.g. 'add a main menu to my game', 'build a settings screen', 'make a HUD', 'set up OneJS', 'my OneJS panel is blank', 'the UI is not hot reloading'. Covers confirming OneJS is installed…

Singtaa/OneJS · 199 tokens

rpg-stat-catalyst

A core TypeScript library for RPG game mathematics. Handles attribute points, leveling curves, and stat derivation (HP, Dmg, etc.).

kennyzir/7deer_skills · 36 tokens

pixi-js

Expert guidance for Pixi.js game development with TypeScript, focusing on high-performance web and mobile games.

Mindrally/skills · 24 tokens

three-webgl-game

Implement browser-game runtimes with plain Three.js. Use when the user wants imperative scene control in TypeScript or Vite with GLB assets, loaders, physics, and low-level WebGL debugging.

openai/plugins · 45 tokens

pixi-vn-getting-started

Use when setting up a new or existing project on @drincs/pixi-vn, wiring the main.ts entry point, or calling the top-level Game API (Game.init, Game.start, Game.onEnd, Game.addOnError, Game.onNavigate, Game.clear) — this is the entry point every Pixi'VN project needs before touching canvas, narration, sound, storage…

DRincs-Productions/pixi-vn · 90 tokens

typescript-to-lua-guide

Use when editing TypeScript that compiles to Lua via TSTL 1.24+ (game scripting, Defold, embedded engines). Triggers on .ts files in game/scripting directories with TSTL config, and on prompts about LuaMultiReturn, namespaces, decorators, stable table layouts, or Lua interop boundaries, even when the user doesn't say…

xonovex/platform · 86 tokens