littlejs-conventions

littlejs-conventions is a skill for Claude Code from KilledByAPixel/LittleJS-AI. It costs 214 tokens per session (2,951 once invoked), scanned A, original, MIT.

A set of coding conventions for LittleJS, a JavaScript game engine. It explains how to structure game startup, objects, movement, drawing, and physics using the engine’s built-in interface.

In plain words
What is it for?
Use it whenever you write, edit, review, or debug LittleJS code, including small code snippets.
Why use it?
It reduces mistakes caused by applying generic JavaScript or game-engine patterns that do not match LittleJS.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the littlejs plugin — 5 skills shipped together

Good fit Use it whenever you write, edit, review, or debug LittleJS code, including small code snippets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killedbyapixel/littlejs-ai/littlejs-conventions
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 KilledByAPixel/LittleJS-AI --skill littlejs-conventions
Clone the repo
git clone --depth 1 https://github.com/KilledByAPixel/LittleJS-AI

Made for: Claude Code.

Or install littlejs, the plugin that ships this one along with the rest of its 5 skills.

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-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/killedbyapixel/littlejs-ai/littlejs-conventions/github.svg)](https://agentmods.dev/skills/killedbyapixel/littlejs-ai/littlejs-conventions)
Your own site
<a href="https://agentmods.dev/skills/killedbyapixel/littlejs-ai/littlejs-conventions"><img src="https://agentmods.dev/badge/skills/killedbyapixel/littlejs-ai/littlejs-conventions/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-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/killedbyapixel/littlejs-ai/littlejs-conventions"><img src="https://agentmods.dev/badge/skills/killedbyapixel/littlejs-ai/littlejs-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 214 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,951 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00214 $0.02951
Opus 5.5 $0.00086 $0.01180
Sonnet 5.5 $0.00043 $0.00590
Haiku 4.5 $0.00021 $0.00295

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

Security

Grade A, and why

littlejs-conventions 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 9d 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.

skills/littlejs-conventions/SKILL.md · 78 lines

How it starts

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

LittleJS engine conventions

Rules for the LittleJS engine's global API style: call engineInit, vec2, drawTile, etc. directly — no LJS. prefix, no ES-module imports (unless the project already uses the ESM build).

Startup and structure

  • engineInit(gameInit, gameUpdate, gameUpdatePost, gameRender, gameRenderPost, imageSources) starts the engine — define all five callbacks even if some are empty. gameInit may be async; the engine awaits it (put await box2dInit() at the top of a Box2D game).
  • Model entities as classes extending EngineObject — the engine updates, moves, collides, and renders them automatically every frame:
class Player extends EngineObject
{
    constructor(pos)
    {
        super(pos, vec2(1), tile(0), 0, CYAN); // pos, size, tileInfo, angle, color
    }
    update()
    {
        this.velocity = keyDirection().scale(.2); // arrows/WASD move the player
        // engine applies physics (velocity, gravity, collision) after update()
        // no super.update() call is needed
    }
}

Spawn once in gameInit with new Player(vec2(0)); it draws itself — no manual draw call. Customize visuals via this.tileInfo / this.color / this.angle, or override render().

  • Persisted settings/stats: use readSaveData/writeSaveData (localStorage-backed, JSON-serialized) — don't hand-roll localStorage. Save data is always an object. readSaveData returns {...yourDefault, ...whatWasStored}, so a scalar default spreads to nothing: readSaveData('best', 0) yields {}, not 0, and the next arithmetic on it is NaN with no error. Always pass and read an object — readSaveData('save', {best:0}).best — and write the whole object back with writeSaveData('save', {best:score}).
  • 3D is built into the engine (1.19+) — use it, not three.js. new Render3DPlugin; at the top of gameInit creates the render3D global and draws the scene every frame; nothing to import, no CDN. Never declare render3D yourself, and keep WebGL on (no setGLEnable(false)) — the 3D scene draws on the engine's WebGL canvas with 2D and HUD draws over it. Objects are new EngineObject3D(pos3D, mesh, tileInfo, color) with pos3D / rotation3D / scale3D / velocity3D; meshes come from builders (buildBox, buildSphere, buildCylinder, buildGrid, ...). Aim the camera with render3D.camera.orbit(target, distance, yaw, pitch), .lookAt(target), or .follow(target, offset, percent) from gameUpdatePost. The engine still has a ThreeJSPlugin as well; only use it when the user asks for three.js by name.

Read the full file on GitHub · 78 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. 9d ago Changed · +3 lines 5619ed1f6d9b
  2. 26d ago Changed · +1 lines 7b2191d7f7c0
  3. 1mo ago Changed 3a19cd8cb9da
  4. 1mo ago Changed · +6 lines 76b1cdbc8702
  5. 2mo ago Changed · +3 lines 117f4323b96a
  6. 3mo ago First seen · 65 lines · 214 tokens per session scan A dc8b6e34150d

Subscribe to this mod's changes

littlejs-conventions is a skill published in the GitHub repository KilledByAPixel/LittleJS-AI (91 stars, last pushed 10d ago), licensed MIT. It adds 214 tokens to every session and 2,951 once invoked, about $0.0009 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-08-30.

Related

littlejs-conventions compared with skills from other repositories

littlejs-conventions next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
littlejs-conventionsKilledByAPixel/LittleJS-AISkill9110d agoMITA214Claude Code
hearth-codeechoo19/hearthSkill411mo agoMITA88Claude Code
pixi-vnDRincs-Productions/pixi-vnSkill158todayLGPL-2.1A178Claude Code, Codex
cppG1Joshi/Agent-SkillsSkill151mo agoMITA65Claude Code, Codex
gpt-proscasella/codex-gpt-proSkill57mo agoMITA130Codex
jupyter-notebookNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
effect-developmentpingdotgg/t3codeSkill84ktodayMITA29Claude Code, Codex