Sanity GROQ Assistant

•
37
•

Writes, optimizes, and debugs GROQ queries for Sanity CMS with a focus on performance, security, and type safety.

The Sanity GROQ Assistant is a specialized Claude Code skill designed to streamline the process of querying Sanity CMS data. It helps developers draft efficient queries using industry best practices such as explicit projections, parameterized filters, and the defineQuery utility. By enforcing syntax highlighting and Sanity TypeGen compatibility, this skill ensures that queries are not only performant but also fully integrated into modern TypeScript workflows, reducing runtime errors and improving developer productivity.

主な機能

0137 GitHub stars
02Seamless Sanity TypeGen integration for end-to-end type safety.
03Automated GROQ query generation using defineQuery and syntax highlighting.
04Performance optimization by enforcing explicit projections over naked fetches.
05Security enhancements via parameterized queries to prevent injection vulnerabilities.
06Expert debugging and refactoring for complex GROQ expressions and expansions.

ユースケース

01Optimizing data fetching to reduce payload size and improve frontend performance.
02Generating type-safe queries for specific Sanity document schemas.
03Refactoring legacy string-interpolated queries into secure parameterized versions.