CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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, the App SDK, and Studios or apps running in the Sanity Dashboard (defineApplication). 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.

Quality

87%

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

78%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.

The body is a well-structured router that practices what it preaches: near-zero token waste, concrete inline rules for cross-cutting concerns (document IDs, video), and flawless one-level-deep reference navigation with every referenced file verified real. Its limitations are the duplicated topic list, the absence of any inline code snippet for the most common tasks, and no disambiguation rule for multi-guide requests.

Suggestions

Merge "When to Apply" into the "Quick Reference" (or replace its bullets with the matching file stems) — the topic list currently appears twice, costing tokens without adding routing signal.

Add one small inline snippet for the highest-frequency action (e.g., a minimal defineType/defineField example or a one-line GROQ query) so the most common guidance is actionable before loading a reference file.

Extend "How to Use" with a disambiguation rule for requests matching multiple guides (e.g., prefer the framework guide for integration setup and the topic guide for content modeling).

DimensionReasoningScore

Conciseness

The ~85-line body is lean with no padding and no explanations of concepts Claude already knows (the Video section's cost rationale is justified, not fluff), but the topic set is listed twice — "When to Apply" (14 bullets) substantially duplicates the "Quick Reference" (25 entries) — so some tokens do not earn their place.

4 / 5

Actionability

Global Rules and the Video section give concrete directives with real identifiers ("defineVideoField() from sanity/media-library", "@mux/mux-player-react", "sanity-plugin-mux-input", singleton pattern "homePage-en"), and every Quick Reference entry carries a routing description, but the body contains no executable code or commands of its own.

4 / 5

Workflow Clarity

"How to Use" gives a clear sequence with an explicit extension condition ("Start with the single framework or topic guide that best matches the request, then read additional references only when the task crosses concerns"), and the single routing action is largely unambiguous; the minor gap is no guidance for requests that match several guides equally or none.

4 / 5

Progressive Disclosure

Textbook progressive disclosure: the body is a pure index while all detail lives in one-level-deep references/ files — all 25 Quick Reference stems verified to exist with substantive content (frontmatter, incorrect/correct code examples), and paths are clearly signaled via the stem list plus the explicit "references/groq.md" examples.

5 / 5

Total

17

/

20

Passed

Description

91%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.

An exemplary description: explicit what-and-when structure, comprehensive natural trigger terms including API identifiers and file names, and a clearly Sanity-scoped niche. The only flaws are minor — a single generic action verb softened by the framework-name list, and the phrase "event-driven content automation" appearing verbatim twice.

DimensionReasoningScore

Specificity

Names dozens of concrete topic areas ("schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints") with comprehensive coverage, but the only action layer is the single generic verb phrase "development best practices for", unlike the multiple distinct concrete actions in the top anchor.

4 / 5

Completeness

Explicitly answers both parts: a clear "what" ("Sanity development best practices for..." with a comprehensive topic list) followed by an explicit "Use this skill whenever working with Sanity schemas, defineType or defineField, ... or when reviewing and fixing a Sanity codebase" enumerating a dozen concrete triggers.

5 / 5

Trigger Term Quality

Covers natural terms users would say (Sanity, GROQ, schema, Portable Text, Next.js, webhooks, localization, migrations) plus API identifiers (defineType, documentEventHandler), package names (@sanity/functions, @sanity/blueprints), and even a filename (sanity.blueprint.ts), with synonyms like "GROQ or defineQuery" and "Presentation or preview setups".

5 / 5

Distinctiveness Conflict Risk

Triggers are tightly Sanity-anchored ("Sanity schemas", "Sanity-powered frontend integrations", "reviewing and fixing a Sanity codebase", GROQ, @sanity/blueprints), but the unqualified framework names ("Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen") create minor overlap risk with dedicated per-framework skills.

4 / 5

Total

18

/

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

Path

skills/sanity-best-practices/SKILL.md

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.