Borrowing it
Nothing to install: this file belongs to ythalorossy/openfda. 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/ythalorossy/openfda/main/CLAUDE.mdgit clone --depth 1 https://github.com/ythalorossy/openfdaWrote 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/ythalorossy/openfda/claude-md)<a href="https://agentmods.dev/instructions/ythalorossy/openfda/claude-md"><img src="https://agentmods.dev/badge/instructions/ythalorossy/openfda/claude-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/ythalorossy/openfda/claude-md"><img src="https://agentmods.dev/badge/instructions/ythalorossy/openfda/claude-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.08785 | $0.08785 |
| Opus 5.5 | $0.03514 | $0.03514 |
| Sonnet 5.5 | $0.01757 | $0.01757 |
| Haiku 4.5 | $0.00878 | $0.00878 |
Grade A, and why
openfda CLAUDE.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 1mo 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 — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a Model Context Protocol (MCP) server that provides tools for querying drug information from the OpenFDA API. The server communicates over stdio and requires an OPENFDA_API_KEY environment variable.
Commands
npm run build # Compile TypeScript to dist/
npm run build:cli # Build + add shebang for bin entry (required for CLI)
npm run dev # Start development server
npm run test # Run Vitest tests
npm run test:ci # Run tests in CI mode (no watch)
npm run typecheck # TypeScript type checking
npm run lint # Run ESLint
npm run smoke # Manual end-to-end check against the built dist/ (hits the live API)
npm run probe:faers-codes # Manual, live-API check that re-validates the FAERS code maps against openFDA's published field reference
npm run fields:sync # Manual, live-API script that downloads FDA's published field reference and writes the committed src/catalog/drug-*.json files
npm run fields:coverage # Manual, live-API script that measures what fraction of records populate each catalog field, writing src/catalog/drug-*.coverage.json
npm run fields:countable # Manual, live-API script that measures which declared count fields openFDA can actually aggregate, writing src/catalog/drug-*.countable.json
npm run probe:fields # Manual, live-API script that checks every path every descriptor exposes actually returns data (not merely published)
For single test file: npx vitest run tests/ApiHandler.test.ts
.github/workflows/fields-drift.yml re-downloads FDA's field references every
Monday and re-probes every exposed field, opening an issue on failure. It needs
the OPENFDA_API_KEY repository secret. Run it by hand from the Actions tab
after changing any descriptor's field list.
Key Files
vite.config.ts: Vite build configuration; externalizes the SDK for StdioServerTransport compatibility, and injects__APP_VERSION__frompackage.jsonat build time so the version reported inserverInfocannot drift from the published versiontests/: Vitest test suite (528 tests across 42 files: ApiHandler, bundle-size, catalog-conformance, catalog-coverage, catalog-shape, core/budget, core/codes, core/descriptor, core/envelope, core/escape, core/executor, core/http, core/project, core/query, core/registry, core/resources, core/strategy, datasets/drug-drugsfda, datasets/drug-enforcement, datasets/drug-event, datasets/drug-label, datasets/drug-ndc, datasets/drug-orangebook, datasets/drug-shortages, datasets/faers, docs-currency, drift-guard, env, faers-codes, format, label-fields, ndc, ndc-formats, no-raw-query, no-url-in-output, OpenFDABuilder, redact, registration, schema-budget, ToolManager, ToolManager.keyguard, version)docs/superpowers/notes/2026-09-20-field-selection.md: The authoritative record of which fields eachdrug-*descriptor exposes in itsfieldenum, and why — including every field that was seeded but deliberately dropped. No code reads this file; it is the rationale behindsrc/datasets/drug/*.ts.scripts/capture-fixtures.mjs: Manual, live-API script that captures trimmed label fixtures intotests/fixtures/(not run in CI)scripts/smoke-local.mjs(npm run smoke): Manual end-to-end check that drives the builtdist/index.jsover stdio as a real MCP client would, asserting the behaviours the 1.1.0 through 2.0.0 fixes introduced. Hits the live API, so it is deliberately NOT part ofnpm test; run it afternpm run build:cliand before publishing.npm run smoke -- --no-keyexercises the missing-key path instead.scripts/probe-faers-codes.mjs(npm run probe:faers-codes): Manual, live-API script that re-validates the FAERS code maps insrc/datasets/drug/faers.ts(SERIOUSNESS,PATIENT_SEX,REACTION_OUTCOMES) against openFDA's published field reference (https://open.fda.gov/fields/drugevent.yaml). Hits the live API, so it is deliberately NOT part ofnpm test; run it wheneverfaers.ts's code maps change.scripts/fields-sync.mjs(npm run fields:sync): Manual, live-API script that downloads openFDA's published field reference for every drug endpoint and writes the trimmed, committedsrc/catalog/drug-<endpoint>.jsonfiles — the offline source of truthtests/catalog-conformance.test.tschecks every descriptor path against.scripts/fields-coverage.mjs(npm run fields:coverage): Manual, live-API script that asks openFDA how many records actually populate each catalog field (_exists_:<path>) and writessrc/catalog/drug-<endpoint>.coverage.json. This is the evidence behind the exposed-field selection recorded indocs/superpowers/notes/2026-09-20-field-selection.md.scripts/fields-countable.ts(npm run fields:countable): Manual, live-API script that asks openFDA whether every declaredcountFieldspath (and its.exactalternate) can actually be aggregated, and writessrc/catalog/drug-<endpoint>.countable.json. Countability is a property of openFDA's index mapping with no derivable rule — of the 30 count fields declared at 2.0.0, 14 were rejected upstream while 16 near-identical ones were accepted — so it has to be measured and committed fortests/catalog-conformance.test.tsto guard offline. Unlikefields-sync.mjs, it derives its endpoint list fromDRUG_ENDPOINTSrather than a hardcoded map, so a new group needs only thedrug-filename prefix parameterized, not its slugs listed separately. Hits the live API, so it is deliberately NOT part ofnpm test; run it whenever a descriptor'scountFieldschange, and weekly viafields-drift.yml.scripts/probe-fields.ts(npm run probe:fields): Manual, live-API script that checks every path everyDRUG_ENDPOINTSdescriptor exposes (fields+countFields) with an_exists_:<path>count.tests/catalog-conformance.test.tsalready proves a path is published, offline; this proves it is populated — a published-but-empty field presents as a valid search that always finds nothing, indistinguishable from absent data. Run throughtsxagainstsrc/directly, notdist/:vite.config.tsbundles a singledist/index.jswithpreserveModules: false, sodist/datasets/...does not exist for anything to import. Hits the live API, so it is deliberately NOT part ofnpm test; run it whenever a descriptor'sfieldsorcountFieldschange.
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.
- 1mo ago Changed · +107 lines · +5,865 tokens per session 323c2be11cb0
- 1mo ago Changed · +8 lines · +1,235 tokens per session 63d2535f1317
- 1mo ago Changed · +9 lines · +875 tokens per session 60aa49fc8bd0
- 2mo ago First seen · 69 lines · 810 tokens per session scan A 3f5f84716447
openfda CLAUDE.md is an instructions file published in the GitHub repository ythalorossy/openfda (4 stars, last pushed 1mo ago), licensed MIT. It adds 8,785 tokens to every session, about $0.0351 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.
openfda CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| openfda CLAUDE.mdythalorossy/openfda | Instructions file | 4 | 1mo ago | MIT | A | 8,785 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | 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 |