
Sanity Best Practices
This is the official Sanity reference covering everything from schema design and GROQ queries to framework integrations with Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, and Hydrogen. It includes practical guides on Visual Editing, Portable Text, image optimization, TypeGen, localization, migrations, and newer features like Sanity Functions and Blueprints for infrastructure as code. The structure is smart: each topic gets its own reference file with correct and incorrect examples, so you can load just what you need rather than dumping everything into context. Especially useful when you're setting up a new project, debugging GROQ performance, or implementing live preview setups.
- skills.sh installs
- 33.7K
- GitHub stars
- 197
- last updated
- Aug 21, 2026
Install
$ npx -y skills add sanity-io/agent-toolkit --skill sanity-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Sanity Best Practices
Comprehensive best practices and integration guides for Sanity development, maintained by Sanity. Use the quick reference below to load only the one or two topic files that match the task.
When to Apply
Reference these guidelines when:
- Setting up a new Sanity project or onboarding
- Integrating Sanity with a frontend framework (Next.js, Nuxt, Astro, Remix, SvelteKit, Hydrogen)
- Writing GROQ queries or optimizing performance
- Designing content schemas
- Implementing Visual Editing and live preview
- Working with images, Portable Text, or page builders
- Configuring Sanity Studio structure
- Setting up TypeGen for type safety
- Implementing localization
- Migrating content from other systems
- Building custom apps with the Sanity App SDK
- Developing or deploying a Studio or app in the Sanity Dashboard
- Managing infrastructure with Blueprints
- Automating content workflows with Sanity Functions or webhooks
Global Rules
Sponsors