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.
npx agentmods add instructions/wafertools/wafermap/agents-mdgit clone --depth 1 https://github.com/wafertools/wafermapWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02904 | $0.02904 |
| Opus 5 | $0.01452 | $0.01452 |
| Sonnet 5 | $0.00581 | $0.00581 |
| Haiku 4.5 | $0.00290 | $0.00290 |
Grade A, and why
wafermap 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.
wafermap — rules for AI coding agents
Guidance for AI tools (Claude Code, Codex, Copilot, Cursor, …) writing code that
uses @wafertools/wafermap. Paste the rules below into your project's own
agent config so they are loaded whenever the agent works on wafer map code.
This library renders semiconductor wafer maps. Its output drives yield calls, lot dispositions and process changes, so a plot that is plausibly but silently wrong is the expensive failure — worse than one that throws. Most rules here exist because the obvious-looking code produces exactly that.
wafermap — usage rules
@wafertools/wafermap renders wafer maps from semiconductor die test data.
Wrong-but-plausible output drives real yield and lot decisions, so prefer failing
loudly over guessing.
Entry points
@wafertools/wafermap—buildWaferMap(), geometry,registerColorScheme(). Pure, no DOM, server-safe.@wafertools/wafermap/render—renderWaferMap(),renderWaferGallery(),toCanvas(). Needs the DOM.@wafertools/wafermap/stats—analyzeWaferMap(),analyzeWaferLot(). Pure analysis.@wafertools/wafermap/worker—createWafermapWorker()for off-main-thread builds.
Default path: buildWaferMap() once when data loads, then renderWaferMap() for a
single wafer or renderWaferGallery() for several. Reach for toCanvas()/buildView()
only when you need the low-level pipeline — they give up the toolbar and every UI
correctness guarantee that comes with it.
Traps that produce silently wrong maps
- Never
die.hbin ?? 0ordie.sbin ?? 0. A missing bin is not bin 0 — it is no-data, and must render grey. Defaulting to 0 invents a bin and changes the yield number. Leave the field absent. xandyare prober step positions (integers), not millimetres. Pass them through unchanged;dieConfig.width/heightconvert to physical units. Do not pre-multiply. The geometry inputs arewaferConfig(typeWaferConfig) anddieConfig(typeDieConfig) — both optional, both inferred when omitted.passBinsdecides both the yield number and the wording of its label. Set it from the actual test program. Do not assume[1].testValuesis keyed by test number, e.g.{ 1050: 0.42 }— not a positional array.activeTestlikewise takes a test number (1050), not an index.- Functional tests (
testType: 'F') have no measured value. Read their verdicts only viagetTestPassStatus(die, testNumber, def); never readdie.testPassdirectly and never interpret a 0/1 intestValues. A missing verdict is no-data, never a fail. - Show users
die.x/die.yonly. Never surface internal display or transformed coordinates in tooltips, labels or reports, whatever the rotation or flip state. - A die with test results is always fully on the wafer. A prober only steps to
sites that fit. Never recompute a
partialflag by testing die corners against the wafer circle — that manufactures fake partial dies which are then greyed out and dropped from yield. A die outside the wafer means the geometry is wrong. - Check
result.warningsandsummary.stats.warnings. Both carryWaferWarning—{ code, message, severity }. Branch oncode, never on the prose. The two differ in shape and the difference throws:result.warningsis required and always an array ([]when clean), butsummary.stats.warningsis optional and isundefinedwhen there is nothing to report. Writesummary.stats.warnings?.length— a baresummary.stats.warnings.lengthis a TypeError on every clean wafer, which is most of them, so it will pass your testing and fail in production. Geometry advisories are severity'error': they mean dies may be drawn in the wrong place. The renderers surface these themselves in a toolbar indicator, so do NOT hand-roll a second display — passwarnings: { display: false, onWarning }if the app has its own notification UI. (result.inference.warningsis a deprecated string mirror; do not use it.) - Give the container a resolved height.
renderWaferMapfills its container. A bare block-flow<div>is fine — it grows to the canvas. The real failure is a flex/grid child whose ancestors never resolve a height: it stays 0-tall and the map is invisible. The library detects exactly that case after layout settles andconsole.warns with the fix, so read the console before debugging further. Either give the container a real CSS height, or pass{ height: 600 }in the render options and the library will size it for you.
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.
- 2d ago First seen · 182 lines · 2,904 tokens per session scan A 74fc7de236d4
wafermap AGENTS.md is an instructions file published in the GitHub repository wafertools/wafermap (5 stars, last pushed 5d ago), licensed MIT. It adds 2,904 tokens to every session, about $0.0145 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-31.
Other instructions, from other repositories
FableCut CLAUDE.md
Instructions for ronak-create/FableCut, covering fablecut — browser video editor, drivable by claude code, token-efficient editing (important for agents), where the files are, run and how claude code edits a video.
FableCut AGENTS.md
Instructions for ronak-create/FableCut, covering working with fablecut, project constraints and mcp entry point.
super-claudio-brothers CLAUDE.md
Instructions for alexconner-79/super-claudio-brothers, covering super claudio brothers — claude code handoff, what this is, project structure, the supabase leaderboard task and what to do.
appwrite AGENTS.md
AGENTS.md instructions for appwrite/appwrite, covering appwrite, commands, stack, layout and libraries.
VCVio AGENTS.md
Instructions for Verified-zkEVM/VCVio, covering vcvio — ai agent guide, fast start, attribution, headers, and docstrings, module scopes and what this project is.
Silex AGENTS.md
AGENTS.md instructions for silexlabs/Silex, covering agents.md, tech stack, run it locally, building the desktop app and when writing code for silex (editing source).