agent-toolkit: Instructions file for Codex

AGENTS.md

agent-toolkit AGENTS.md is an instructions file for Codex, OpenCode from sanity-io/agent-toolkit. It costs 2,843 tokens per session, scanned A, original, MIT.

A project guide for Sanity, a content management system for storing and editing structured website content. It lists commands for connecting AI editors, managing schemas and types, running the editor, and deploying projects.

In plain words
What is it for?
Use it when configuring Sanity access, changing content schemas, generating TypeScript types, developing the Studio, or deploying infrastructure and sites.
Why use it?
It helps coding agents choose the right Sanity command and follow the project's setup, content, and deployment process.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code.

This is sanity-io/agent-toolkit's own configuration. It tells Codex and OpenCode how to work on agent-toolkit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-toolkit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sanity-io/agent-toolkit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sanity-io/agent-toolkit/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/sanity-io/agent-toolkit

Made for: Codex, OpenCode.

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

agentmods badge for agent-toolkit AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sanity-io/agent-toolkit/agents-md/github.svg)](https://agentmods.dev/instructions/sanity-io/agent-toolkit/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sanity-io/agent-toolkit/agents-md"><img src="https://agentmods.dev/badge/instructions/sanity-io/agent-toolkit/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.

agentmods 80×15 button for agent-toolkit AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/sanity-io/agent-toolkit/agents-md"><img src="https://agentmods.dev/badge/instructions/sanity-io/agent-toolkit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,843 This file is loaded in full into every session.
When invoked 2,843 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.02843 $0.02843
Opus 5.5 $0.01137 $0.01137
Sonnet 5.5 $0.00569 $0.00569
Haiku 4.5 $0.00284 $0.00284

Measured yesterday against content hash c5a0540ac3ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-toolkit 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 yesterday.

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.

AGENTS.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sanity Project

This is a Sanity-powered project. Use the Knowledge Router below to find Sanity guidance for your task. Available as a Claude Code plugin and Cursor plugin.

Commands

# New Project Without an Account
npx sanity@latest new --instructions        # Print the current sanity.new setup guide
npx sanity@latest new "<name>" --yes        # Create an unclaimed project + Studio + Next.js scaffold
npx sanity@latest projects unclaimed        # List unclaimed projects created on this machine

# MCP Setup (account-owned or claimed projects)
npx sanity@latest mcp configure  # Configure MCP for your AI editor

# Schema & Types
npx sanity schemas deploy     # Deploy schema to Content Lake for MCP/editor access
npx sanity schemas extract    # Extract schema for TypeGen
npx sanity typegen generate  # Generate TypeScript types

# Development
npx sanity dev               # Start Studio dev server
npx sanity build             # Build Studio for production
npx sanity deploy            # Deploy Studio to Sanity hosting

# Blueprints (infrastructure as code)
npx sanity blueprints init    # Initialize a Blueprint and create a Stack
npx sanity blueprints plan    # Preview infrastructure changes (read-only)
npx sanity blueprints deploy  # Apply the Blueprint to the Stack
npx sanity blueprints info    # Verify Stack status and deployed resources
npx sanity blueprints logs    # View Stack deployment logs

# Help
npx sanity docs search "query"  # Search Sanity documentation
npx sanity --help               # List all CLI commands

Knowledge Router

If the Sanity MCP server (https://mcp.sanity.io) is available, use list_sanity_rules and get_sanity_rules to load always up-to-date rules on demand. Otherwise, use the table below to find local reference files.

For the full reference index, see skills/sanity-best-practices/SKILL.md.

Topic Trigger Keywords Reference
Onboarding start, setup, init, new project, no account, sanity new, sanity.new skills/sanity-best-practices/references/get-started.md
Project Structure structure, monorepo, embedded studio, file naming skills/sanity-best-practices/references/project-structure.md
Schema schema, model, document, field, defineType skills/sanity-best-practices/references/schema.md
Deprecation deprecate, remove field, legacy, migration skills/sanity-best-practices/references/schema.md
Migration / Replatforming migrate, migration, replatform, AEM, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, WXR, CMS export, database dump skills/sanity-migration/SKILL.md
Markdown Import markdown, mdx, frontmatter, static content, README import, markdown files skills/sanity-migration/references/markdown.md
HTML / Portable Text Import html, portable text import, block-tools, htmlToBlocks skills/sanity-best-practices/references/migration.md
Next.js next.js, app router, server component, fetch skills/sanity-best-practices/references/nextjs.md
Nuxt nuxt, vue, nuxt.js skills/sanity-best-practices/references/nuxt.md
Angular angular, signals, resource api skills/sanity-best-practices/references/angular.md
Astro astro, islands skills/sanity-best-practices/references/astro.md
Remix/React Router remix, react router, loader skills/sanity-best-practices/references/remix.md
Svelte svelte, sveltekit, kit skills/sanity-best-practices/references/svelte.md
Visual Editing stega, visual editing, clean, overlay, presentation, usePresentationQuery skills/sanity-best-practices/references/visual-editing.md
Page Builder page builder, pageBuilder, block component, alignment, switch render skills/sanity-best-practices/references/page-builder.md
Rich Text portable text, rich text, block content, serializer, PTE, marks, annotations skills/sanity-best-practices/references/portable-text.md
Images image, urlFor, crop, hotspot, lqip skills/sanity-best-practices/references/image.md
Studio Structure structure, desk, sidebar, singleton, grouping skills/sanity-best-practices/references/studio-structure.md
Singletons singleton, document.singletons, defineSingleton, settings document, sanity-plugin-singleton-management skills/sanity-singletons/SKILL.md
Form Component Suspense custom input, components.input, components.field, components.item, form.components, Suspense, suspended without a <Suspense> boundary, React.lazy, layout shift skills/sanity-form-component-suspense/SKILL.md
Studio Listeners listener, listenQuery, documentStore.listenQuery, client.listen, useListeningQuery, useValidationStatus, useDocumentPairPermissions, unstable_observeDocument, real-time, live data, Trying to connect, EventSource, too many tabs skills/sanity-studio-listeners/SKILL.md
Localization i18n, translation, localization, language, multilingual, localized singleton skills/sanity-best-practices/references/localization.md
SEO seo, metadata, sitemap, og image, open graph, json-ld, redirect skills/sanity-best-practices/references/seo.md
Shopify/Hydrogen shopify, hydrogen, e-commerce, storefront, sanity connect skills/sanity-best-practices/references/hydrogen.md
GROQ groq, query, defineQuery, projection, filter, order skills/sanity-best-practices/references/groq.md
TypeGen typegen, typescript, types, infer, satisfies, type generation skills/sanity-best-practices/references/typegen.md
App SDK app sdk, custom app, useDocuments, useDocument, DocumentHandle, SanityApp, sdk-react skills/sanity-best-practices/references/app-sdk.md
Dashboard dashboard, defineApplication, init --dashboard, sdk-react/dashboard, deployment.appId, app visibility, deploy --external, bridge.js, hide in dashboard skills/sanity-best-practices/references/dashboard.md
Blueprints blueprints, IaC, infrastructure, stack, defineBlueprint, sanity.blueprint.ts, blueprints deploy skills/sanity-best-practices/references/blueprints.md
Sanity Functions & Webhooks functions, webhook, serverless, event handler, documentEventHandler, defineDocumentFunction, sanity.blueprint.ts skills/sanity-best-practices/references/functions.md

Read the full file on GitHub · 165 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. yesterday Changed · +5 lines · +89 tokens per session c5a0540ac3ad
  2. 10d ago Changed · +14 tokens per session 1893d9194a7b
  3. 12d ago Changed · +1 lines · +84 tokens per session 5dd86583d8d2
  4. 1mo ago Changed · +1 lines · +67 tokens per session b5da76a4a5f1
  5. 1mo ago Changed · +1 lines · +43 tokens per session 542ef6a3c811
  6. 1mo ago Changed · +1 lines · +46 tokens per session a30da9b06be8
  7. 3mo ago First seen · 156 lines · 2,500 tokens per session scan A 214852505f4e

Subscribe to this mod's changes

agent-toolkit AGENTS.md is an instructions file published in the GitHub repository sanity-io/agent-toolkit (203 stars, last pushed yesterday), licensed MIT. It adds 2,843 tokens to every session, about $0.0114 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-30.

Related

agent-toolkit AGENTS.md compared with instructions from other repositories

agent-toolkit AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-toolkit AGENTS.mdsanity-io/agent-toolkitInstructions file203yesterdayMITA2,843Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,951Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109kyesterdayMITA3,077GitHub Copilot