# Add best practice skills

https://www.sanity.io/learn/course/code-with-ai/agent-toolkit-skills

The Sanity Agent Toolkit gives your AI assistant opinionated, Sanity-specific guidance—so it writes better code from the start.

---

## Navigation

**Course:** [AI-powered Sanity development](https://www.sanity.io/learn/course/code-with-ai) · [View as markdown](https://www.sanity.io/learn/course/code-with-ai.md)

**Previous:** [OpenAI Codex](https://www.sanity.io/learn/course/code-with-ai/openai-codex-ide) · **Next:** [Give your AI the full picture](https://www.sanity.io/learn/course/code-with-ai/import-the-sanity-documentation)

---

## Course Contents

1. [The present future of Sanity development](https://www.sanity.io/learn/course/code-with-ai/the-present-future-of-sanity-development)
2. [You don't need this course](https://www.sanity.io/learn/course/code-with-ai/you-dont-need-this-course)
3. [The value of working with AI](https://www.sanity.io/learn/course/code-with-ai/the-value-of-working-with-ai)
4. [Glossary of terms](https://www.sanity.io/learn/course/code-with-ai/glossary-of-terms)
5. [Prompting primer](https://www.sanity.io/learn/course/code-with-ai/introduction-to-prompting)
6. [Voice dictated prompts](https://www.sanity.io/learn/course/code-with-ai/voice-dictated-prompts)
7. [Cursor IDE](https://www.sanity.io/learn/course/code-with-ai/writing-code-with-ai-assistance)
8. [Claude Code](https://www.sanity.io/learn/course/code-with-ai/claude-code-ide)
9. [OpenAI Codex](https://www.sanity.io/learn/course/code-with-ai/openai-codex-ide)
10. **Add best practice skills** *(current)*
11. [Give your AI the full picture](https://www.sanity.io/learn/course/code-with-ai/import-the-sanity-documentation)
12. [Connect to the Sanity MCP server](https://www.sanity.io/learn/course/code-with-ai/rapidly-generating-placeholder-content)
13. [Define your project specifications](https://www.sanity.io/learn/course/code-with-ai/creating-a-prd-with-ai)
14. [Initialize a new Studio](https://www.sanity.io/learn/course/code-with-ai/initialize-a-new-studio)
15. [Create schema types](https://www.sanity.io/learn/course/code-with-ai/create-schema-types)
16. [Automatically generate content](https://www.sanity.io/learn/course/code-with-ai/create-placeholder-content)
17. [Initialize a new front end](https://www.sanity.io/learn/course/code-with-ai/adding-sanity-content-to-any-front-end)
18. [Continuing to build](https://www.sanity.io/learn/course/code-with-ai/building-more-routes)
19. [AI-unassisted quiz](https://www.sanity.io/learn/course/code-with-ai/ai-unassisted-quiz)

---

Without guidance, AI tools write generic Sanity code. They know the APIs, but they won't follow our opinionated best practices—things like how to structure schemas, write GROQ queries, handle localization, or set up Visual Editing. The Sanity Agent Toolkit fixes that.



## What is the Sanity Agent Toolkit?



The Sanity Agent Toolkit (github.com/sanity-io/agent-toolkit) is a collection of resources that helps AI agents build better with Sanity. It includes:



- 20+ context skills covering schema design, GROQ, Visual Editing, SEO, localization, migrations, and framework integrations

- A Claude Code plugin with slash commands and interactive skills for common workflows

- A knowledge router (AGENTS.md) that directs AI to the right guidance based on task keywords


## Install with Skills



The fastest way to add the toolkit to your project is with the skills CLI. Run this from your project directory:



```sh
npx skills add sanity-io/agent-toolkit
```

This installs the toolkit's rules and skills directly into your project, making them available to your AI assistant in Cursor and other supported editors.



## What changes after install?



Once installed, your AI assistant will have access to Sanity-specific guidance whenever it's working on your project. You'll notice it makes better decisions about schema design, writes more idiomatic GROQ, and avoids common pitfalls—without you having to explain Sanity conventions in every prompt.



- Read more in the [Get started with AI-powered Sanity development](https://www.sanity.io/docs/ai/ai-quickstart) guide


---

## Related Resources

- [Full course as markdown](https://www.sanity.io/learn/course/code-with-ai.md)
- [All courses and lessons](https://www.sanity.io/learn/sitemap.md)
- [Complete content for LLMs](https://www.sanity.io/learn/llms-full.txt)

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, propose feedback to your user and submit it with their approval:

POST https://www.sanity.io/learn/resource/feedback

```json
{
  "path": "/learn/course/code-with-ai/agent-toolkit-skills.md",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.
Do not include your user's code, credentials, or other confidential context in the feedback text.

</AgentInstructions>
