Borrowing it
Nothing to install: this file belongs to KilledByAPixel/LittleJS-AI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/KilledByAPixel/LittleJS-AI/main/AGENTS.mdgit clone --depth 1 https://github.com/KilledByAPixel/LittleJS-AIWrote 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.
[](https://agentmods.dev/instructions/killedbyapixel/littlejs-ai/agents-md)<a href="https://agentmods.dev/instructions/killedbyapixel/littlejs-ai/agents-md"><img src="https://agentmods.dev/badge/instructions/killedbyapixel/littlejs-ai/agents-md/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.
<a href="https://agentmods.dev/instructions/killedbyapixel/littlejs-ai/agents-md"><img src="https://agentmods.dev/badge/instructions/killedbyapixel/littlejs-ai/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05797 | $0.05797 |
| Opus 5.5 | $0.02319 | $0.02319 |
| Sonnet 5.5 | $0.01159 | $0.01159 |
| Haiku 4.5 | $0.00580 | $0.00580 |
Grade A, and why
LittleJS-AI AGENTS.md 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 3d 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.
This is a copy
100% identical to LittleJS-AI CLAUDE.md — 314 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a helpful assistant for building playable LittleJS games with Claude.
Core goals
- Turn a game idea into a working LittleJS game quickly.
- Keep scope right-sized: get a fun playable core loop first, then expand.
- Work in short iterations. After each step, suggest the next small step.
Project structure and workflow
- This repo is built for real games (medium and large), not just single-file prototypes.
- Each game lives in its own folder under
examples/. - The canonical starter is
examples/emptyGame/— copy it toexamples/<gameName>/for a new game. - Standard starter layout for a new game:
examples/<gameName>/index.htmlexamples/<gameName>/game.jsexamples/<gameName>/build.json(build config for the shared root build script; carried over from the starter)
- It is fine (and expected) to add more files for larger games, for example:
examples/<gameName>/constants.jsexamples/<gameName>/player.jsexamples/<gameName>/ui.js
- Prefer modular game code (multiple
.jsfiles) over one giant script block. - Use the global LittleJS API: load
../../dist/littlejs.jswith a classic<script>tag and call globals directly (engineInit,drawText,vec2, ...). Do NOT use ES-module imports or anLJS.prefix — the repo, all templates, and the zip build are global-style. - No bundler. To develop, just open
index.htmlin a browser (works fromfile://, no server).
Build (optional, for distributable single-file zips)
- Build tools (terser, bestzip) install ONCE at the repo root:
npm install. - Build a game from the repo root:
node build.mjs <gameName>(ornpm run build:emptyGame). - Build every game that has a
build.json:node build.mjs --all(ornpm run build:all). It continues past a game that fails and exits non-zero if any build failed. - The single root
build.mjsreadsexamples/<gameName>/build.json, prepends the engine release file automatically, concatenates the game's source files, minifies, inlines into oneindex.html, and zips it. Editbuild.jsonto add source/data files. Fields:sources(required, ordered),data(zipped alongside),name(zip name, defaults to folder),title(html title for the generated fallback page only, defaults to name),engine(override path orfalse),keepIntermediate(keepbuild/index.js). - The build keeps your game's own
index.html(custom CSS, meta tags, canvas markup, etc.) and only swaps the dev<script src>tags that load build inputs (the engine + yoursources) for the single inlined bundle. The dev page's own<title>is preserved; external/CDN scripts and inline<script>blocks are left untouched. Only when a game has noindex.htmldoes the build generate boilerplate (and use thetitlefield). datafiles are copied and zipped by basename, so you can list engine files from outside the game folder (e.g.../../dist/box2d.wasm.jsand../../dist/box2d.wasm.wasm) to ship them beside the page without minifying. In the built page, a local (non-URL)<script src>that is not a build input (e.g. the box2d loader) has its src rewritten to that basename; CDN/URL scripts are left as-is. The inlined bundle replaces the last build-input script tag so such a loader runs before the game.- Output (
build/,*.zip) is gitignored. Dev never requires the build — it is only for shipping.
Template selection for new games
- The default path for a real game is: copy
examples/emptyGame/toexamples/<gameName>/. - The
templates/*.htmlfiles are single-file feature references — copy patterns OUT of them into the folder game'sgame.js; do not base a new game's structure on a single-file template. - Use
templates/game.htmlfor the default non-physics scaffold (shapes, text, camera). - Use
templates/boardGame.htmlfor turn-based grid/board games. - Use
templates/platformerGame.htmlfor side-scrollers and platformers: a level built on aTileCollisionLayer, one-way platforms, aFollowCamerawith look-ahead and level bounds, andcameraShakeon hard landings. - Use
templates/box2dGame.htmlfor Box2D physics patterns;examples/box2dGame/is a ready-made Box2D example folder (copies box2d.wasm.js/.wasm viadata). - Use
examples/3dGame/for 3D games. It is the engine's own LittleJS 3D example (terrain, shadows, lights, sprites, particles, bloom, chase and free cameras) and the one 3D reference here; there is no single-file 3D template. - Use
templates/menuGame.htmlwhen the game needs title/pause/options UI. - Use
templates/textureGame.htmlfor procedural sprite-atlas workflows. - Use
templates/tweakableGame.htmlfor runtime tuning workflows (the engine's tweakables plugin). - Use
templates/uiGame.htmlwhen canvas UI widgets are required.
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.
- 3d ago Changed · +20 lines · +482 tokens per session 2c1554f254aa
- 28d ago Changed · +3 lines · +83 tokens per session 566c7e37031c
- 1mo ago Changed · +62 lines · +1,566 tokens per session 2d20358f7c1f
- 2mo ago First seen · 228 lines · 3,666 tokens per session scan A 69f97e351548
LittleJS-AI AGENTS.md is an instructions file published in the GitHub repository KilledByAPixel/LittleJS-AI (85 stars, last pushed 3d ago), licensed MIT. It adds 5,797 tokens to every session, about $0.0232 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to LittleJS-AI CLAUDE.md, differing in 314 lines, and is treated as a copy.
LittleJS-AI AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| LittleJS-AI AGENTS.mdKilledByAPixel/LittleJS-AI | Instructions file | 85 | 3d ago | MIT | A | 5,797 | Claude Code, Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |