Agent skills
Understand and use agent skills to help AI assistants generate high-quality Sanity code that follows established best practices.
Agent skills are folders of instructions, scripts, and resources that AI agents can discover and use to complete tasks more accurately and efficiently. They follow the open Agent Skills format, supported by tools like Cursor, Claude Code, VS Code, GitHub Copilot, OpenCode, and others.
Think of agent skills as giving your agent the same context an expert would have: best practices, architectural patterns, and domain-specific knowledge, loaded on demand instead of explained from scratch every conversation.
Why skills matter for Sanity development
AI coding tools are good at generating code, but without guidance they produce generic output that misses what makes Sanity different.
Agent skills give agents the context to write performant GROQ queries, design solid schemas, and integrate correctly with your framework of choice. When an agent encounters one of these tasks, it loads the relevant skill and applies the same patterns our engineers recommend.
- Better code on the first pass. Agents follow Sanity conventions instead of guessing.
- Fewer iterations. The right patterns are loaded before generation, not corrected after.
- Consistent quality. Everyone on your team gets the same best practices, whether they’re a Sanity veteran or new to Sanity.
Where to find agent skills
Sanity publishes skills in a few different places, depending on what they cover.
Agent Toolkit
The Sanity Agent Toolkit is the main repository for agent skills. It includes skills covering Sanity development best practices, content modeling, SEO/AEO, content experimentation, Portable Text conversion and rendering, migrating from other CMSes, Studio upgrades, and singleton documents. These are general-purpose, useful for any project that uses Sanity regardless of which products or frameworks you're working with.
The fastest way to install these agent skills is with the skills CLI tool, which requires Node.js 22.20 or later:
npx skills add sanity-io/agent-toolkitpnpm dlx skills add sanity-io/agent-toolkityarn dlx skills add sanity-io/agent-toolkitbunx skills add sanity-io/agent-toolkitThe Sanity Agent Toolkit also bundles the MCP server configuration and plugins for Claude Code, Cursor, and Codex, with slash commands for Claude Code and Cursor. See the Agent Toolkit repository for the full list of what’s included and what each skill covers.
Product-specific skills
Some Sanity products ship their own skills alongside the product, covering workflows and patterns specific to that product.
Sanity Context includes skills that walk you through creating an MCP endpoint in the Context app, building AI agents that can query and reason over your Sanity content, writing effective system prompts, and tuning your agent’s instructions.
You can install the Sanity Context skills directly:
npx skills add sanity-io/context --allpnpm dlx skills add sanity-io/context --allyarn dlx skills add sanity-io/context --allbunx skills add sanity-io/context --allCommunity and custom skills
The Agent Skills format is open, so anyone can create and share skills. If your team has Sanity patterns specific to your project (custom schema conventions, deployment workflows, content modeling standards), we recommend you package them as skills and share them across your team. See the Agent Skills specification for how skills are structured.
How skills work with the MCP server
Skills and the Sanity MCP server complement each other:
- The MCP server gives agents access to your Sanity content. It can query content, manage documents, and deploy schemas.
- Skills give agents best practices, patterns, and guides for working effectively with Sanity.
You don’t need to choose between them. Most setups benefit from both: the MCP server for project interaction and skills for reliable baseline knowledge.
For a full walkthrough of setting up both, see Get started.
Was this page helpful?
Feedback submitted, thanks for helping us improve the docs. Have you tried these alternatives?