littlejs-conventions

littlejs-conventions is a skill for Claude Code from KilledByAPixel/LittleJS-AI. It costs 214 tokens per session (1,767 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 — 4 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 4 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 1,767 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.01767
Opus 5 $0.00107 $0.00883
Sonnet 5 $0.00043 $0.00353
Haiku 4.5 $0.00021 $0.00177

Measured 12d ago against content hash dc8b6e34150d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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 · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 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() or a three.js await import(...) at the top).
  • 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}).
  • three.js 3D (the engine's built-in ThreeJSPlugin / ThreeJSObject): three.js itself is not bundled. Declare let THREE; at top level and THREE = await import(...) at the top of an async gameInit, then new ThreeJSPlugin(THREE) — construct no THREE.* object before that import resolves (no top-level new THREE.Vector3(...)). Never declare let threeJS in game code: the engine owns that global and the plugin constructor assigns it, so redeclaring it throws. Call setGLEnable(false) so the LittleJS canvas draws only Canvas2D content (HUD text, particles) over the 3D scene.

Read the full file on GitHub · 65 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. 12d 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 (78 stars, last pushed 6d ago), licensed MIT. It adds 214 tokens to every session and 1,767 once invoked, about $0.0011 per session on Opus 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

Other skills, from other repositories

hearth-code

Write behavior in Hearth — Lua/JS scripts, the ctx API (input, timers, tweens, events, camera, audio, save), script modules and require, the dot-call and userdata pitfalls, deterministic RNG, and the check-script/edit-script iteration loop. Use when making things happen in a Hearth game (movement, AI, pickups, rules)…

echoo19/hearth · 88 tokens

pixi-vn-getting-started

Use when setting up a new or existing project on @drincs/pixi-vn, wiring the main.ts entry point, or calling the top-level Game API (Game.init, Game.start, Game.onEnd, Game.addOnError, Game.onNavigate, Game.clear) — this is the entry point every Pixi'VN project needs before touching canvas, narration, sound, storage…

DRincs-Productions/pixi-vn · 90 tokens

gpt-pro

Operate ChatGPT Pro through Browser Use/Playwright or Computer Use. Use when the user asks Codex to ask GPT Pro, prompt GPT Pro, use ChatGPT Pro, send a prompt to ChatGPT Pro/GPT Pro, or wait for a GPT Pro result. Checks whether Browser Use/Playwright and/or Computer Use are available, asks for a first-run default…

scasella/codex-gpt-pro · 130 tokens

cpp

C++ modern C++17/20/23 with STL, smart pointers, and performance optimization. Use for .cpp files.

G1Joshi/Agent-Skills · 28 tokens

jupyter-notebook

Iterative Python via live Jupyter kernel (hamelnb).

NousResearch/hermes-agent · 18 tokens

zoom-meeting-sdk-unreal

Zoom Meeting SDK for Unreal Engine wrapper integrations. Use when building Unreal projects that embed Zoom meetings with C++ and Blueprint wrappers, including wrapper-to-SDK mapping concerns.

anthropics/knowledge-work-plugins · 41 tokens