src/orchestrator/plugins/sanity/SKILL.md
Manages Sanity CMS schemas, GROQ queries, dataset exports/imports, and Studio configuration. Use when updating Sanity schemas, running GROQ or Vision queries, exporting datasets, modifying content models, or configuring a headless CMS with Sanity.io.
npx skillsauth add etylsarin/opencastle sanity-cmsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generic Sanity CMS development methodology. For project-specific configuration, schemas, plugins, document types, and GROQ examples, see sanity-config.md.
get_schema to understand document types and field structures before writing GROQ queriesdefineType and defineField patterns — always use Sanity helpers for type safety and consistencydrafts. prefix when querying or mutating documentsFetch published articles with authors populated:
*[_type == "article" && defined(publishedAt)] | order(publishedAt desc) {
_id,
title,
"author": author-> { name, _id },
body
}
Filter by tag and return first 10:
*[_type == "article" && "tech" in tags[]] | order(_createdAt desc)[0..9] { title, slug }
// schemas/article.js
import { defineType, defineField } from 'sanity'
export default defineType({
name: 'article',
title: 'Article',
type: 'document',
fields: [
defineField({ name: 'title', type: 'string', title: 'Title' }),
defineField({ name: 'slug', type: 'slug', options: { source: 'title' } }),
defineField({ name: 'author', type: 'reference', to: [{ type: 'author' }] }),
defineField({ name: 'body', type: 'array', of: [{ type: 'block' }] }),
],
})
sanity start to surface schema errors locally.sanity dataset export and sanity dataset import into a temporary dataset and run queries.development
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, and smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, and flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, and defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting a delegation session, running a multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves and restores session state including task progress, file changes, and delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.