refd CLAUDE.md

Repository-specific instructions for Claude Code agents working on refd, an open-source service that monitors how brands appear in AI-generated search answers. The repository is a monorepo, meaning one code repository contains several related applications and packages.

In plain words
What is it for?
Use it when changing or reviewing the refd repository, including changes that must also be applied to AGENTS.md.
Why use it?
It tells Claude Code how the project is organized and which documentation, coding rules, and commands to follow.

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/emaitchess/refd/claude-md
Clone the repo
git clone --depth 1 https://github.com/emaitchess/refd
Per session 6,196 This file is loaded in full into every session.
When invoked 6,196 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod 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.06196 $0.06196
Opus 5 $0.03098 $0.03098
Sonnet 5 $0.01239 $0.01239
Haiku 4.5 $0.00620 $0.00620

Measured 2d ago against content hash 8b91ab6e865d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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

Origin

This is a copy

97% identical to refd AGENTS.md — 8 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.

CLAUDE.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 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: 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.vars locally). The only Worker that declares bindings, cron, or queue consumers — CI enforces this via scripts/check-worker-topology.sh.
  • apps/dashboard (@refd/dashboard, dash.refd.ai) — the React + Vite SPA as an assets-only Worker (@/*src/*). noindex, with its own public/robots.txt + public/_headers (CSP allows api.refd.ai) and no landing route. It calls the API cross-origin, so its client builds absolute URLs from VITE_API_ORIGIN and sends credentials: '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/), @astrojs/sitemap, JSON-LD, and the static 404. Pure .astro (Biome-excluded; astro check can't run on the repo's TS 7, so astro build validates the templates); CTAs link to dash.refd.ai.
  • packages/core (@refd/core) — runtime-neutral code shared across Workers (config, surfaces, mentions, workspaces, site-metadata, blocks, metric-copy, glossary, public-pages), imported via subpaths like @refd/core/config. No build step; consumers bundle the TS source.

Read the full file on GitHub · 95 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. 2d ago First seen · 95 lines · 6,196 tokens per session scan A 8b91ab6e865d

Subscribe to this mod's changes

refd CLAUDE.md is an instructions file published in the GitHub repository emaitchess/refd (0 stars, last pushed 1mo ago), licensed MIT. It adds 6,196 tokens to every session, about $0.0310 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to refd AGENTS.md, differing in 8 lines, and is treated as a copy.

Related

Other instructions, from other repositories

aeo-radar CLAUDE.md

Instructions for hellowalt/aeo-radar, covering claude.md — dev playbook for aeo radar, tech stack, common commands, crawl (defaults to headless) and seeding & analysis.

hellowalt/aeo-radar · 1,181 tokens

geoskills CLAUDE.md

Instructions for Cognitic-Labs/geoskills, covering geoskills — ai agent guide, repository overview, directory structure, skill internal structure and skill.md conventions.

Cognitic-Labs/geoskills · 1,246 tokens

agents AGENTS.md

AGENTS.md instructions for unifapi-agent/agents, covering agents, role agents, seo agent, ai visibility agent and local seo agent.

unifapi-agent/agents · 2,523 tokens

potato CLAUDE.md

Instructions for onism1767-creator/potato, covering claude.md — 给 claude code 的厂规(本仓库的最高行为约束), 0. 一句话项目定位(先理解再动手), 🟥 叙事红线(写注释、文案、报告、readme 时都适用), 1. 架构层级与不可跨越的边界(🟥 核心红线) and 🟥 边界红线.

onism1767-creator/potato · 4,664 tokens

loamwright-SEO-Skill AGENTS.md

Instructions for XuanRanL/loamwright-SEO-Skill, covering agents.md — universal host intent router, intent → skill routing, project initialization, article creation (most common) and single-phase entry.

XuanRanL/loamwright-SEO-Skill · 1,639 tokens

loamwright-SEO-Skill CLAUDE.md

Instructions for XuanRanL/loamwright-SEO-Skill, covering project: xuanran seo blog writer (claude code plugin), what this is, rule 4 — always verify the live url after publish, where these rules are enforced and plugin install sync.

XuanRanL/loamwright-SEO-Skill · 14,447 tokens