create-agent-with-sanity-context
This skill helps you build AI agents with structured access to Sanity CMS content using Sanity Context.
Identity proven by GitHub's verified organisation badge (sanity-io)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- No license stated
- Pin
- 296c8aapinned Oct 9, 2026
- Context cost
- about 5,600 tokenswhen the skill loads
- GitHub stars
- 7on sanity-io/context
- Scripts
- 33 scripts
What it does
“Build AI agents with structured access to Sanity content via Sanity Context. Use when setting up a Sanity-powered chatbot, connecting an AI assistant to Sanity content, or adding client-side tools to an agent. Covers Studio setup, agent implementation, and advanced patterns. Always use this skill when users mention building a chatbot with Sanity, creating an AI assistant for their content, setting up the Sanity Context MCP server, integrating Sanity with Claude/GPT/any LLM, making content searchable by AI, implementing semantic search over Sanity data, or connecting their CMS to an AI agent.”
Generated summary from the skill's own text
This skill helps you build AI agents with structured access to Sanity CMS content using Sanity Context. It covers studio setup, agent implementation, conversation tracking, and tuning the agent's behavior and instructions. The agent learns your content schema and can query it with semantic search, respecting your content model and structure.
When to use it
- Building a Sanity-powered chatbot or AI assistant for content discovery
- Connecting an LLM to Sanity content with schema-aware queries
- Setting up conversation tracking and classification for agent performance
- Tuning agent instructions and system prompts based on real usage data
When not to
- Simple keyword search without AI reasoning is better than an agent
- User doesn't have a deployed Sanity Studio v5.1.0 or newer
Install
No license stated: install from the publisher's repository, and ask the author before you reuse or share it.
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add sanity-io/context --skill create-agent-with-sanity-contextInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install sanity-io/context create-agent-with-sanity-context@296c8aa5dcb39735eef9e410975615258c4bbf2dInstalls the commit we checked (296c8aa).
Copy by hand
Download the folder at 296c8aa and put it in .claude/skills/create-agent-with-sanity-context for Claude Code and in .agents/skills/create-agent-with-sanity-context for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install sanity@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "create-agent-with-sanity-context" by Sanity. Source, pinned to commit 296c8aa5dcb39735eef9e410975615258c4bbf2d: https://github.com/sanity-io/context/tree/296c8aa5dcb39735eef9e410975615258c4bbf2d/skills/create-agent-with-sanity-context 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/create-agent-with-sanity-context/ for Claude Code and .agents/skills/create-agent-with-sanity-context/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Its license is restricted or not stated. Show me the license terms from the repository before you copy anything. Listing and checks: https://www.agentnative.dev/skills/sanity/create-agent-with-sanity-context
SKILL.md at the pin
The license of this skill does not let us show its files here.
Files
- SKILL.md23 KB · 7514fc1acf77
- references/
- adapting-to-stacks.md4.6 KB · 30c1021d8da3
- conversation-classification.md19 KB · 9c8b28a3233a
- ecommerce/
- .env.example1.3 KB · 3da792381b17
- .gitignore49 B · 8fe0d9bada2a
- _index.md5.4 KB · 0aeadbfc6cfa
- app/
- .gitignore546 B · be9e82e4bb3f
- components.json426 B · c1d02322add9
- eslint.config.mjs246 B · 6175f8bcb229
- next.config.ts409 B · b3783f1d40c5
- package.json1.4 KB · 6481c28b5de6
- postcss.config.mjs92 B · 6993a1b3cdf2
- public/
- file.svg391 B · 2b67812c325c
- globe.svg1.0 KB · b614b9bf1839
- next.svg1.4 KB · 55995dfad6ec
- vercel.svg128 B · f081337b2fee
- window.svg385 B · 644768c4aaeb
- sanity-typegen.json109 B · 689d74710f03
- sanity.cli.ts458 B · 53fec96f0a0a
- sanity.types.ts17 KB · 49dad7e4aff8
- src/
- app/
- api/
- chat/
- route.ts6.9 KB · b5594e62de6b
- favicon.ico26 KB · 2b8ad2d33455
- globals.css155 B · 5a6b1f709759
- layout.tsx698 B · 70811db1c48e
- page.tsx1.2 KB · c0e20ea2aa98
- products/
- [slug]/
- page.tsx2.9 KB · 145b3548b8dd
- loading.tsx642 B · e295b1a14d45
- page.tsx5.1 KB · 92493f8cefee
- components/
- add-to-cart-button.tsx381 B · f6ca1c932820
- chat/
- chat-button.tsx1.4 KB · 3831d7ed4051
- chat-input.tsx918 B · 84c42c7001ab
- chat.tsx7.6 KB · 59fae4c15d41
- loader.tsx247 B · b409aded10c4
- message/
- document.tsx839 B · 820166835548
- message.tsx878 B · 1fc721908f64
- product.tsx1.9 KB · b26536da7ae1
- text-part.tsx1.8 KB · 74d34dc788dc
- filter-bar.tsx13 KB · a40ac5fe8a1c
- header.tsx714 B · 05112fde1a19
- product-card.tsx2.3 KB · 8c94604c7d4f
- product-details.tsx9.1 KB · f6cae298b292
- product-grid.tsx568 B · e8142e28ce44
- product-pagination.tsx2.5 KB · b487005d3af3
- ui/
- badge.tsx993 B · 0a7cd41a2437
- button.tsx1.8 KB · 793025d0677c
- pagination.tsx2.7 KB · 493aaf814a7e
- select.tsx3.6 KB · db869342d838
- lib/
- capture-context.ts2.2 KB · 3f3b8a315a41
- client-tools.ts1.8 KB · 070c0640a628
- utils.ts376 B · 09ebc427df85
- sanity/
- lib/
- client.ts569 B · e0ad175e6cd1
- image.ts246 B · 66c729d71ff0
- insights-client.ts501 B · 18ba4ec98906
- queries/
- categories.ts455 B · 83cec5121d31
- filters.ts858 B · e48c6f412e00
- fragments.ts629 B · 78f9c84cd25d
- index.ts130 B · c1dcb48c8af5
- products.ts4.2 KB · ac1d709941a8
- tsconfig.json679 B · f018a4f8d29e
- functions/
- classify-conversations/
- index.ts1.3 KB · ee28737c8c59
- package.json599 B · c34527a7e7f0
- sanity.blueprint.ts596 B · 464c8798d83d
- studio/
- .gitignore568 B · 5b677d3ae567
- eslint.config.mjs159 B · ada2258c610a
- package.json1.3 KB · 00732094416f
- sanity.cli.ts763 B · 85f278be06ba
- sanity.config.ts1.8 KB · 1b8d873eb16c
- schemaTypes/
- documents/
- agentConfig.ts941 B · 807a1542d941
- brand.ts1.0 KB · 538bf256174b
- category.ts1.4 KB · 3ddeb3f01b1f
- color.ts1.3 KB · a0b4c01f8c43
- material.ts1.2 KB · 859b8d29578f
- product.ts5.3 KB · dd2e05a7ec72
- size.ts1.2 KB · 4d1aacf5f4bc
- index.ts725 B · d2e28f70f68a
- objects/
- price.ts642 B · 25bb021a6b79
- productVariant.ts2.4 KB · 73034b1295d5
- seo.ts1.1 KB · 6d4ad1a103dd
- static/
- .gitkeep81 B · 7635960718f1
- tsconfig.json417 B · e5a67d7d8cde
- nextjs-agent.md11 KB · 287a88601c62
- studio-setup.md7.5 KB · dca2d4fb1d2e
- sveltekit-agent.md13 KB · 7035f12b7d7c
- system-prompts.md4.1 KB · 71fdc77fb596
84 files, 247 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 296c8aaMore from Sanity
sanity-live-cache-components
Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps, setting up shared cached data fetching through sanityFetch, live content…
Claude Code, Codex, Cursor +4 · about 4K tokens · pinned 6 days ago
content-experimentation-best-practices
This skill provides guidance for designing and running content experiments using A/B and multivariate testing.
Claude Code, Codex, Cursor +4 · about 360 tokens · pinned 6 days ago
content-modeling-best-practices
Guides agents through structured content modeling principles for headless CMSes like Sanity, covering schema design, content reuse strategies, and field…
Claude Code, Codex, Cursor +4 · about 340 tokens · pinned 6 days ago
portable-text-conversion
Converts HTML and Markdown content into Portable Text blocks for Sanity using markdownToPortableText, htmlToBlocks, or manual construction.
Claude Code, Codex, Cursor +4 · about 510 tokens · pinned 6 days ago
portable-text-serialization
This skill enables rendering Portable Text content across multiple frameworks and output formats using the @portabletext library family.
Claude Code, Codex, Cursor +4 · about 940 tokens · pinned 6 days ago
sanity-best-practices
This skill provides best practices for Sanity headless CMS development across schema design, GROQ queries, framework integrations (Next.js, Nuxt, Astro…
Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago
Related in AI and agents
-21risk-automation
This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago
-2chat-automation
This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 6 days ago
ably-automation
This skill automates Ably messaging platform tasks by connecting to Composio's Ably toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 6 days ago
abstract-automation
This skill enables agents to automate Abstract design platform operations through Composio's Abstract toolkit via Rube MCP.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago
abuselpdb-automation
This skill automates Abuselpdb operations through Composio's toolkit via Rube MCP, enabling the agent to search for IP/domain abuse reports and manage threat…
by ComposioOfficial publisher
Agents not labelled yet · about 700 tokens · pinned 6 days ago
abyssale-automation
This skill enables agents to automate Abyssale tasks through Composio's toolkit via Rube MCP.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago