Borrowing it
Nothing to install: this file belongs to wafertools/wafermap. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/wafertools/wafermap/main/AGENTS.mdgit clone --depth 1 https://github.com/wafertools/wafermapWrote 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.
[](https://agentmods.dev/instructions/wafertools/wafermap/agents-md)<a href="https://agentmods.dev/instructions/wafertools/wafermap/agents-md"><img src="https://agentmods.dev/badge/instructions/wafertools/wafermap/agents-md/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.
<a href="https://agentmods.dev/instructions/wafertools/wafermap/agents-md"><img src="https://agentmods.dev/badge/instructions/wafertools/wafermap/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04622 | $0.04622 |
| Opus 5.5 | $0.01849 | $0.01849 |
| Sonnet 5.5 | $0.00924 | $0.00924 |
| Haiku 4.5 | $0.00462 | $0.00462 |
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 19d 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 — 258 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(),registerBinColorScheme()/registerValueColorScheme(). Pure, no DOM, server-safe.@wafertools/wafermap/render—renderWaferMap(),renderWaferGallery(). 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.
There is no low-level drawing pipeline, chart-data builder or region builder to reach
for. The library draws through the renderers, and every figure it shows (yield, bin
counts, region yield, per-test statistics, capability) comes back from
analyzeWaferMap() / analyzeWaferLot().
If the only way to do something is to rebuild one of those pieces, that is a library gap worth reporting, not a pattern to build on.
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.- Bins and test values must be numbers, and verdicts booleans. Every parser —
CSV, JSON, a spreadsheet export — hands you
"1", and"1"is not pass bin 1.buildWaferMapnever converts them: each is treated as missing and reported asinput-values-not-numbers(severity'error'), so those dies have no bin or no value and a build that "works" can be mostly empty — read the warnings. Convert withNumber()at parse time. passBinsandringCountare set once, onbuildWaferMap, and travel on the result. Neither is an option onanalyzeWaferMap,analyzeWaferLot,renderWaferMaporrenderWaferGallery— passing one there is a type error in TypeScript, and in JavaScript it is ignored with ananalysis-option-correctedwarning while the real value is read from the map.passBinsdecides both the yield number and the wording of its label, so set it from the actual test program: do not assume[1], and never re-default to[1]downstream — readresult.passBins.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. - 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.
- 19d ago Changed · +1 tokens per session ba3039e9608f
- 25d ago Changed e4f8f8b899ad
- 26d ago Changed · +3 lines · +71 tokens per session 0a34c952f76d
- 1mo ago Changed · +6 lines · +157 tokens per session 37f7e58afcf4
- 1mo ago Changed · +36 tokens per session 800c862d67e2
- 1mo ago Changed b166f68d4dff
- 1mo ago Changed · +9 tokens per session 460283e2c70e
- 1mo ago Changed · -10 lines · -160 tokens per session 70b598e2e2a1
- 1mo ago Changed · +11 lines · +246 tokens per session 5e54c894d1b8
- 1mo ago First seen · 248 lines · 4,262 tokens per session scan A 996b772d79fb
wafermap AGENTS.md is an instructions file published in the GitHub repository wafertools/wafermap (8 stars, last pushed 3d ago), licensed MIT. It adds 4,622 tokens to every session, about $0.0185 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-31.
wafermap AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| wafermap AGENTS.mdwafertools/wafermap | Instructions file | 8 | 3d ago | MIT | A | 4,622 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,649 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode ai-customization.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 1,907 | GitHub Copilot |