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 rules/backendforth/next-sanity-starter/schemasgit 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.00000 | $0.00384 |
| Opus 5 | $0.00000 | $0.00192 |
| Sonnet 5 | $0.00000 | $0.00077 |
| Haiku 4.5 | $0.00000 | $0.00038 |
Grade A, and why
schemas 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.
What it actually says
Sanity Studio v5. Schemas live under studio/schemas/. Indent 2 spaces, double quotes.
Hard rules:
- A new type is invisible until exported and added to
schemaTypesinstudio/schemas/index.ts. - New document types also need a structure item under
studio/config/structure/items/and registration instudio/config/structure/index.ts. The sidebar does NOT auto-populate from schemas. - Routable types must be wired into Presentation:
studio/config/presentation/conventions.ts(SLUG_BASED_DOCUMENT_TYPES,SITE_ROOT_DOCUMENT_TYPES,DOCUMENT_TYPES_WITHOUT_WEB_PREVIEW) andresolve.ts/locationsResolver.ts. - Internally linkable types go into
studio/schemas/constants/references.ts(PAGE_REFERENCES). - Translatable fields use
internationalizedArrayString/internationalizedArrayRichText/internationalizedArrayRichTextMedia— never plainstringfor translatable content. - Slug fields use
validateSlugfromstudio/utils/validateSlug.ts. - Reuse
media.image,media.video,media.videoLoopfromstudio/schemas/objects/media/.
After every schema edit:
pnpm studio:generate
git add studio/schema.json studio/sanity.types.gen.ts
pnpm typecheck
CI rejects any uncommitted gen diff.
NEVER edit:
studio/sanity.types.gen.tsstudio/schema.json- Anything under
studio/.sanity/
Languages come from the siteLanguageSettings singleton — add new languages there, not in source. web/src/i18n/fallbackSiteLocales.ts is the offline fallback only.
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 · 37 lines · 0 tokens per session scan A f5416dad19e1
schemas is a cursor rule published in the GitHub repository backendforth/next-sanity-starter (4 stars, last pushed 26d ago), licensed ISC. It costs nothing until one of its globs matches a file; then it loads 384 tokens. 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 cursor rules, from other repositories
specify-rules
For additional context about technologies to be used, project structure, shell commands, and other important information, read the current plan: specs/001-react-profiler-mcp-bridge/plan.md (and linked research.md, data-model.md, contracts/, quickstart.md in that directory).
docs
This file provides guidelines for working with the documentation in the /docs directory.
middleware-auth
Next.js middleware auth — prevents auth logic being placed in middleware instead of route handlers.
stripe-payments
Stripe payment integration patterns — server-only, webhook handling.
supabase-ssr-only
Supabase SSR package enforcement and cookie handling.
javascript-typescript-code-style
Rules for JavaScript and TypeScript code style, including modern features, functional patterns, and descriptive naming conventions.