sanity-best-practiceslisted
Install: claude install-skill arndvs/ctrlshft
# Sanity Best Practices
Output "Read Sanity Best Practices skill." to chat to acknowledge you read this file.
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 working with: schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, Blueprints, or framework integrations (Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, App SDK). Triggered by: `defineType`, `defineField`, `defineQuery`, content modeling, Presentation/preview setups, `documentEventHandler`, `defineDocumentFunction`, `defineMediaLibraryAssetFunction`, `@sanity/functions`, `@sanity/blueprints`, `sanity.blueprint.ts`, event-driven content automation, or reviewing a Sanity codebase. More specifically, 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