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/gridaco/cors.sh/agents-mdgit clone --depth 1 https://github.com/gridaco/cors.shWhat 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.00827 | $0.00827 |
| Opus 5 | $0.00413 | $0.00413 |
| Sonnet 5 | $0.00165 | $0.00165 |
| Haiku 4.5 | $0.00083 | $0.00083 |
Grade A, and why
cors.sh 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Guidance for AI coding agents (and humans) working in this repo. CLAUDE.md is a symlink to this file.
What this is
cors.sh — a CORS proxy SaaS, rebuilt on Cloudflare Workers with its own accounts and billing. Two planes:
- Data plane —
workers/proxy: the proxy itself. KV-only on the hot path (origin-pinned key auth, CORS rewrite, streaming + byte metering, monthly quota,test_rate cap, keyless anonymous tier). - Control plane —
web/: a Next 16 app on OpenNext/Cloudflare that owns state in D1 and projects key entitlements into KV for the proxy to read. Also the marketing site, console (account = user), Auth.js sign-in, and Stripe billing.
The KV KeyRecord is the contract between the planes — one builder in web/lib/control, reused by project CRUD and billing re-projection. Change it in one place.
SPEC.mdis the source of truth for behavior — read it before touching proxy/auth/billing semantics.DEVELOPMENT.mdis the setup/run/test guide.GRAVEYARD.mdrecords what the rebuild removed (and why).
Stack and invariants
- Node ≥ 22 (
nvm use), pnpm 10.4.1, turbo monorepo, TypeScript strict. - Hosts on Cloudflare only — Workers + D1 (
cors-control) + KV (cors-keys). Not Vercel (legacy Vercel projects are disconnected). - Secrets are runtime-only — Cloudflare secret bindings in prod, gitignored
.dev.vars/.envlocally. Never commit a secret. - Formatter is oxfmt (not prettier) — config in
.oxfmtrc.json.
Commands
pnpm install
pnpm stack:up # full local stack: web + proxy + mock + page on a shared D1/KV (see DEVELOPMENT.md)
pnpm stack:down
pnpm test:e2e # self-contained Playwright suite (stack up -> test -> down)
pnpm format # oxfmt (write)
pnpm format:check # oxfmt --check (CI)
pnpm lint # eslint (CI)
pnpm check-types # tsc --noEmit (CI)
pnpm build # turbo build
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 · 56 lines · 827 tokens per session scan A 7aa015e2fa48
cors.sh AGENTS.md is an instructions file published in the GitHub repository gridaco/cors.sh (238 stars, last pushed 2mo ago), licensed MIT. It adds 827 tokens to every session, about $0.0041 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-30.
Other instructions, from other repositories
appwrite AGENTS.md
AGENTS.md instructions for appwrite/appwrite, covering appwrite, commands, stack, layout and libraries.
workflow AGENTS.md
AGENTS.md instructions for vercel/workflow, covering agent instructions, architecture, core components, workflow execution model and development commands.
Browser4 CLAUDE.md
Instructions for platonai/Browser4, covering browser4 — project context for claude, architecture, key dispatch chain (cli → browser), batch commands and e2e test structure.
spring-ai-agentcore AGENTS.md
Instructions for spring-ai-community/spring-ai-agentcore, covering agents.md, project overview, architecture, key components and artifact store classes.
flyto-core CLAUDE.md
Instructions for flytohub/flyto-core, covering claude notes, cross-agent handoff and shared code intelligence.
deckforge AGENTS.md
Instructions for tph-kds/deckforge, covering deckforge agent entry point, code intelligence, read order, default routing and non-negotiable implementation rules.