CtrlK
BlogDocsLog inGet started
Tessl Logo

sanity-best-practices

Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this skill whenever working with Sanity schemas, defineType or defineField, GROQ or defineQuery, content modeling, Presentation or preview setups, Sanity-powered frontend integrations, event-driven content automation, documentEventHandler, defineDocumentFunction, defineMediaLibraryAssetFunction, @sanity/functions, @sanity/blueprints, sanity.blueprint.ts, event-driven content automation, or when reviewing and fixing a Sanity codebase.

67

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

65%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured overview that excels at progressive disclosure, pointing cleanly to a deep reference bundle. It is weaker on inline actionability and workflow sequencing, deferring most executable detail to the reference files.

Suggestions

Add one or two short executable code snippets (e.g. a minimal defineType schema or a basic GROQ query) directly in the body so common tasks are actionable without opening a reference file.

Tighten or prune the 'When to Apply' list, which largely duplicates the frontmatter description and adds token cost without new trigger information.

For the most common multi-step flows (e.g. adding TypeGen, or a migration), include a brief numbered sequence with a verification step so workflow clarity is explicit rather than implied.

DimensionReasoningScore

Conciseness

The body is a lean overview with no padding about what Sanity or libraries are, though the 'When to Apply' list substantially restates the description and the Video/Global Rules sections add detail that borders on reference-level content.

4 / 5

Actionability

Some concrete specifics appear (defineVideoField(), @mux/mux-player-react, reference to _id generation rules), but most guidance is navigational ('see references/groq.md') rather than executable inline code or commands, leaving key details in the bundle.

3 / 5

Workflow Clarity

'How to Use' gives a clear single starting heuristic (load the one matching guide, expand only if concerns cross), but there is no multi-step sequenced workflow with validation checkpoints; acceptable for an overview skill but checkpoints are implicit.

3 / 5

Progressive Disclosure

Clear overview with a well-signaled Quick Reference map to 25 one-level-deep reference files, content appropriately split, and easy navigation via per-file one-line descriptions.

5 / 5

Total

15

/

20

Passed

Description

95%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, specific description that clearly states both capabilities and explicit trigger conditions, with rich natural and technical keyword coverage. Slight specificity deduction because it lists domains rather than concrete action verbs.

DimensionReasoningScore

Specificity

Enumerates many concrete Sanity domains and actions (schema design, GROQ queries, TypeGen, migrations, webhooks, Blueprints) with comprehensive coverage, but frames them as domain areas rather than explicit verbs, leaving minor gaps versus the 'multiple specific concrete actions' anchor.

4 / 5

Completeness

Explicitly answers 'what' (best practices across the listed Sanity domains) and 'when' via a concrete 'Use this skill whenever working with... or when reviewing and fixing a Sanity codebase' trigger clause.

5 / 5

Trigger Term Quality

Comprehensive coverage of both natural phrases ('Sanity schemas', 'content modeling', 'reviewing and fixing a Sanity codebase') and technical markers (defineType, defineQuery, documentEventHandler, @sanity/functions, sanity.blueprint.ts), including synonyms and API surface terms.

5 / 5

Distinctiveness Conflict Risk

Tightly scoped to Sanity-specific triggers (defineField, GROQ, @sanity/blueprints, Studio structure) creating a clear niche with minimal overlap risk against non-Sanity skills.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
sanity-io/agent-toolkit
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.