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.svg" alt="Measured on agentmods" 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.03666 | $0.03666 |
| Opus 5 | $0.01833 | $0.01833 |
| Sonnet 5 | $0.00733 | $0.00733 |
| Haiku 4.5 | $0.00367 | $0.00367 |
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 yesterday.
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 — 229 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 — 228 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/box2dGame.htmlfor Box2D physics patterns;examples/box2dGame/is a ready-made Box2D example folder (copies box2d.wasm.js/.wasm viadata). - 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. - Use
templates/uiGame.htmlwhen canvas UI widgets are required. - Use
templates/threejsGame.htmlfor three.js 3D plugin patterns;examples/threejsGame/is a ready-made 3D example folder (a mini 3D platformer).
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.
- yesterday 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 (77 stars, last pushed 2d ago), licensed MIT. It adds 3,666 tokens to every session, about $0.0183 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to LittleJS-AI CLAUDE.md, differing in 229 lines, and is treated as a copy.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.