mast-sanity: Skill for Claude Code

.claude/skills/sanity-best-practices/SKILL.md

sanity-best-practices is a skill for Claude Code from CoreyMoen/mast-sanity. It costs 160 tokens per session (944 once invoked), scanned A, a copy of sanity-best-practices, MIT.

A set of practical guidelines for building applications with Sanity, a content management system for structured website content.

In plain words
What is it for?
Sanity schemas, GROQ queries, TypeScript types, live previews, images, rich text, localization, migrations, and framework integrations.
Why use it?
It helps avoid common mistakes when designing content, querying it, connecting Sanity to a frontend, or maintaining a project.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is CoreyMoen/mast-sanity's own configuration. It tells Claude Code how to work on mast-sanity itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mast-sanity configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CoreyMoen/mast-sanity. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/CoreyMoen/mast-sanity/main/.claude/skills/sanity-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/CoreyMoen/mast-sanity

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sanity-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/coreymoen/mast-sanity/sanity-best-practices/github.svg)](https://agentmods.dev/skills/coreymoen/mast-sanity/sanity-best-practices)
Your own site
<a href="https://agentmods.dev/skills/coreymoen/mast-sanity/sanity-best-practices"><img src="https://agentmods.dev/badge/skills/coreymoen/mast-sanity/sanity-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sanity-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/coreymoen/mast-sanity/sanity-best-practices"><img src="https://agentmods.dev/badge/skills/coreymoen/mast-sanity/sanity-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 944 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00160 $0.00944
Opus 5 $0.00080 $0.00472
Sonnet 5 $0.00032 $0.00189
Haiku 4.5 $0.00016 $0.00094

Measured 11d ago against content hash 0c214846486b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

sanity-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to sanity-best-practices — 13 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/sanity-best-practices/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sanity Best Practices

Comprehensive best practices and integration guides for Sanity development, maintained by Sanity. Use the quick reference below to load only the one or two topic files that match the task.

When to Apply

Reference these guidelines when:

  • Setting up a new Sanity project or onboarding
  • Integrating Sanity with a frontend framework (Next.js, Nuxt, Astro, Remix, SvelteKit, Hydrogen)
  • Writing GROQ queries or optimizing performance
  • Designing content schemas
  • Implementing Visual Editing and live preview
  • Working with images, Portable Text, or page builders
  • Configuring Sanity Studio structure
  • Setting up TypeGen for type safety
  • Implementing localization
  • Migrating content from other systems
  • Building custom apps with the Sanity App SDK
  • Managing infrastructure with Blueprints
  • Automating content workflows with Sanity Functions

Global Rules

  • Let Sanity generate _id values for ordinary documents. Do not create deterministic UUIDs, slug-derived IDs, or legacy-system IDs when creating documents.
  • Model relationships with reference fields, then resolve related documents with GROQ lookups, source-key fields, or returned _id values from created documents.
  • Use explicit document IDs mainly for singleton documents controlled by Studio Structure, including localized singletons such as homePage-en.

Quick Reference

Integration Guides

  • get-started - Interactive onboarding for new Sanity projects
  • nextjs - Next.js App Router, Live Content API, standalone Studio
  • nuxt - Nuxt integration with @nuxtjs/sanity
  • angular - Angular integration with @sanity/client, signals, resource API
  • astro - Astro integration with @sanity/astro
  • remix - React Router / Remix integration
  • svelte - SvelteKit integration with @sanity/svelte-loader
  • hydrogen - Shopify Hydrogen with Sanity
  • project-structure - Standalone Studio and monorepo patterns
  • app-sdk - Custom applications with Sanity App SDK
  • blueprints - Infrastructure as Code: blueprint files, stacks, plan/deploy workflow, error recovery, CI deploys
  • functions - Automating content workflows with Sanity Functions

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 80 lines · 160 tokens per session scan A 0c214846486b

Subscribe to this mod's changes

sanity-best-practices is a skill published in the GitHub repository CoreyMoen/mast-sanity (23 stars, last pushed 9d ago), licensed MIT. It adds 160 tokens to every session and 944 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to sanity-best-practices, differing in 13 lines, and is treated as a copy.

Related

Other skills, from other repositories

heygen

Prepare guarded HeyGen Direct API requests for avatar video generation, video translation, asset discovery, and status polling.

HybridAIOne/hybridclaw · 25 tokens

webiny-v5-to-v6-migration

Migration patterns for converting v5 Webiny code to v6 architecture. Use this skill when migrating existing v5 plugins to v6 features, converting context plugins to DI services, adapting v5 event subscriptions to v6 EventHandlers, or understanding how v5 patterns translate to v6. Targeted at AI agents performing…

webiny/webiny-js · 75 tokens

contentful-cms

Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content.

monkilabs/opencastle · 46 tokens

backend-internationalization

Use this skill when implementing multi-language support, translation workflows, or locale-aware formatting. This skill enforces: BCP 47 locale tags, ICU MessageFormat for complex messages, dot-separated namespaced keys, fallback chains, and CI-validated translation files. Applies to any backend stack serving…

j4flmao/agent-skills · 86 tokens

polylang-rest-headless

Build or audit REST and headless integrations with Polylang 3.8.5, Polylang Pro 3.8.5, and Polylang for WooCommerce 2.2.2. Covers REST lang parameter behavior, pll/v1 languages, filterable REST routes, Pro lang/translations REST fields, pllrestapiposttypes and pllrestapitaxonomies 3.8 format, pll/v1/translation and…

Lonsdale201/wp-agent-skills · 150 tokens

hebrew-chatbot-builder

Build conversational AI chatbots with native Hebrew support, including WhatsApp Business API integration, Telegram bot scaffolding, web chat widgets, Hebrew NLP patterns, and RTL chat UI components. Prevents common Hebrew chatbot mistakes like broken RTL alignment, incorrect gender inflections, and poor tokenization…

skills-il/developer-tools · 155 tokens