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 3,666 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 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,666 This file is loaded in full into every session.
When invoked 3,666 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.03666 $0.03666
Opus 5 $0.01833 $0.01833
Sonnet 5 $0.00733 $0.00733
Haiku 4.5 $0.00367 $0.00367

Measured yesterday against content hash 69f97e351548, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 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.

Origin

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.

AGENTS.md · 228 lines

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 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/box2dGame.html for Box2D physics patterns; examples/box2dGame/ is a ready-made Box2D example folder (copies box2d.wasm.js/.wasm via data).
  • 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.
  • Use templates/uiGame.html when canvas UI widgets are required.
  • Use templates/threejsGame.html for three.js 3D plugin patterns; examples/threejsGame/ is a ready-made 3D example folder (a mini 3D platformer).

Read the full file on GitHub · 228 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. yesterday 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 (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.

Related

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 tokens

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.

langchain-ai/langchain · 4,469 tokens

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).

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,104 tokens