
sanity-io/agent-toolkit
7 skills40.1k installs1.2k starsGitHub
Install
npx skills add https://github.com/sanity-io/agent-toolkitSkills in this repo
1Sanity Best PracticesSanity Best Practices is a comprehensive reference guide covering schema design, GROQ query patterns, TypeGen configuration, Visual Editing setup, image optimization, Portable Text rendering, and framework integrations (Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen). Developers use it when building Sanity-powered applications, setting up new projects, optimizing content modeling, or implementing event-driven content automation via Sanity Functions. Key workflows include designing reference relationships, configuring Studio structure, establishing localization patterns, performing content migrations, and integrating Sanity with frontend frameworks using established patterns and decision matrices.16.6kinstalls2Sanity MigrationPlans, implements, and reviews migrations from other CMSes and content systems into Sanity. Use when migrating or replatforming to Sanity from AEM, Adobe Experience Manager, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, Markdown/MDX/frontmatter files, WXR/XML exports, CMS APIs, database dumps, static HTML, or when designing extraction, transformation, Portable Text conversion, asset mig --- name: sanity-migration description: Plans, implements, and reviews migrations from other CMSes and content systems into Sanity. Use when migrating or replatforming to Sanity from AEM, Adobe Experience Manager, Contentful, Strapi, Webflow, WordPress, Payload, Drupal, Markdown/MDX/frontmatter files, WXR/XML exports, CMS APIs, database dumps, static HTML, or when designing extraction, transformation, Portable Text conversion, asset migration, redirects, validation, and cutover workflows. --- # Sanity Migration Use this skill for CMS-to-Sanity migration work. Treat migration as a content strategy and ETL project, not a blind lift-and-shift. Read `references/general.md` first.9.9kinstalls3Seo Aeo Best PracticesThe seo-aeo-best-practices skill from Sanity agent-toolkit covers principles for traditional search engine optimization and answer engine optimization for AI assistants. Apply it when implementing metadata and Open Graph tags, creating sitemaps and robots.txt, adding JSON-LD structured data, optimizing for featured snippets, preparing content for ChatGPT and Perplexity answer surfaces, and evaluating quality with EEAT experience expertise authoritativeness and trustworthiness. Core concepts distinguish SEO as ranking in Google and Bing results from AEO as being selected as authoritative answers by AI systems. Reference files under references/ provide detailed guidance: eeat-principles.md for author schema and trust signals, structured-data.md for Article FAQ Breadcrumb and Product JSON-LD patterns, technical-seo.md for metadata sitemaps hreflang and robots checklists, and aeo-considerations.md for AI Overviews and crawler management. Load the single reference matching the task rather than all files at once for focused implementation work on content-heavy sites and headless CMS deployments.4.9kinstalls4Content Modeling Best Practicescontent-modeling-best-practices teaches structured content modeling for headless CMS projects, with Sanity-specific notes but principles that apply broadly. Core principles state content is data not pages, maintain a single source of truth, future-proof for channels that do not exist yet, and optimize for editors creating content. The skill applies when starting new projects, evaluating structured versus free-form content, choosing references versus embedded objects, planning multi-channel delivery, or refactoring schemas that are too page-shaped or presentation-driven. Reference topics include separation of concerns between content and presentation, reference versus embedding tradeoffs, content reuse patterns across the reuse spectrum, and flat hierarchical or faceted taxonomy classification. Developers use it to decide field shapes, debate reusable versus nested content, plan omnichannel models, and review whether a schema is presentation-driven. The references/ directory loads focused guidance per modeling decision instead of one monolithic document.3.3kinstalls5Content Experimentation Best PracticesThe content-experimentation-best-practices skill from Sanity agent-toolkit documents how to run content experiments that improve conversion, engagement, and user experience. Core concepts define A/B testing, multivariate testing, statistical significance, and experimentation culture that favors data over opinion. Reference guides split experiment design, statistical foundations, CMS integration for field-level variants, and common pitfalls across statistics, design, execution, and interpretation. Agents apply it when setting up testing infrastructure, designing hypotheses and success metrics, wiring CMS-managed variants, or interpreting results without falling into peeking or underpowered tests. The skill points to detailed references for sample size, p-values, confidence intervals, power analysis, Bayesian methods, and platform-specific CMS patterns. Use it when planning landing page tests, headline variants, or frontend experimentation workflows where variant delivery and analysis must stay aligned with sound experiment design practices overall.2.5kinstalls6Portable Text SerializationThe portable-text-serialization skill is designed for render and serialize Portable Text to React, Svelte, Vue, Astro, HTML, Markdown, and plain text. Use when implementing Portable Text rendering in any frontend framework,. Portable Text Serialization Render Portable Text content across frameworks using the @portabletext/* library family. Each library follows the same component-mapping pattern: you provide a components object that maps PT node types to framework-specific renderers. Invoke when the user implementing Portable Text rendering in any frontend framework, building custom serializers for non-standard block types, converting Portable Text to HTML strings server-side, converting Portable Text to Markdown, extracting plain text from Portable Text, or troubleshooting rendering issues with marks, blocks, lists, or custom types.1.5kinstalls7Portable Text ConversionPortable Text Conversion toolkit enables developers to transform HTML and Markdown content into Sanity's Portable Text format for content migration, pipeline ingestion, and programmatic document creation. Provides three conversion approaches: markdownToPortableText via @portabletext/markdown (recommended for Markdown), htmlToBlocks via @portabletext/block-tools (for HTML migration), and manual block construction from APIs or databases. Covers Portable Text specification including block structure, span annotations, mark definitions, and list handling with proper key generation and type assignment.1.5kinstalls