sanity-best-practices

Consolidate Sanity best practices for schemas, GROQ queries, and Studio configuration.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/rieckt/create-loumi-app --skill sanity-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sanity-best-practices
Source: https://github.com/rieckt/create-loumi-app/tree/main/template/skills/sanity/sanity-best-practices
Command: npx skills add https://github.com/rieckt/create-loumi-app --skill sanity-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill consolidates Sanity best practices to help teams design robust schemas, optimize GROQ queries, and enhance the Studio/editor experience, reducing technical debt and rework.

Core Features & Use Cases

  • GROQ performance guidance: efficient query patterns and indexing strategies.
  • Schema design: data-focused modeling, localization options, and migration-friendly structures.
  • Visual Editing and Portable Text: best practices for editor UX and content rendering.
  • Use Case: apply these guidelines when building a Sanity-based site with complex content types and localization.

Quick Start

Review your current Sanity setup and align schemas, queries, and Studio configuration with the recommended patterns in this guide.

Frequently Asked Questions about sanity-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize GROQ queries for large Sanity datasets?

To optimize GROQ queries for large Sanity datasets, apply efficient query patterns and indexing strategies. Restructuring your data access logic reduces query latency and significantly improves overall content fetching performance.

What is the best way to design migration-friendly Sanity schemas?

The best way to design migration-friendly Sanity schemas is to prioritize data-focused modeling during initial schema design. Structuring content types carefully minimizes technical debt and reduces the need for complex migrations later.

How do I configure Sanity Studio for better visual editing and Portable Text UX?

Configuring Sanity Studio for better visual editing involves applying Portable Text best practices to the editor UX. Properly structuring custom block content ensures a smoother editor experience and accurate content rendering.

How should I handle localization in Sanity content models?

Handle localization in Sanity content models by evaluating available localization options during schema design. Aligning your content modeling approach with localization requirements ensures scalable multi-language content delivery.

Can I use these Sanity best practices for complex content types and scalable apps?

Yes, you can apply these Sanity best practices when building scalable apps with complex content types. The guidelines specifically target robust schema design and query optimization to support fast, high-performance content platforms.