Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

content-type-modeling内容类型建模

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

188

周安装

8

GitHub Stars

61

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:content-type-modeling(内容类型建模)
来源仓库:https://github.com/melodic-software/claude-code-plugins
仓库路径:skills/content-type-modeling
安装命令:
npx skills add https://github.com/melodic-software/claude-code-plugins --skill content-type-modeling
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill content-type-modeling

简介

设计 CMS 内容类型的架构模型,定义字段与关系结构。

  • 支持单类型、类型家族或完整 taxonomy 建模需求。
  • 适用于 Headless CMS 迁移或新系统内容结构设计。
  • 交互式配置提问引导用户选择建模范围与输出格式。
  • content-type-modeling 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Content Type Modeling

Interactive Modeling Configuration

Use AskUserQuestion to configure the content type modeling session:

# Question 1: Modeling Scope (MCP: CMS content architecture patterns)
question: "What content type modeling do you need?"
header: "Scope"
options:
  - label: "Single Type (Recommended)"
    description: "Design one content type with parts and fields"
  - label: "Type Family"
    description: "Related content types sharing common parts"
  - label: "Full Taxonomy"
    description: "Complete content model with relationships"
  - label: "Migration"
    description: "Migrate from traditional to structured content"

# Question 2: Reusability Strategy (MCP: Orchard Core content patterns)
question: "How should content parts be structured?"
header: "Reuse"
options:
  - label: "Composition (Recommended)"
    description: "Build types from reusable parts - maximum flexibility"
  - label: "Inheritance"
    description: "Base types with specialized extensions"
  - label: "Hybrid"
    description: "Mix of composition and inheritance"
  - label: "Flat"
    description: "Standalone fields on each type - no shared parts"

Use these responses to determine modeling scope and composition strategy.

Guidance for designing content type hierarchies, reusable parts, and field compositions for headless CMS architectures.

When to Use This Skill

  • Designing content type schemas for a new CMS
  • Defining reusable content parts across multiple types
  • Structuring custom field compositions
  • Planning content type inheritance strategies
  • Migrating from traditional to structured content
  • Creating multi-channel content architectures

The Three-Level Hierarchy

Headless CMS platforms typically use a three-level content hierarchy inspired by patterns from Orchard Core and similar platforms:

Content Type (e.g., "Blog Post", "Product", "Event")
├── Content Parts (reusable groups of fields)
│   ├── TitlePart (title, display title)
│   ├── AutoroutePart (slug, URL pattern)
│   ├── PublishLaterPart (scheduled publishing)
│   └── [Custom Parts]
└── Content Fields (individual data elements)
    ├── TextField (single-line, multi-line)
    ├── HtmlField (rich text)
    ├── MediaField (images, documents)
    ├── ContentPickerField (references)
    └── [Custom Fields]

Content Types

Content Types are the blueprint for content items. They define what parts and fields are available.

content_type:
  name: BlogPost
  display_name: Blog Post
  description: A blog article with author and categories
  stereotype: Content  # Content, Widget, MenuItem
  creatable: true
  listable: true
  draftable: true
  versionable: true
  securable: true

Key Decisions:

DecisionOptionsRecommendation
NamingSingular vs PluralSingular (BlogPost, not BlogPosts)
StereotypesContent, Widget, MenuItemContent for standalone, Widget for embeddable
Draftabletrue/falsetrue for editorial content
Versionabletrue/falsetrue for audit requirements

Content Parts

Content Parts are reusable groups of fields that can be attached to multiple content types. They promote DRY principles.

content_part:
  name: SeoMetaPart
  description: SEO metadata for search engines
  fields:
    - name: MetaTitle
      type: TextField
      settings:
        max_length: 60
        hint: "Title shown in search results"
    - name: MetaDescription
      type: TextField
      settings:
        max_length: 160
        editor: TextArea
    - name: MetaKeywords
      type: TextField
      settings:
        editor: TextArea
        hint: "Comma-separated keywords"
    - name: NoIndex
      type: BooleanField
      settings:
        default: false

Common Reusable Parts:

PartPurposeAttach To
TitlePartTitle and display titleAll content types
AutoroutePartURL slug generationPages, articles
PublishLaterPartScheduled publishingEditorial content
LocalizationPartMulti-language supportTranslatable content
SeoMetaPartSearch engine metadataPublic pages
CommonPartOwner, created/modified datesAll content types
ContainablePartParent container referenceHierarchical content

Content Fields

Content Fields are individual data elements attached to parts or directly to content types.

Standard Field Types:

Field TypePurposeExample Use
TextFieldSingle/multi-line textTitle, description
HtmlFieldRich text with formattingBody content
NumericFieldNumbers (int, decimal)Price, quantity
BooleanFieldTrue/false toggleFeatured, published
DateTimeFieldDate and/or timeEvent date, deadline
MediaFieldImages, documents, videoHero image, attachments
ContentPickerFieldReference to other contentAuthor, related posts
TaxonomyFieldCategory/tag selectionCategories, tags
LinkFieldURL with optional textExternal links
UserPickerFieldReference to usersAuthor, assignee

Composition vs Inheritance

Composition Pattern (Recommended)

Build content types by combining parts. This is the preferred approach for flexibility.

# Blog Post = TitlePart + AutoroutePart + BodyPart + SeoMetaPart + Custom Fields
content_type:
  name: BlogPost
  parts:
    - TitlePart
    - AutoroutePart
    - PublishLaterPart
    - SeoMetaPart
  fields:
    - name: FeaturedImage
      type: MediaField
    - name: Author
      type: ContentPickerField
      settings:
        content_types: [Author]
    - name: Categories
      type: TaxonomyField
      settings:
        taxonomy: BlogCategories

Benefits:

  • Parts are reusable across types
  • Changes to parts affect all attached types
  • Clear separation of concerns
  • Easier to add/remove capabilities

Inheritance Pattern

Use sparingly for true "is-a" relationships.

# Base type
content_type:
  name: Article
  abstract: true  # Cannot create instances directly
  parts:
    - TitlePart
    - AutoroutePart
    - BodyPart

# Derived types
content_type:
  name: NewsArticle
  extends: Article
  fields:
    - name: BreakingNews
      type: BooleanField

content_type:
  name: OpinionPiece
  extends: Article
  fields:
    - name: OpinionAuthor
      type: ContentPickerField

When to Use Inheritance:

  • Clear "is-a" relationship
  • Shared behavior across subtypes
  • Polymorphic queries needed
  • Limited hierarchy depth (2-3 levels max)

Field Design Best Practices

Naming Conventions

DO:
- PascalCase for type/part/field names: BlogPost, FeaturedImage
- Descriptive names that indicate purpose: PublishDate (not Date1)
- Consistent suffixes: *Date, *Image, *List

DON'T:
- Abbreviations: PubDt, FeatImg
- Generic names: Data, Value, Field1
- Inconsistent casing: blogPost, featured_image

Field Validation

field:
  name: Email
  type: TextField
  validation:
    required: true
    pattern: "^[^@]+@[^@]+\\.[^@]+$"
    max_length: 255
    unique: true  # Within content type
  settings:
    placeholder: "user@example.com"
    hint: "Enter a valid email address"

Required vs Optional Fields

Required fields:
- Essential for content to be meaningful
- Used in URLs or identification
- Needed for API consumers

Optional fields:
- Enhancements or metadata
- May not apply to all instances
- Progressive disclosure in editor

Content Type Categories

System Content Types

Built-in types that power CMS functionality:

TypePurpose
MenuNavigation structure
MenuItemIndividual menu link
TaxonomyCategory/tag vocabulary
TaxonomyTermIndividual term
MediaAssetImages, documents
UserUser profiles

Common Content Types

Frequently needed across CMS projects:

# Page - generic content page
content_type:
  name: Page
  parts: [TitlePart, AutoroutePart, BodyPart, SeoMetaPart]
  fields:
    - name: FeaturedImage
      type: MediaField
      optional: true

# Article - blog post, news article
content_type:
  name: Article
  parts: [TitlePart, AutoroutePart, BodyPart, SeoMetaPart, PublishLaterPart]
  fields:
    - name: Author
      type: ContentPickerField
    - name: FeaturedImage
      type: MediaField
    - name: Categories
      type: TaxonomyField
    - name: Tags
      type: TaxonomyField
    - name: ReadTime
      type: NumericField
      computed: true

# Event - calendar event
content_type:
  name: Event
  parts: [TitlePart, AutoroutePart, BodyPart]
  fields:
    - name: StartDate
      type: DateTimeField
      required: true
    - name: EndDate
      type: DateTimeField
    - name: Location
      type: TextField
    - name: VirtualLink
      type: LinkField
    - name: RegistrationUrl
      type: LinkField

API Considerations

Content Type to API Shape

Content types should map cleanly to API responses:

{
  "id": "abc123",
  "contentType": "BlogPost",
  "displayText": "My Blog Post Title",
  "createdUtc": "2025-01-15T10:30:00Z",
  "modifiedUtc": "2025-01-15T14:22:00Z",
  "publishedUtc": "2025-01-15T14:22:00Z",
  "owner": "user123",
  "parts": {
    "TitlePart": {
      "title": "My Blog Post Title"
    },
    "AutoroutePart": {
      "path": "/blog/my-blog-post-title"
    }
  },
  "fields": {
    "FeaturedImage": {
      "paths": ["/media/hero.jpg"],
      "alt": "Hero image"
    },
    "Author": {
      "contentItemIds": ["author456"]
    },
    "Categories": {
      "termIds": ["cat1", "cat2"]
    }
  }
}

GraphQL Schema Generation

Content types typically map to GraphQL types:

type BlogPost implements ContentItem {
  contentItemId: ID!
  contentType: String!
  displayText: String
  createdUtc: DateTime
  publishedUtc: DateTime

  # Parts
  titlePart: TitlePart
  autoroutePart: AutoroutePart

  # Fields
  featuredImage: MediaField
  author: ContentPickerField
  categories: TaxonomyField
}

Migration Strategy

From Traditional to Structured

1. Audit existing content
   - Document current structure
   - Identify repeated patterns
   - Note relationships

2. Design target schema
   - Group fields into parts
   - Define content types
   - Plan taxonomies

3. Create mapping
   - Old field -> New field
   - Data transformations needed
   - Default values for new fields

4. Migrate incrementally
   - Start with simpler types
   - Validate after each batch
   - Keep old system running in parallel

Content Type Checklist

Before finalizing a content type:

  • Clear, descriptive name
  • Appropriate parts attached
  • All necessary fields defined
  • Validation rules specified
  • Required vs optional clearly marked
  • API shape considered
  • Localization requirements addressed
  • Search indexing configured
  • Preview/display template planned
  • Editor experience optimized

Related Skills

  • dynamic-schema-design - EF Core JSON columns for custom fields
  • content-relationships - References between content items
  • content-versioning - Draft/publish and version history
  • taxonomy-architecture - Categories and tags
  • headless-api-design - Content delivery APIs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.14%
按下载量换算23

Claude

30.7%
按下载量换算20

Cursor

16.02%
按下载量换算11

Gemini CLI

9.24%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills