Claude Skills for Sanity: 8 SKILL.md Files You Can Copy
Quick answer: A Claude skill for Sanity is a saved SKILL.md file that tells Claude which GROQ query or mutation to run and what to hand back. The 8 below name the connector tool each step uses. Ryze AI is the best Claude connector for running Sanity skills from the same URL as its other platforms, with one caveat: it connects with an Editor token, so write and delete tools can change any document in the dataset.
Below: 8 SKILL.md files, how to install them in Claude, and how to run them on a live Sanity dataset through the Ryze AI connector.
Used by 2,000+ marketers
The 8 Claude skills for Sanity at a glance
Four skills only read. Four can change the dataset, and each one waits for your yes before it does.
- 01Content inventoryTable of documents to update first
Ryze AI tools used: sanity__query
Changes data: No
- 02Missing fieldsFind documents with an empty field you name
Ryze AI tools used: sanity__query
Changes data: No
- 03Reference checkFind references that point at nothing
Ryze AI tools used: sanity__query
Changes data: No
- 04Slug checkCatch clashing slugs before creating content
Ryze AI tools used: sanity__query
Changes data: No
- 05Draft documentSave an entry as a draft after a dry run
Ryze AI tools used: sanity__query, sanity__mutate
Changes data: Yes, as a draft
- 06Patch fieldsChange one field on chosen documents
Ryze AI tools used: sanity__query, sanity__mutate
Changes data: Yes
- 07Draft vs publishedList what changes on publish
Ryze AI tools used: sanity__query
Changes data: No
- 08Delete cleanupRemove documents by id after a check
Ryze AI tools used: sanity__query, sanity__delete
Changes data: Yes
| # | Skill | Job | Ryze AI tools used | Changes data |
|---|---|---|---|---|
| 01 | Content inventory | Table of documents to update first | sanity__query | No |
| 02 | Missing fields | Find documents with an empty field you name | sanity__query | No |
| 03 | Reference check | Find references that point at nothing | sanity__query | No |
| 04 | Slug check | Catch clashing slugs before creating content | sanity__query | No |
| 05 | Draft document | Save an entry as a draft after a dry run | sanity__query, sanity__mutate | Yes, as a draft |
| 06 | Patch fields | Change one field on chosen documents | sanity__query, sanity__mutate | Yes |
| 07 | Draft vs published | List what changes on publish | sanity__query | No |
| 08 | Delete cleanup | Remove documents by id after a check | sanity__query, sanity__delete | Yes |
The tool names are the 3 Sanity tools on the Ryze AI connector: sanity__query, sanity__mutate and sanity__delete.
What are Claude skills for Sanity?
Per Anthropic's Agent Skills docs, a skill is a folder with a SKILL.md file that starts with a name and a description. Claude loads the name and description at startup and reads the rest of the file only when your request matches the description.
The name allows up to 64 lowercase letters, numbers and hyphens, and cannot contain the reserved words anthropic or claude. The description has a limit of 1,024 characters and has to say what the skill does and when to use it. Every skill here starts with sanity for that reason.
What it is
- One-off prompt
- A question in chat
- Skill
- A saved file with fixed steps and output
- Sanity connection
- Tools Claude uses to reach the dataset
Setup
- One-off prompt
- None
- Skill
- Save once per Claude app
- Sanity connection
- Project ID and an Editor token, once
Same steps each run
- One-off prompt
- No
- Skill
- Yes
- Sanity connection
- Depends on the prompt or skill
| One-off prompt | Skill | Sanity connection | |
|---|---|---|---|
| What it is | A question in chat | A saved file with fixed steps and output | Tools Claude uses to reach the dataset |
| Setup | None | Save once per Claude app | Project ID and an Editor token, once |
| Same steps each run | No | Yes | Depends on the prompt or skill |
A skill carries the steps and the approval rules. The connection carries the access. Without a connection, Claude can still follow a skill on content you paste in. For the connection itself, see the Sanity MCP page.
How to install the skills in Claude
Claude Code
Save each block as ~/.claude/skills/<skill-name>/SKILL.md for yourself, or .claude/skills/<skill-name>/SKILL.md in a project to share it with a team. Claude discovers them on its own (Agent Skills docs).
claude.ai
Zip each skill folder and upload it as a custom skill. Anthropic lists this on the Pro, Max, Ultra, Team and Enterprise plans with code execution enabled.
Connect Sanity
Add the Ryze AI connector in Claude under Customize > Connectors with the URL https://connector.get-ryze.ai/mcp, then connect Sanity in the Ryze AI app. The Sanity MCP page has the steps.
Anthropic says custom skills do not sync across surfaces: a skill uploaded to claude.ai is not in Claude Code or the API, so install it where you use it. Anthropic also advises using skills only from sources you trust, so read each file before you save it. The skills here are text only and run no scripts.
Read skills: audit the dataset without changing it
These four use only sanity__query. A GROQ query starts with `*` for all documents, filters with `[...]` and shapes the result with a projection in curly braces, as in Sanity's GROQ cheat sheet. The connector's query tool can read published documents, drafts or both.
The skills ask you for document types and field names instead of guessing them, because every Sanity schema is different. The query shapes inside each file are starting points for Claude to adapt.
01. Content inventory
Builds one table of documents of a type with slug, dates and published or draft state, and marks old documents as refresh candidates.
Use it when: you take over a project or plan a content refresh.
02. Missing fields
Uses GROQ's `defined()` check to list documents where a field you name is missing or empty, such as a meta description or a cover image.
Use it when: a template needs a field that older documents never filled in.
03. Reference check
Follows references with the `->` operator and flags documents where the target comes back empty. It also checks drafts that point at documents with no published version.
Use it when: you delete content or prepare a release.
04. Slug check
Lists slugs that already exist before you create anything. Ryze AI's own publishing stops when one of your posts already uses the same slug, so this check also helps before a Content Plan run.
Use it when: you plan a batch of new entries.
Write skills: drafts, patches, comparisons and deletes
Sanity stores a draft as a separate document with a drafts. prefix on its id. When you publish, the content moves to the id without the prefix (Sanity docs on drafts). The connector's mutate tool follows the same rule: a plain id publishes immediately, a drafts. id leaves a draft, and dryRun validates without writing.
That is why the write skills pin the id prefix and run a dry run first. Sanity's mutation reference says a dry run validates a mutation without executing it, and that mutations in one request run as one transaction.
05. Draft document
Copies the field names from your newest documents, checks the slug, validates a create mutation with a dry run and saves the result as a draft.
Use it when: you write in Claude and publish from Studio.
06. Patch fields
Shows old and new values for one field, then runs the patch as a dry run before the real write. Patch order inside Sanity is fixed by the API, so the skill sets one field at a time.
Use it when: several documents need the same field change.
07. Draft vs published
Reads drafts and their published versions and lists the fields that differ. It only reads, so it is safe to run before a review.
Use it when: an editor asks what a publish will change.
08. Delete cleanup
Lists each document, its draft and what references it, then deletes only the ids you approve. The connector's delete tool takes ids and removes drafts only when their ids are given.
Use it when: you remove test content. Set the delete tool to Needs approval in Claude as well.
Run the skills on a live dataset through the connector
The Ryze AI connector gives Claude 3 Sanity tools: sanity__query runs GROQ against the connected dataset, sanity__mutate runs create, createOrReplace, createIfNotExists or patch mutations in one transaction, and sanity__delete deletes documents by id.
Project ID
- What Ryze AI asks for
- Copied from sanity.io/manage
Token
- What Ryze AI asks for
- A Sanity API token with Editor permissions; a Viewer token is rejected
Dataset
- What Ryze AI asks for
- Optional, production by default
Blog URL
- What Ryze AI asks for
- The public address your site serves posts under
Document type
- What Ryze AI asks for
- Chosen after connecting
| Setting | What Ryze AI asks for |
|---|---|
| Project ID | Copied from sanity.io/manage |
| Token | A Sanity API token with Editor permissions; a Viewer token is rejected |
| Dataset | Optional, production by default |
| Blog URL | The public address your site serves posts under |
| Document type | Chosen after connecting |
There is one Sanity connection per workspace, tied to one project and dataset. The steps are in the Ryze AI help center.
Because the token is an Editor token, the mutate and delete tools can change any document in the dataset, not only documents Ryze AI created. The promise that Ryze AI never edits posts it did not create applies to Content Plan publishing, which is a separate path.
To require approval, open Customize > Connectors > Ryze AI > Tool permissions in Claude and set the write and delete tools to Needs approval. The skills above also ask in the chat, but the setting is what Claude enforces. The Ryze AI app chat starts on Skip all approvals; switch to Approve write and delete or Manual approve in the message box.
Connecting is free, and the Sanity tools need an active Ryze AI plan or trial. Publishing pages lead with SEO Starter at $129 a month with a 3-day free trial. Prices are on the pricing page.
Other ways to give Claude Sanity access
Sanity runs its own MCP server at https://mcp.sanity.io. Its docs say it uses OAuth by default or an API token in the Authorization header, and that agents can run GROQ queries, patch documents, manage releases and work with the schema (Sanity MCP server docs). The Ryze AI connector exposes 3 tools and no schema or release tools.
Skills work with either. The tool names inside each SKILL.md change if you switch servers, so rename them to match what Claude shows under the connector. The Ryze AI connector is the one that shares a URL with its other platforms and publishes Content Plan articles to the dataset.
Troubleshooting: when a Sanity skill fails
Claude has no Sanity tools
Claude keeps the tool list from when you added the connector. Connect Sanity in Ryze AI, then remove and re-add the connector and start a new chat.
The connection is rejected
A Viewer token is rejected. Create a token with Editor permissions under API > Tokens.
A query returns nothing
Check the document type and field names against your schema, and the dataset the connection points at.
A write went live
A plain document id publishes immediately. Use an id that starts with drafts. for drafts.
Studio edits disappeared
Edits made in Studio to a Ryze AI article are replaced the next time Ryze AI republishes it.
The site does not show new content
A static front end needs its own rebuild, such as a Sanity webhook to the host.
Sources
The verdict
Save the tasks you repeat as skills, start with the inventory and slug check, and keep the writing skills behind a dry run and an approval step. One-off questions can stay prompts.
Ryze AI runs these skills in Claude on a live Sanity dataset. It has no schema tools, and a front end that builds statically needs its own rebuild after a change.




