New advertisers: 50% off your first month with code FIRSTMONTHSee slots
sanity-io avatar

Sanity Best Practices

Comprehensive Sanity development guidance covering schemas, GROQ, Visual Editing, Studio structure, and framework integrations.

skills.sh installs
34.5K
GitHub stars
201
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, localization, and migrations for Sanity projects
  • Includes integration guides for Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, the App SDK, and Dashboard apps
  • Enforces rules such as letting Sanity generate _id values and avoiding file assets for production video playback
  • Designed for developers building, reviewing, or fixing Sanity Studios and Sanity-powered frontends

Install

$ npx -y skills add sanity-io/agent-toolkit --skill sanity-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/sanity-io/agent-toolkit
Categories
Frontend & UI Code, Backend & APIs

More from sanity-io/agent-toolkit

All 7

Similar to Sanity Best Practices

More Frontend & UI Code