Borrowing it
Nothing to install: this file belongs to backendforth/next-sanity-starter. 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/backendforth/next-sanity-starter/main/AGENTS.mdgit clone --depth 1 https://github.com/backendforth/next-sanity-starterWrote 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/backendforth/next-sanity-starter/agents-md)<a href="https://agentmods.dev/instructions/backendforth/next-sanity-starter/agents-md"><img src="https://agentmods.dev/badge/instructions/backendforth/next-sanity-starter/agents-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/backendforth/next-sanity-starter/agents-md"><img src="https://agentmods.dev/badge/instructions/backendforth/next-sanity-starter/agents-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.09015 | $0.09015 |
| Opus 5.5 | $0.03606 | $0.03606 |
| Sonnet 5.5 | $0.01803 | $0.01803 |
| Haiku 4.5 | $0.00902 | $0.00902 |
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 — 413 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. Subtree
CLAUDE.mdfiles,.cursor/rules/*.mdcand.github/copilot-instructions.mdonly point here and add local gotchas this file doesn't state — keep conventions here, not in them.
TL;DR
This is a pnpm monorepo with two apps (web Next.js 16 App Router, studio Sanity v6) 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 six places (inline use in rich text is opt-in). Multilingual content uses sanity-plugin-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;
pnpm gen:module <Name>wires all 6 points. - After any schema or query change → run
pnpm 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 6 wiring points or revert. A partially wired module silently breaks the editor or the renderer. Atomic.
- Typegen is the only source of types for Sanity data. Never hand-edit the generated files. Web types come from
defineQueryresults viaweb/sanity/types.ts(ModuleOf<"module.x">,HomeDocument, …) — never write a Sanity-shaped type by hand. - Locale-aware at render time, not query time. Never
coalesce(field[language=="en"]...)in GROQ. Always resolve viapickLocalizedString/pickLocalizedPortableTextBlocks. - 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 Changed · +9 lines · +224 tokens per session a559c33b0be5
- 15d ago Changed · +2 lines · +154 tokens per session c7998ff7264b
- 16d ago Changed · +1 lines · +54 tokens per session 9684256aba33
- 17d ago Changed · +33 lines · +620 tokens per session 519d83eb51d6
- 22d ago Changed · +32 lines · +1,742 tokens per session a63b9a3c30ec
- 23d ago Changed · +17 lines · +709 tokens per session 2dea4fc96191
- 2mo 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 2d ago), licensed ISC. It adds 9,015 tokens to every session, about $0.0361 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.
next-sanity-starter AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| next-sanity-starter AGENTS.mdbackendforth/next-sanity-starter | Instructions file | 4 | 2d ago | ISC | A | 9,015 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | 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 |