Skip to content
Content Modeling Best Practices

Content Modeling Best Practices Skill

Sanity's official CMS-agnostic skill for structured content modelling — separation of concerns, references versus embedding, content reuse and taxonomy design, with Sanity-specific notes.

GitHub Docs

Install

Install with the skills CLI

One command for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and dozens of other agents. Needs Node.js; the skill is fetched straight from sanity-io/agent-toolkit.

$ npx skills add sanity-io/agent-toolkit --skill content-modeling-best-practices

Run it in a terminal. The CLI finds the agents installed on your machine, asks which ones to add the skill to, and whether to install it into the folder you ran it from or for all your projects.

Other ways to install

  1. Open the skill on GitHub and download the folder that holds its SKILL.md.
  2. Put it at ~/.claude/skills/content-modeling-best-practices/, where Claude Code picks it up in every project.

No scripts or references next to it? Saving the SKILL.md alone as ~/.claude/skills/content-modeling-best-practices/SKILL.md works too.

Using another agent? Its personal skills folder
Codex
~/.agents/skills/
Cursor
~/.cursor/skills/
GitHub Copilot
~/.copilot/skills/
Gemini CLI
~/.gemini/skills/
Windsurf
~/.codeium/windsurf/skills/
OpenCode
~/.config/opencode/skills/

About

  • CMS-agnostic principles with Sanity-specific implementation notes
  • Content is data not pages: structure for meaning, not presentation
  • Reference versus embedded object decision guidance
  • Content reuse patterns and the reuse spectrum
  • Flat, hierarchical and faceted taxonomy design
  • Loads one reference file per decision instead of the whole set

The most expensive mistake in a headless CMS project is modelling content the way the first page looks. Six months later the same copy has to appear in an email, an app and a voice assistant, and every field is named after a slot in a hero component. This skill is Sanity's attempt to get an agent to make the durable choice at the moment the schema is being written, when it is still cheap.

It is deliberately not Sanity-specific. The principles apply to any headless CMS; Sanity implementation notes are added where relevant. Four ideas anchor it: content is data, not pages, so structure it for meaning rather than presentation; a single source of truth, so the same fact is not duplicated across documents; future-proofing for channels that do not exist yet; and editor-centricity, optimising for the people who actually create the content.

Four reference files carry the detail, and the skill tells the agent to open the one that matches the decision in front of it rather than loading all of them:

  • separation-of-concerns.md — keeping content independent of presentation
  • reference-vs-embedding.md — when a reference beats an embedded object, and when it does not
  • content-reuse.md — reuse patterns and the reuse spectrum
  • taxonomy-classification.md — flat, hierarchical and faceted classification

When to reach for it: starting a new project's content model, deciding whether something should be structured or free-form, planning multi-channel delivery, or refactoring an existing model that has drifted page-shaped. It pairs naturally with sanity-best-practices, which covers the implementation side once the model is settled — but it is genuinely useful on a Contentful, Storyblok or Payload project too.

MIT licensed, part of sanity-io/agent-toolkit.

Try it

Once installed, ask your agent something like:

Review this schema — it looks like it was modelled around our landing page. Restructure it so the same content can drive an email and a mobile app.

SKILL.md

The instructions your agent loads, as published by Sanity.

SKILL.md
name
content-modeling-best-practices
description
Structured content modeling guidance for schema design, content architecture, content reuse, references versus embedded objects, separation of concerns, and taxonomies across Sanity and other headless CMSes. Use this skill when designing or refactoring content types, deciding field shapes, debating reusable versus nested content, planning omnichannel content models, or reviewing whether a schema is too page-shaped or presentation-driven.

Content Modeling Best Practices

Principles for designing structured content that's flexible, reusable, and maintainable. These concepts apply to any headless CMS but include Sanity-specific implementation notes.

When to Apply

Reference these guidelines when:

  • Starting a new project and designing the content model
  • Evaluating whether content should be structured or free-form
  • Deciding between references and embedded content
  • Planning for multi-channel content delivery
  • Refactoring existing content structures
Core Principles
  1. Content is data, not pages — Structure content for meaning, not presentation
  2. Single source of truth — Avoid content duplication
  3. Future-proof — Design for channels that don't exist yet
  4. Editor-centric — Optimize for the people creating content
References

Start with the reference that matches the modeling decision in front of you, instead of loading every topic at once. See references/ for detailed guidance on specific topics:

  • references/separation-of-concerns.md — Separating content from presentation
  • references/reference-vs-embedding.md — When to use references vs embedded objects
  • references/content-reuse.md — Content reuse patterns and the reuse spectrum
  • references/taxonomy-classification.md — Flat, hierarchical, and faceted classification
Install

Sanity's official agent skill — schema design, GROQ, TypeGen, Visual Editing, Portable Text, Studio structure, localization, Functions and Blueprints, plus integration guides for eight frontend frameworks.

Featured

Official WordPress skill for Gutenberg block work: block.json, attributes and serialization, dynamic rendering, and the deprecation path that keeps existing content valid.

Convex's official skill for changing the schema of a deployed app without breaking it — add the field optional, backfill with @convex-dev/migrations, verify, then tighten the validator.

Browse all skills →