LittleJS-AI: Instructions file for Claude Code

AGENTS.md

LittleJS-AI AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from KilledByAPixel/LittleJS-AI. It costs 5,797 tokens per session, scanned A, a copy of LittleJS-AI CLAUDE.md, MIT.

Repository instructions for building playable games with the LittleJS JavaScript game framework. They describe the expected folder layout, starter project, modular files, and short development steps.

In plain words
What is it for?
Use them when creating or expanding a LittleJS game under the examples directory, including its JavaScript files, HTML entry point, and build configuration.
Why use it?
They give an agent project-specific rules instead of making it infer how games are organized in the repository. This helps keep new examples compatible with the shared build setup.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: ${CLAUDE_PLUGIN_ROOT} variable, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions Claude Code.

This is KilledByAPixel/LittleJS-AI's own configuration. It tells Claude Code, Codex and OpenCode how to work on LittleJS-AI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LittleJS-AI configures →

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/KilledByAPixel/LittleJS-AI/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/KilledByAPixel/LittleJS-AI

Made for: Claude Code, Codex, OpenCode.

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 LittleJS-AI AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/killedbyapixel/littlejs-ai/agents-md/github.svg)](https://agentmods.dev/instructions/killedbyapixel/littlejs-ai/agents-md)
Your own site
<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.

agentmods 80×15 button for LittleJS-AI AGENTS.md

Your own site · 80×15
<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>
Per session 5,797 This file is loaded in full into every session.
When invoked 5,797 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.05797 $0.05797
Opus 5.5 $0.02319 $0.02319
Sonnet 5.5 $0.01159 $0.01159
Haiku 4.5 $0.00580 $0.00580

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

Security

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.

Origin

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.

AGENTS.md · 313 lines

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 to examples/<gameName>/ for a new game.
  • Standard starter layout for a new game:
    • examples/<gameName>/index.html
    • examples/<gameName>/game.js
    • examples/<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.js
    • examples/<gameName>/player.js
    • examples/<gameName>/ui.js
  • Prefer modular game code (multiple .js files) over one giant script block.
  • Use the global LittleJS API: load ../../dist/littlejs.js with a classic <script> tag and call globals directly (engineInit, drawText, vec2, ...). Do NOT use ES-module imports or an LJS. prefix — the repo, all templates, and the zip build are global-style.
  • No bundler. To develop, just open index.html in a browser (works from file://, 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> (or npm run build:emptyGame).
  • Build every game that has a build.json: node build.mjs --all (or npm run build:all). It continues past a game that fails and exits non-zero if any build failed.
  • The single root build.mjs reads examples/<gameName>/build.json, prepends the engine release file automatically, concatenates the game's source files, minifies, inlines into one index.html, and zips it. Edit build.json to 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 or false), keepIntermediate (keep build/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 + your sources) 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 no index.html does the build generate boilerplate (and use the title field).
  • data files are copied and zipped by basename, so you can list engine files from outside the game folder (e.g. ../../dist/box2d.wasm.js and ../../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/ to examples/<gameName>/.
  • The templates/*.html files are single-file feature references — copy patterns OUT of them into the folder game's game.js; do not base a new game's structure on a single-file template.
  • Use templates/game.html for the default non-physics scaffold (shapes, text, camera).
  • Use templates/boardGame.html for turn-based grid/board games.
  • Use templates/platformerGame.html for side-scrollers and platformers: a level built on a TileCollisionLayer, one-way platforms, a FollowCamera with look-ahead and level bounds, and cameraShake on hard landings.
  • Use templates/box2dGame.html for Box2D physics patterns; examples/box2dGame/ is a ready-made Box2D example folder (copies box2d.wasm.js/.wasm via data).
  • 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.html when the game needs title/pause/options UI.
  • Use templates/textureGame.html for procedural sprite-atlas workflows.
  • Use templates/tweakableGame.html for runtime tuning workflows (the engine's tweakables plugin).
  • Use templates/uiGame.html when canvas UI widgets are required.

Read the full file on GitHub · 313 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. 3d ago Changed · +20 lines · +482 tokens per session 2c1554f254aa
  2. 28d ago Changed · +3 lines · +83 tokens per session 566c7e37031c
  3. 1mo ago Changed · +62 lines · +1,566 tokens per session 2d20358f7c1f
  4. 2mo ago First seen · 228 lines · 3,666 tokens per session scan A 69f97e351548

Subscribe to this mod's changes

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.

Related

LittleJS-AI AGENTS.md compared with instructions from other repositories

LittleJS-AI AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
LittleJS-AI AGENTS.mdKilledByAPixel/LittleJS-AIInstructions file853d agoMITA5,797Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode