sanity-best-practices Skill (Sanity) for Claude: Sanity Development Guides and How to Install It
Gives Claude Sanity's own best-practice guides for schemas, GROQ queries, Visual Editing and framework setups, for developers building on Sanity.
- Installs
- 32.7K
- on skills.sh
- Stars
- 194
- on GitHub
- Files
- 25
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
sanity-best-practices is Sanity's own skill for working on Sanity projects. SKILL.md is a short index. Claude loads one or two of 25 reference guides that match your task, such as GROQ, schema design, Next.js, Visual Editing, Portable Text, TypeGen, localization or Sanity Functions. SKILL.md says it is maintained by Sanity.
It triggers when you work with Sanity schemas, GROQ, Presentation or preview setups, or Sanity-powered frontends. Say "Get started with Sanity" and the get-started guide walks you through Studio, schema, content and frontend. The guides run commands such as npx sanity@latest, so the skill needs Node.js. It sits in Sanity's own sanity-io/agent-toolkit repo.
Good for
- Developers building a Sanity Studio and content schema
- Frontend teams connecting Sanity to Next.js, Nuxt, Astro, Remix, SvelteKit, Angular or Hydrogen
- Teams adding Sanity Functions, Blueprints or the App SDK
Install sanity-best-practices
Claude Code
- 1
Copy this prompt.
Install the sanity-best-practices skill in Claude Code. Run this command: /plugin install sanity@claude-plugins-official Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Claude Code.
The plugin bundles 10 skills, 4 slash commands (/sanity, /sanity-review, /typegen, /deploy-schema) and the Sanity MCP server at mcp.sanity.io, which signs in with OAuth. Run /reload-plugins afterwards. The skills CLI route installs only this skill.
From the project README. Source.
What's in the skill
When it loads
Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, the App SDK, and Studios or apps running in the Sanity Dashboard (defineApplication). Use this skill whenever working with Sanity schemas, defineType or defineField, GROQ or defineQuery, content modeling, Presentation or preview setups, Sanity-powered frontend integrations, event-driven content automation, documentEventHandler, defineDocumentFunction, defineMediaLibraryAssetFunction, @sanity/functions, @sanity/blueprints, sanity.blueprint.ts, event-driven content automation, or when reviewing and fixing a Sanity codebase.
Sections in SKILL.md
- When to Apply
- Global Rules
- Video
- Quick Reference
- Integration Guides
- Topic Guides
- How to Use
Key facts
- Installs on skills.sh
- 32,672 (Nov 2, 2026)
- GitHub stars
- 194 for the whole repo (Nov 2, 2026)
- Last commit
- Oct 27, 2026
What it includes
Let Sanity generate document IDs; use references for relationships
Explicit IDs are mainly for singleton documents controlled by Studio structure.
Global rulesDo not serve production video from Sanity file assets
SKILL.md warns of very high bandwidth bills and points to Media Library on Enterprise with the video add-on, or Mux, YouTube or Vimeo.
Video rule"Get started with Sanity" runs a Studio, content and frontend setup guide
It can run `npx sanity@latest new` or `init`, create files, and deploy schemas. You can pause and say "Continue Sanity setup" later.
Write ·
Get startedNext.js, Nuxt, Astro, Remix, SvelteKit, Angular and Hydrogen
Eight guides including project-structure, with install commands and incorrect-versus-correct code examples.
Read ·
Framework guidesGROQ, schema, Visual Editing, Portable Text, images, TypeGen, SEO and more
Twelve guides including page-builder, studio-structure, localization and two migration guides.
Read ·
Topic guidesCustom apps and Studios running in the Sanity Dashboard
The guides include `sanity deploy` and init commands, plus document actions such as unpublish and delete.
Write ·
App SDK and DashboardInfrastructure as code: plan, deploy and destroy stacks
The guide warns that removing a resource from the file destroys it on the next deploy.
Write ·
BlueprintsEvent-driven content automation with Sanity Functions and webhooks
Covers adding, testing locally and deploying functions, and setting their secrets.
Write ·
Functions
From the official docs
Permissions
Medium risk
The skill is mostly guidance, but its guides tell Claude to run Sanity CLI commands that create projects, deploy schemas and destroy resources. Check each command and its target project before you approve it.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
Its guides run Sanity CLI commands that deploy
The guides tell Claude to run npx sanity@latest for init, schemas deploy, deploy and blueprints deploy. Read each command before you approve it, and check which project and dataset it targets. github.com
Blueprints can destroy resources
The blueprints guide says removing a resource from the file destroys it on the next deploy, and that `blueprints destroy` removes the stack. Its `--force` option skips the confirmation. Run `blueprints plan` first. github.com
It can create a Sanity project without an account
The get-started guide runs `sanity new`, which creates a working project you must claim within 72 hours. It tells Claude to treat the claim link and robot token as secrets. github.com
It handles tokens and secrets
The guides use SANITY_API_READ_TOKEN, a CI deploy token minted with `blueprints mint-deploy-token`, and function secrets. Keep them in environment variables or CI secrets, as the guides say, not in committed files. github.com
The plugin route adds a Sanity MCP server
The Sanity plugin also installs 9 other skills, 4 commands and an MCP server at mcp.sanity.io. Its tools can create, patch, publish and unpublish documents. Its image tools use Sanity AI credits. github.com
Technical details
| Turning on read-only | No read-only mode. The skill is mostly guidance, and its commands act on the project you point them at. |
|---|---|
| Talks to | mcp.sanity.io |
| Sign-in and keys | The skill stores nothing itself. The Sanity CLI uses your logged-in Sanity user, and the guides use environment variables for tokens. |
| Scopes |
|
Questions
What does sanity-best-practices do?
It gives Claude Sanity's own guides for building on Sanity. Claude reads the one or two guides that match your task, such as GROQ, schema design, Visual Editing, TypeGen or a framework setup.
Is it made by Sanity?
Yes. SKILL.md says it is maintained by Sanity, and it sits in Sanity's own sanity-io/agent-toolkit repo. The repo's plugin manifest lists Sanity as author.
How do I install sanity-best-practices?
Use the install box above. In Claude Code the Sanity plugin installs from the official marketplace and also adds the Sanity MCP server. The skills CLI route installs only this skill.
How do I start a new Sanity project with it?
Say "Get started with Sanity". The guide checks for an existing Studio, then walks through the Studio and schema, content, and the frontend. Say "Continue Sanity setup" to resume.
Does it need a Sanity account or API key?
The skill itself names no key. The guides use your logged-in Sanity CLI user, and sanity new can start a project without an account that you claim within 72 hours. Visual Editing guides use a read token you create.
Does it work in the Claude app or Codex?
There is no Claude app upload tab, because the guides run npx sanity commands in your project. The README documents a Codex plugin and lists Cursor, VS Code, Lovable, v0, Replit and OpenCode among supported clients.
Is sanity-best-practices safe?
The skill bundles no scripts, but its guides tell Claude to run Sanity CLI commands that can deploy schemas and destroy Blueprint resources. Check each command and its target project before you approve it.
sanity-best-practices vs the Sanity MCP server?
The skill teaches Claude how to build on Sanity. The MCP server, covered at /mcp/sanity, lets Claude read and change content in your projects. The Sanity plugin installs both.
sanity-best-practices vs sanity-migration?
Use sanity-migration to move content from another CMS into Sanity. sanity-best-practices has two short migration guides, and sanity-migration tells Claude to use it for deeper Sanity implementation work.
Information
updated Nov 2, 2026
- Repository
- sanity-io/agent-toolkit
- Folder
skills/sanity-best-practices
Sources
Docs, issue trackers and discussions this page is built from.
Show all 10Hide
- sanity-io/agent-toolkit README · github.com
- marketplace.json · github.com
- sanity-migration SKILL.md · github.com
- SKILL.md · github.com
- get-started.md · github.com
- sanity plugin.json · github.com
- skills.sh listing · skills.sh
- blueprints.md · github.com
- functions.md · github.com
- .mcp.json · github.com