speckit.game-native-js

speckit.game-native-js is a skill for Claude Code, Codex from wedabro/bro-skills. It costs 54 tokens per session (1,100 once invoked), scanned A, original, MIT.

A guide for building browser games with JavaScript or TypeScript using engines and libraries such as Phaser, PixiJS, Three.js, or Babylon.js. It covers game loops, rendering, input, sound, and memory-conscious object reuse.

In plain words
What is it for?
Use it to create game initialization and scenes, fixed-timestep updates, object pools, canvas and page-based interfaces, sound systems, and support for touch, keyboard, and gamepad input.
Why use it?
Browser games need predictable updates, responsive controls, and careful handling of repeated objects to avoid uneven performance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to create game initialization and scenes, fixed-timestep updates, object pools, canvas and page-based interfaces, sound systems, and support for touch, keyboard, and gamepad input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wedabro/bro-skills/speckit.game-native-js
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 wedabro/bro-skills --skill speckit.game-native-js
Clone the repo
git clone --depth 1 https://github.com/wedabro/bro-skills

Made for: Claude Code, 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 speckit.game-native-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/wedabro/bro-skills/speckit.game-native-js/github.svg)](https://agentmods.dev/skills/wedabro/bro-skills/speckit.game-native-js)
Your own site
<a href="https://agentmods.dev/skills/wedabro/bro-skills/speckit.game-native-js"><img src="https://agentmods.dev/badge/skills/wedabro/bro-skills/speckit.game-native-js/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 speckit.game-native-js

Your own site · 80×15
<a href="https://agentmods.dev/skills/wedabro/bro-skills/speckit.game-native-js"><img src="https://agentmods.dev/badge/skills/wedabro/bro-skills/speckit.game-native-js.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,100 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.
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.00054 $0.01100
Opus 5.5 $0.00022 $0.00440
Sonnet 5.5 $0.00011 $0.00220
Haiku 4.5 $0.00005 $0.00110

Measured 1mo ago against content hash 31ddf007f437, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

speckit.game-native-js 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 1mo 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.

.agents/skills/speckit.game-native-js/SKILL.md · 65 lines

How it starts

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

Mission

Architect and build high-performance native JavaScript/TypeScript web games running at steady 60-144 FPS. Ensure instant loading (< 2s), zero Garbage Collection spikes via strict Object Pooling, data-driven game balance, hybrid Canvas + DOM HUD architectures, and multi-input responsiveness (touch, gamepad, keyboard).

Inputs and Outputs

  • Read .agents/specs/[feature]/spec.md, plan.md, tasks.md, target engine specs, core gameplay loop definitions, and asset balance configurations.
  • Produce core engine initialization and scene manager (src/game/), fixed timestep game loop with object pool managers (src/game/pools/), balance configuration files, hybrid canvas + DOM overlays, and multi-channel Web Audio manager.

Protocol

1. 60 FPS Fixed Game Loop & Timestep Management

  • Decoupled Physics & Render:
    • Physics/Game State MUST update in a fixed timestep FixedUpdate(fixedDelta) (e.g. 50Hz / 20ms or 60Hz / 16.6ms).
    • Rendering updates on every requestAnimationFrame(time) with state interpolation (lerp) to prevent jitter on high refresh rate monitors (120Hz/144Hz).
  • Delta-Time Clamping: Clamp maximum frame delta (e.g., Math.min(dt, 0.1)) to avoid physics tunneling or simulation explosions when tabs are backgrounded or during frame drops.

2. Zero-Allocation in Hot Loops (Anti-GC Stutter)

  • Object Pooling: Pre-allocate and reuse memory pools for all ephemeral entities:
    • Bullets / Projectiles
    • Particle Emitters / Explosions
    • Floating Damage Numbers / Combat Text
    • Enemies & Spawners Rule: NEVER call new Object(), new Array(), or allocate closures inside the main tick/update loop.
  • Texture Atlases & SpriteSheets: Combine individual sprites into unified texture atlases using TexturePacker to minimize WebGL batch draw calls.
  • Spatial Partitioning: Use Flat TypedArrays (Float32Array, Int32Array) with Grid or QuadTree indexing for broadphase collision detection.

3. Data-Driven Game Design & Balancing

  • Externalized Config: All gameplay parameters (HP, Speed, Cooldown, Damage, Drop rates, Wave progression) MUST be defined in src/config/balance/*.json or CSV files.
  • Type-Safe Validation: Validate balance JSON files at build time / game boot using Zod or TypeScript schemas to catch missing stats or type mismatches immediately.

Read the full file on GitHub · 65 lines

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. 1mo ago First seen · 65 lines · 54 tokens per session scan A 31ddf007f437

Subscribe to this mod's changes

speckit.game-native-js is a skill published in the GitHub repository wedabro/bro-skills (3 stars, last pushed 12d ago), licensed MIT. It adds 54 tokens to every session and 1,100 once invoked, about $0.0002 per session on Opus 5.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-14.