sanity-cms

sanity-cms is a skill for Claude Code, Codex from monkilabs/opencastle. It costs 40 tokens per session (390 once invoked), scanned A, original, MIT.

A content-management guide for Sanity, a system for storing structured website content and editing it in a studio. It covers content schemas, GROQ queries, datasets, and Studio configuration.

In plain words
What is it for?
Use it to define content types, write and validate GROQ queries, work with drafts and references, export datasets, and configure Sanity Studio.
Why use it?
It helps prevent queries that silently return empty results and protects unpublished content from being missed or overwritten. It also keeps schema changes and content queries consistent with the project's source files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define content types, write and validate GROQ queries, work with drafts and references, export datasets, and configure Sanity Studio.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monkilabs/opencastle/sanity-cms
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add monkilabs/opencastle --skill sanity-cms
Clone the repo
git clone --depth 1 https://github.com/monkilabs/opencastle

Made for: Claude Code, Codex.

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-cms

README.md
[![agentmods](https://agentmods.dev/badge/skills/monkilabs/opencastle/sanity-cms/github.svg)](https://agentmods.dev/skills/monkilabs/opencastle/sanity-cms)
Your own site
<a href="https://agentmods.dev/skills/monkilabs/opencastle/sanity-cms"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/sanity-cms/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-cms

Your own site · 80×15
<a href="https://agentmods.dev/skills/monkilabs/opencastle/sanity-cms"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/sanity-cms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 390 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 original No closer match found 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.00040 $0.00390
Opus 5.5 $0.00016 $0.00156
Sonnet 5.5 $0.00008 $0.00078
Haiku 4.5 $0.00004 $0.00039

Measured 1mo ago against content hash 488ece027a09, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sanity-cms 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 1mo 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.

src/orchestrator/plugins/sanity/skills/sanity-cms/SKILL.md · 27 lines

What it actually says

Sanity CMS

Project config, schemas, plugins, document types, and GROQ examples: .opencastle/stack/sanity-config.md. Docs: https://www.sanity.io/docs

Rules that prevent silent failures

  1. Call get_schema before writing any GROQ. Field names and shapes are not guessable from the frontend code.
  2. Check array vs single reference. author-> on an array field (or author[]-> on a single one) returns null with no error — the query just yields empty data.
  3. Account for the drafts. prefix. Unpublished documents live at drafts.<id>; queries and mutations that ignore it silently miss or clobber content.
  4. Local schema files are the source of truth — never edit a deployed schema in Studio; change local files and redeploy.
  5. Use defineType / defineField for every schema — plain object literals lose type safety.
  6. Validate GROQ in Vision against real data before shipping it.
  7. Queries live in the shared queries library, never inline in components.

Change → validate → deploy

  1. Edit local schema files; sanity start surfaces schema errors immediately.
  2. Run representative queries in Vision against local data.
  3. For risky changes, sanity dataset export then sanity dataset import into a temporary dataset and re-run queries there.
  4. Deploy the schema, then run a full site build to catch runtime breakage.
  5. Any failure: revert locally, fix, restart from step 1.
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. 1mo ago Changed · -2 lines · -17 tokens per session 488ece027a09
  2. 1mo ago First seen · 29 lines · 57 tokens per session scan A d237f5f74b62

Subscribe to this mod's changes

sanity-cms is a skill published in the GitHub repository monkilabs/opencastle (82 stars, last pushed 10d ago), licensed MIT. It adds 40 tokens to every session and 390 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-04.

Related

sanity-cms compared with skills from other repositories

sanity-cms next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sanity-cmsmonkilabs/opencastleSkill8210d agoMITA40Claude Code, Codex
spring-data-redisrrezartprebreza/spring-boot-skillsSkill37013d agoMITA37Claude Code, Codex
spring-batchrrezartprebreza/spring-boot-skillsSkill37013d agoMITA66Claude Code, Codex
transactional-patternsrrezartprebreza/spring-boot-skillsSkill37013d agoMITA53Claude Code, Codex
oauth2-resource-serverrrezartprebreza/spring-boot-skillsSkill37013d agoMITA47Claude Code, Codex
rest-api-conventionsrrezartprebreza/spring-boot-skillsSkill37013d agoMITA57Claude Code, Codex
hateoasrrezartprebreza/spring-boot-skillsSkill37013d agoMITA44Claude Code, Codex