shallot AGENTS.md

Repository guidance for Shallot, a WebGPU game engine. WebGPU is a browser and system graphics API for rendering with the GPU; the instructions describe the engine, project generator, examples, editor extension and documentation sources.

In plain words
What is it for?
Developing the engine, ECS, plugins, rendering, physics, project generator, VS Code extension, examples and related tests or documentation.
Why use it?
They show where engine behavior and consumer-facing rules are defined, so changes fit the existing package structure. This helps contributors work across the engine, scaffolding tool, extension and examples without losing the intended contracts.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/dylanebert/shallot/agents-md
Clone the repo
git clone --depth 1 https://github.com/dylanebert/shallot

Made for: Codex, OpenCode.

Per session 3,259 This file is loaded in full into every session.
When invoked 3,259 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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 $0.03259 $0.03259
Opus 5 $0.01630 $0.01630
Sonnet 5 $0.00652 $0.00652
Haiku 4.5 $0.00326 $0.00326

Measured 2d ago against content hash b81d4ff81b81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

shallot AGENTS.md scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Four groups under `examples/`, indexed by `examples/AGENTS.md` — one line per entry: the problem, the path, what it shows. The index is the retrieval surface; grep it before writing a pattern from scratch. The corpus con
AGENTS.md · 85 lines

How it starts

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

Shallot

WebGPU game engine. The repo is the documentation: readable source with JSDoc contracts on every public export, a problem-indexed examples corpus, and this file plus .claude/rules/ as the behavioral contract. There is no docs site and no editor — agents and humans both read the source, the examples index (examples/AGENTS.md), and packages/shallot/AGENTS.md (the consumer-facing contract — how to build games on Shallot: ECS, plugins, GPU, render, physics, testing — shipped with the npm package). This file covers engine-internal layout and commands; behavioral constraints live in .claude/rules/.

Layout: packages/shallot/ (engine — src/engine/, src/standard/, src/extras/, src/project/ (manifest/generate/vite toolchain behind the CLI)), packages/create-shallot/ (the bun create shallot scaffold), packages/vscode-shallot/ (the VS Code extension), evals/ (the eval harness), examples/ (standalone projects).

Code is source of truth — elegant first, document what's non-obvious.

Rules

.claude/rules/style.md carries no paths: frontmatter: it applies to all engine code, always. The rest are path-scoped, and their globs match the path from the repo root (packages/shallot/…), not your cwd:

  • packages/shallot/src/standard/audio/**/*.ts, packages/shallot/rust/audio/**/*.rs.claude/rules/audio.md
  • packages/shallot/src/standard/avbd/**/*.ts, packages/shallot/tests/avbd/**/*.ts.claude/rules/avbd.md
  • packages/shallot/src/engine/**/*.ts, packages/shallot/src/standard/**/*.ts, packages/shallot/src/extras/**/*.ts, examples/**/*.scene, examples/**/*.ts.claude/rules/ecs.md
  • examples/**/*.ts, examples/**/*.scene, examples/AGENTS.md.claude/rules/examples.md
  • packages/shallot/src/**/*.ts, packages/shallot/package.json.claude/rules/exports.md
  • packages/shallot/src/engine/runtime/**/*.ts, packages/shallot/src/engine/utils/encode.ts, packages/shallot/src/standard/render/**/*.ts, packages/shallot/src/standard/sear/**/*.ts, packages/shallot/src/standard/part/**/*.ts, packages/shallot/src/standard/slab/**/*.ts, packages/shallot/src/standard/bvh/**/*.ts, packages/shallot/src/extras/{gltf,lines,outline,profile,skin,sky,sprite,text}/**/*.ts.claude/rules/gpu.md
  • packages/shallot/src/standard/physics/**/*.ts, packages/shallot/src/standard/character/**/*.ts, packages/shallot/src/standard/player/**/*.ts.claude/rules/physics.md
  • packages/shallot/src/standard/render/**/*.ts, packages/shallot/src/standard/sear/**/*.ts, packages/shallot/src/standard/glaze/**/*.ts, packages/shallot/src/standard/part/**/*.ts.claude/rules/render.md
  • packages/shallot/src/**/*.test.ts, packages/shallot/tests/**/*.ts, packages/shallot/bin/*.test.ts, packages/shallot/bin/*.probes.ts, scripts/install-test.ts, packages/shallot/scripts/build-tooling.ts.claude/rules/testing.md
  • packages/shallot/src/standard/tumble/**/*.ts, packages/shallot/rust/tumble/**, packages/shallot/tests/tumble/**, packages/shallot/scripts/build-tumble-kernel.ts, packages/shallot/scripts/run-tumble-fixtures.ts, packages/shallot/scripts/gen-tumble-fixtures.ts, packages/shallot/scripts/gen-tumble-gold.ts, packages/shallot/scripts/gen-tumble-sample-golds.ts, packages/shallot/scripts/tumble-exit-test.ts, examples/gym/src/tumble-*.ts, examples/gym/src/scenarios/**, scripts/bench-tumble.ts, scripts/tumble-interaction.ts, scripts/tumble-repro*, scripts/check-tumble-fp.ts.claude/rules/tumble.md
  • examples/**/*.html.claude/rules/visual-identity.md

Read the full file on GitHub · 85 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. 2d ago First seen · 85 lines · 3,259 tokens per session scan B b81d4ff81b81

Subscribe to this mod's changes

shallot AGENTS.md is an instructions file published in the GitHub repository dylanebert/shallot (317 stars, last pushed 4d ago), licensed MIT. It adds 3,259 tokens to every session, about $0.0163 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.