web-game-performance-and-testing

web-game-performance-and-testing is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 87 tokens per session (1,861 once invoked), scanned A, original, Apache-2.0.

Browser-game guidance for keeping the game loop stable, measuring performance, limiting downloads and memory use, and testing game rules and browser behaviour.

In plain words
What is it for?
Use it when building or testing games made with Phaser, PixiJS, three.js, Babylon.js, PlayCanvas, Excalibur, or KAPLAY.
Why use it?
It helps avoid frame-rate drops, large builds, timing-dependent tests, and failures that only appear in a real browser.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building or testing games made with Phaser, PixiJS, three.js, Babylon.js, PlayCanvas, Excalibur, or KAPLAY.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/web-game-performance-and-testing
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 makifbaysal/tasktrooper --skill web-game-performance-and-testing
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

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 web-game-performance-and-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/web-game-performance-and-testing/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/web-game-performance-and-testing)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/web-game-performance-and-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/web-game-performance-and-testing/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 web-game-performance-and-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/web-game-performance-and-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/web-game-performance-and-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,861 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.00087 $0.01861
Opus 5.5 $0.00035 $0.00744
Sonnet 5.5 $0.00017 $0.00372
Haiku 4.5 $0.00009 $0.00186

Measured 4d ago against content hash 7ee305cf2dbc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

web-game-performance-and-testing 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 4d 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.

catalog/agents/game-developer/skills/web-game-performance-and-testing/SKILL.md · 138 lines

How it starts

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

Web Game Performance and Testing

Overview

A browser game shares a thread with the page, a garbage collector with every closure, and a download budget with the player's patience. It is also the easiest kind of game for you to verify end to end on this machine: the build, the unit tests and a real browser run are all available. Use them.

Core principle: No allocations in the frame loop, a measured bundle, rules tested in Vitest with injected time and a seed, and one seeded Playwright smoke test that fails on console errors.

The frame loop in the browser

  • Drive it with requestAnimationFrame (or the engine's loop built on it); never setInterval.
  • Browsers throttle or stop rAF in hidden tabs: clamp the delta (≤ 0.25 s), pause the simulation on document.visibilitychange, and resume without a catch-up burst.
  • Fixed-step simulation with an accumulator and interpolated rendering (game-loop-and-time); engines with built-in physics steps (Phaser Arcade) already do this for bodies.
  • Audio needs a user gesture: create or resume() the AudioContext on the first click/key/tap.
  • On touch devices the canvas sets touch-action: none so gestures do not scroll or zoom the page.

No garbage in the loop

// ❌ allocates every frame: new vectors, arrays, closures
function update(dt: number) {
  const dir = new THREE.Vector3().subVectors(target.position, enemy.position).normalize();
  enemies.filter((e) => e.alive).forEach((e) => e.step(dt));
  hud.setText(`Score: ${score}`);
}

// ✅ reuses module-level temporaries; plain loops; updates text only on change
const tmp = new THREE.Vector3();
let shownScore = -1;
function update(dt: number) {
  tmp.subVectors(target.position, enemy.position).normalize();
  for (let i = 0; i < enemies.length; i++) if (enemies[i].alive) enemies[i].step(dt);
  if (score !== shownScore) { shownScore = score; hud.setText(`Score: ${score}`); }
}

Pool bullets, particles and damage numbers; prefer typed arrays (Float32Array) for large particle or boid sets; avoid Array.prototype.map/filter/forEach with fresh closures in hot paths.

Read the full file on GitHub · 138 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. 4d ago First seen · 138 lines · 87 tokens per session scan A 7ee305cf2dbc

Subscribe to this mod's changes

web-game-performance-and-testing is a skill published in the GitHub repository makifbaysal/tasktrooper (112 stars, last pushed yesterday), licensed Apache-2.0. It adds 87 tokens to every session and 1,861 once invoked, about $0.0003 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-10-09.