js2 CLAUDE.md

Project instructions for js2wasm, a TypeScript-to-WebAssembly compiler. WebAssembly is a compact format that lets code run in browsers and other runtimes.

In plain words
What is it for?
Use them when answering questions about the js2wasm codebase, changing its compiler, running tests, or working in separate Git worktrees.
Why use it?
They keep answers concise and explain project-specific terms, testing practices, development scratch work, and worktree rules consistently.

Instructions file

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/loopdive/js2/claude-md
Clone the repo
git clone --depth 1 https://github.com/loopdive/js2
Per session 21,295 This file is loaded in full into every session.
When invoked 21,295 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.21295 $0.21295
Opus 5 $0.10648 $0.10648
Sonnet 5 $0.04259 $0.04259
Haiku 4.5 $0.02130 $0.02130

Measured yesterday against content hash 8891ae781097, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

js2 CLAUDE.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 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.

Reads agent configuration directoriesmediumAgent snooping

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

- **Pull-time budget/parallelism awareness (#2751)**: before claiming, run `node scripts/budget-status.mjs --pick`. It reports the **remaining token budget**, the current **parallelism** (active agents), the **per-agent
CLAUDE.md · 761 lines

How it starts

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

js2wasm

TypeScript-to-WebAssembly compiler using WasmGC.

Answering style

Be concise. Lead with the answer, then only the context needed to act on it.

  • No repetition. Do not restate the question, re-explain what you just did, or repeat a caveat you already gave. If it was said earlier in the session, a pointer is enough.
  • No long prose. Prefer a sentence or a short list over a paragraph, and a table over a list when comparing. Cut throat-clearing and summaries of summaries.
  • Match the question's size. A yes/no question gets a yes/no plus the one fact that makes it actionable, not a status report.
  • Introduce terminology with a quick example. The first time a term of art appears in an answer (demote, claim, merge-queue park, CPS, …), attach a one-line concrete example of what it means — e.g. "the selector demotes the function (a ** operator makes it fall back to the legacy compiler instead of erroring)". A term the reader has to reverse-engineer costs more than the sentence that grounds it.
  • Brevity is about redundancy, not omission. Findings that change what someone would do — a real failure, an unverified assumption, work deliberately left out — still get stated plainly. Say them once, in the fewest words that keep them accurate.
  • Plain language to the stakeholder. No jargon, no empty phrases, gist first. Internal codenames, gate names, and spec terms only when the reader needs to act on them — then with a one-line gloss.

Hooks and ratchet gates — never skipped, always before the commit

Never pass --no-verify to git commit or git push (project-lead order, 2026-08-22). The pre-commit and pre-push hooks are the last check that runs on a human timescale; skipping them moves every failure into CI, where a red gate costs a full cycle plus a branch re-sync. If a hook is slow, use the sanctioned SKIP_SLOW_PRECOMMIT=1 (which still runs the fast checks) and run the heavy gates by hand — do not disable the hook.

Read the full file on GitHub · 761 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 · 761 lines · 21,295 tokens per session scan B 8891ae781097

Subscribe to this mod's changes

js2 CLAUDE.md is an instructions file published in the GitHub repository loopdive/js2 (59 stars, last pushed yesterday), licensed Apache-2.0. It adds 21,295 tokens to every session, about $0.1065 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.