Borrowing it
Nothing to install: this file belongs to emaitchess/refd. 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/emaitchess/refd/main/CLAUDE.mdgit clone --depth 1 https://github.com/emaitchess/refdWrote 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/emaitchess/refd/claude-md)<a href="https://agentmods.dev/instructions/emaitchess/refd/claude-md"><img src="https://agentmods.dev/badge/instructions/emaitchess/refd/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/emaitchess/refd/claude-md"><img src="https://agentmods.dev/badge/instructions/emaitchess/refd/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.12672 | $0.12672 |
| Opus 5.5 | $0.05069 | $0.05069 |
| Sonnet 5.5 | $0.02534 | $0.02534 |
| Haiku 4.5 | $0.01267 | $0.01267 |
Grade A, and why
refd 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.
This is a copy
97% identical to refd AGENTS.md — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 117 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.
AGENTS.md is the tool-neutral twin of this file — apply any change to both.
What this is
refd (refd.ai) — open-source AI search monitoring. Each workspace tracks one brand's visibility, mentions, citations, and rank across AI answer surfaces: ChatGPT, Perplexity, Gemini, Google AI Mode (BrightData dataset scrapers), and Google AI Overviews (BrightData SERP API). BrightData is the only data provider. Available hosted (refd.ai) or self-hosted; born tracking mrmr, since generalized. Public copy never pairs "refd" with "aeo".
Reference docs: DESIGN.md (design system — all UI work follows it), docs/METRICS.md (scoring and aggregation contract), and docs/mcp.md (remote MCP and OAuth usage).
Monorepo layout
Bun workspaces (apps/*, packages/*) — three independently deployed Cloudflare Workers plus a shared package (docs/plan-three-worker.md).
apps/api(@refd/api,api.refd.ai) — the Worker: Hono API, OAuth, MCP, cron trigger, queue consumer, every binding (D1, R2, KV, Queues, AI, Browser, rate limits), and secrets (apps/api/.dev.varslocally). The only Worker that declares bindings, cron, or queue consumers — CI enforces this viascripts/check-worker-topology.sh.apps/dashboard(@refd/dashboard,dash.refd.ai) — the React + Vite SPA as an assets-only Worker (@/*→src/*).noindex, with its ownpublic/robots.txt+public/_headers(CSP allowsapi.refd.ai) and no landing route. It calls the API cross-origin, so its client builds absolute URLs fromVITE_API_ORIGINand sendscredentials: 'include'.apps/web(@refd/web,refd.ai) — the public site: a static Astro build fronted by a tiny Worker (src/worker.ts) that does homepage Markdown negotiation over the assets. Owns the indexable SEO assets (apps/web/public/), the sitemap and llms.txt routes, JSON-LD, and the static 404. Pure.astro(Biome-excluded;astro checkcan't run on the repo's TS 7, soastro buildvalidates the templates); CTAs link todash.refd.ai.packages/core(@refd/core) — runtime-neutral code shared across Workers (config,surfaces,mentions,workspaces,site-metadata,blocks,metric-copy,glossary,concepts,public-pages), imported via subpaths like@refd/core/config. No build step; consumers bundle the TS source.
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 · +11 lines · +2,099 tokens per session 4729318386f3
- 1mo ago Changed · +2 lines · +824 tokens per session bdaf2c90de61
- 1mo ago Changed · +149 tokens per session 182cd2804381
- 1mo ago Changed · +1 lines · +92 tokens per session 9018af2143c8
- 1mo ago Changed · +3 lines · +802 tokens per session c69d4fdcbf66
- 1mo ago Changed · +380 tokens per session fdda1c56584a
- 1mo ago Changed · +4 lines · +831 tokens per session 12f38c899b3f
- 1mo ago Changed · +463 tokens per session 3bec562906a3
- 2mo ago Changed · +1 lines · +534 tokens per session 27dc19f88755
- 2mo ago First seen · 95 lines · 6,498 tokens per session scan A d263951d8391
refd CLAUDE.md is an instructions file published in the GitHub repository emaitchess/refd (2 stars, last pushed 1mo ago), licensed MIT. It adds 12,672 tokens to every session, about $0.0507 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to refd AGENTS.md, differing in 6 lines, and is treated as a copy.
refd CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refd CLAUDE.mdemaitchess/refd | Instructions file | 2 | 1mo ago | MIT | A | 12,672 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |