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/backendforth/next-sanity-starter/agents-mdgit clone --depth 1 https://github.com/backendforth/next-sanity-starterWhat 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.05512 | $0.05512 |
| Opus 5 | $0.02756 | $0.02756 |
| Sonnet 5 | $0.01102 | $0.01102 |
| Haiku 4.5 | $0.00551 | $0.00551 |
Grade A, and why
next-sanity-starter 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 — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — next-sanity-starter
This is the canonical guardrails file for AI coding assistants (Claude Code, Cursor, Windsurf, Codex, Copilot). Read this before writing or changing code. Per-subtree
CLAUDE.md,.cursor/rules/*.mdc, and.github/copilot-instructions.mdall defer to this document — keep edits here, not in mirrors.
TL;DR
This is a pnpm monorepo with two apps (web Next.js 16 App Router, studio Sanity v5) and shared packages/*. Editorial content is rendered via a strict module pattern: every renderable content block is a paired module.<name> Sanity object plus a Module<Name>.tsx React component, wired in eight places. Multilingual content uses @sanity/internationalized-array — locales are resolved at render time, never inside GROQ.
Before writing code:
- Search for an existing module, util, snippet, or query that already does what you need.
- If you need a new content block → it is a module; wire all 8 points or revert.
- After any schema change → run
pnpm studio:generate, thenpnpm typecheck, thenpnpm format.
Principles (priority order — apply top-down when in doubt)
- Reuse before invention. Grep
studio/schemas/objects/modules/,web/src/components/modules/,web/sanity/queries/snippets/,web/sanity/utils/first. - Pair or don't ship. A schema without its component (or vice versa) is a bug, not a partial commit.
- All 8 wiring points or revert. A partially wired module silently breaks the editor or the renderer. Atomic.
- Typegen is the source of truth for Studio types. Never hand-edit
studio/sanity.types.gen.tsorstudio/schema.json.web/sanity/types/*are hand-maintained for now — keep them aligned with schema field changes. - Locale-aware at render time, not query time. Never
coalesce(field[language=="en"]...)in GROQ. Always resolve viapickLocalizedString/parseLocalizedText. - READMEs are deep docs. Per-folder
README.mdfiles are authoritative for the local pattern — link to them, do not duplicate.
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 · 319 lines · 5,512 tokens per session scan A ac5eec698343
next-sanity-starter AGENTS.md is an instructions file published in the GitHub repository backendforth/next-sanity-starter (4 stars, last pushed 26d ago), licensed ISC. It adds 5,512 tokens to every session, about $0.0276 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-31.
Other instructions, from other repositories
intlayer CLAUDE.md
Instructions for aymericzip/intlayer, covering repo layout, commands (run from root), content declaration flow, git and commit conventions.
fastapi-react-admin CLAUDE.md
Instructions for yilecoding/fastapi-react-admin, covering claude.md, 按任务导航, 让这套文档不腐烂:pnpm ctx:check, 这套文档怎么自己长大 and 结构.
claude-code-zh-cn AGENTS.md
Instructions for taekchef/claude-code-zh-cn, covering claude-code-zh-cn, 项目结构, 数据流, 技术要点 and 维护流程规则.
tolgee-platform AGENTS.md
AGENTS.md instructions for tolgee/tolgee-platform, covering agents.md, repository structure, backend development, database migrations and backend testing.
formkind AGENTS.md
Instructions for khanhcamap2020-sudo/formkind, covering agent guide, commands and change rules.
qrcodly CLAUDE.md
Instructions for FloB95/qrcodly, covering claude.md, project overview, monorepo structure, commands and development.