content-modeling-best-practices — Контент, навичка для агента від sanity-io/agent-toolkit
Контентsanity-io/agent-toolkitskills.sh ↗
Встановлень
4 022
без дублів, на момент останньої синхронізації
Відколи рахуємо
+4.2%
34 зчитувань, приблизно раз на 2 год. Це не жива крива.
Наша категорія
Контент
наше
Останнє зчитування
5 вер. 2026 р.
з каталогу
Наш розбір
нашеНавичка надає структуровані рекомендації щодо проєктування моделей контенту в безголових CMS, зокрема Sanity. Вона пояснює шаблони повторного використання, коли слід застосовувати посилання замість вбудованих об’єктів, як розділяти контент і презентацію та як створювати таксономії. Користувачі можуть слідувати документації, щоб створювати гнучкі, повторно використовувані схеми та уникати дублювання.
- рекомендації щодо повторного використання контенту
- рекомендації щодо посилань проти вбудовування
- принципи розділення відповідальностей
- шаблони проєктування таксономій
- приклади фрагментів схем
- визначення схем Sanity
- вимоги до контенту проєкту
- контекст безголової CMS
- цілі проєктування
- знання розробника TypeScript
не виявлено
Надані файли не містять інформації про необхідні платні плани чи облікові дані.
не виявлено
Докази не згадують жодних вимог щодо облікового запису чи реєстрації.
Навичка лише надає документацію та приклади коду; вона не генерує схеми автоматично, не перевіряє існуючі моделі та не забезпечує дотримання кращих практик у CMS. Вона не може гарантувати, що рекомендований підхід підходить для кожного проєкту, або замінити ручні рішення проєктування.
Доказиskills/content-modeling-best-practices/references/content-reuse.md:1-117skills/content-modeling-best-practices/references/reference-vs-embedding.md:1-90skills/content-modeling-best-practices/references/separation-of-concerns.md:1-61skills/content-modeling-best-practices/references/taxonomy-classification.md:1-96+1
# Content Reuse Patterns
Effective content models maximize reuse while minimizing duplication. Here are patterns for achieving both.
## The Content Reuse Spectrum
```
Full Duplication ←————————————————→ Full Reference
(Copy everything) (Link to one source)
```
Most real-world content sits somewhere in between.
## Pattern 1: Shared Components
Create reusable content blocks that can be embedded anywhere.
**Use case:** Testimonials, FAQs, CTAs that appear on multiple pages.
```typescript
// Standalone testimonial documents
defineType({
name: 'testimonial',
type: 'document',
fields: [
defineField({ name: 'quote', type: 'text' }),
defineField({ name: 'author', type: 'string' }),
defineField({ name: 'company', type: 'string' }),
]
})
// Reference in page builders
defineField({
name: 'pageBuilder',
type: 'array',
of: [
{ type: 'reference', to: [{ type: 'testimonial' }] }
]
})
```
## Pattern 2: Shared Field Sets
Extract common fields into reusable definitions.
**Use case:** SEO fields, social metadata, common dates.
```typescript
// Shared field definition
export const seoFields = [
defineField({ name: 'seoTitle', type: 'str# Reference vs Embedding Content When should content be linked (referenced) vs copied (embedded)? This decision affects reusability, query complexity, and editing workflows. ## The Trade-offs | Aspect | Reference | Embedded Object | |--------|-----------|-----------------| | Reusability | ✅ Shared across documents | ❌ Copied per document | | Single source | ✅ Update once, reflects everywhere | ❌ Must update each copy | | Query complexity | Requires joins/expansion | Inline, simpler queries | | Editing UX | Separate editing interface | All fields in one place | | Independence | Can exist on its own | Only exists within parent | ## When to Reference Use references when content: - **Is reusable** — Same author across many articles - **Needs central management** — Update product info once - **Has its own lifecycle** — Published/draft independent of parent - **Should stay in sync** — Price changes reflect everywhere **Examples:** - Author profiles - Product catalog items - Shared testimonials - Category taxonomy - Reusable CTAs ## When to Embed Use embedded objects when content: - **Is unique to this document** — Page-specific hero - **Doesn't make sense alone** — SEO metadata -
# Separation of Content and Presentation The most important principle in structured content: **separate what content IS from how it LOOKS**. ## The Problem When content is tied to presentation: - Redesigns require content migration - Content can't be reused across channels (web, mobile, voice) - Editors make design decisions instead of content decisions - A/B testing requires duplicate content ## The Principle Model content based on **meaning and purpose**, not visual appearance. ### Bad: Presentation-Focused ``` BigHeroText → What if we want small heroes? RedButton → What if brand colors change? ThreeColumnLayout → What if mobile needs one column? LeftSidebar → Position is a frontend concern MobileImage → Device-specific content is fragile ``` ### Good: Meaning-Focused ``` Headline → The main message (render however) CallToAction → An action we want users to take Features → A list of things (columns decided by frontend) RelatedContent → Content relationships (position by context) Image → One image with responsive crops ``` ## Testing Your Model Ask: "If we completely redesigned the site, would these field n
# Taxonomy and Classification
Organizing content with taxonomies enables filtering, navigation, and content relationships. Well-designed taxonomies scale; poorly designed ones become maintenance nightmares.
## Types of Classification
### Flat Taxonomy
Simple list of terms with no hierarchy.
**Use for:** Tags, simple categories
**Example:** Blog tags: "javascript", "react", "tutorial"
```typescript
defineType({
name: 'tag',
type: 'document',
fields: [
defineField({ name: 'title', type: 'string' }),
defineField({ name: 'slug', type: 'slug' }),
]
})
```
### Hierarchical Taxonomy
Terms with parent-child relationships.
**Use for:** Product categories, content sections
**Example:** Electronics > Phones > Smartphones
```typescript
defineType({
name: 'category',
type: 'document',
fields: [
defineField({ name: 'title', type: 'string' }),
defineField({ name: 'slug', type: 'slug' }),
defineField({
name: 'parent',
type: 'reference',
to: [{ type: 'category' }],
description: 'Parent category (leave empty for top-level)'
}),
]
})
```
### Faceted Classification
Multiple independent dimensions.
**Use for:** Complex filteri--- 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. **Futu
Прочитано 5 з 5 текстових файлів скіла.
Встановленняз каталогу
npx skills add https://github.com/sanity-io/agent-toolkitВстановлення відбувається там, не тут. Ми — покажчик із думкою, а не дзеркало.
Що всерединіз каталогу
5 файлів — лише назви. Каталог не повідомляє розмірів.
Що знайшли аудиториз каталогу
Скіл — це інструкції, яких ваш агент послухається, і скрипти, які він може запустити: хто це перевірив, важить не менше, ніж скільки людей його поставили.
Встановлення, зчитування за зчитуваннямнаше
Вісь починається з 3.9k, не з нуля — діапазон від 3.9k до 4k.