/craftcms-claude-skills:craft-content-modelingfrom craftcms-claude-skills
Guides content architecture in Craft CMS 5: sections, entry types, fields, Matrix, relations, project config, and multi-site propagation. Use when planning content structure or running project-config commands.
Ships in craftcms-claude-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
!sh ${CLAUDE_SKILL_DIR}/scripts/craft-version.sh
If no Craft version line appears above, establish the version before any version-specific advice: craftcms/cms in composer.lock for a site, the lowest version the craftcms/cms constraint in composer.json allows for a plugin, or ask. Then check it against the version tags in this skill ([5.10+], [changed 5.12], [seomatic 5.1+]).
How to structure content in Craft CMS 5: sections, entry types, fields, Matrix, relations, asset management, and strategic patterns for real projects. This skill covers content architecture (what goes in the CP, how it's organized, and how templates access it). For extending Craft with PHP (plugins, modules, custom element types), see the craftcms skill.
When this skill triggers, also load:
craft-site — Template architecture, component patterns, routing. Required when content decisions affect how templates render data.craft-twig-guidelines — Twig coding standards. Required when writing any Twig examples or template code alongside content modeling.ddev — All commands run through DDEV. Required for running project config commands, Craft CLI, and content migrations.Craft docs links (entries, sections, fields, field types, Matrix, relations, eager loading, project config): references/sections-and-entry-types.md (Documentation). Use WebFetch on specific doc pages when a reference file doesn't cover enough detail.
Everything is becoming an entry. Entry types are global (shared across sections and Matrix fields) and fields come from a global pool. Categories, tags, and global sets are deprecated in Craft 5 (still creatable in the CP) and removed in Craft 6. For new projects, always use entries: Structure sections for hierarchical taxonomy, Channel sections for flat taxonomy, Singles for site-wide settings. Timeline and entrify commands: references/content-patterns.md (Entries-as-Taxonomy).
Three decisions define your content architecture: the section type (Single, Channel, Structure), the entry types that define its shape (global, reusable), and the relation strategy (Entries fields, Matrix, CKEditor nested entries, or a combination).
CMS edition first: multiple custom user groups with per-group edit/view restrictions need Pro or Enterprise; Team has one fixed "Team" group and a 5-user cap. Editions table: references/users-and-permissions.md.
| Need | Section Type | URI Example |
|---|---|---|
| One-off page (homepage, about, contact) | Single | __home__, about |
| Site-wide settings (footer, header config) | Single (no URI, preloadSingles) | — |
| Flat collection (blog, news, events) | Channel | blog/{slug} |
| Hierarchical pages (docs, services) | Structure | {parent.uri}/{slug} |
| Taxonomy (topics, categories) | Structure (replaces categories) | topics/{slug} |
| Flat tags | Channel (replaces tags) | — |
Section properties (maxAuthors, minAuthors [5.10+], previewTargets), preloadSingles, structure navigation queries, global entry types, per-context overrides [5.6+] and entry type visual identity (description/group [5.8+], uiLabelFormat [5.9+]): references/sections-and-entry-types.md. Singles always propagate to all sites (hard-coded).
Fields are defined once globally and instanced into layouts; an instance can override label, handle, instructions and required. Before proposing any field you MUST:
config/project/fields/ or Settings → Fields).But don't over-reuse: if one instance could reasonably need different settings, split it. The search index can't tell instances apart.
Check every proposed handle against the reserved list (Field::RESERVED_HANDLES [5.8+], 83+ handles, case-insensitive). The common collisions: title, slug, status, url, link, icon, parent, children, owner, site, level, type, author, postDate, enabled, language. Use a domain synonym (heading, targetLink, entryType). Full workflow, synonym table, per-element-type lists and the multi-instance table: references/field-pool-and-handles.md.
Decision table, nested entry type patterns and the CKEditor chunks rendering pattern: references/content-patterns.md.
Once Entries sources have been customized, Craft persists them to elementSources.craft\elements\Entry in config/project/project.yaml and appends each new section to the bottom with generic columns. Required follow-up in the same change set: place the source next to role peers under the right heading, match tableAttributes and defaultSort to the closest similar section, include link only when the section has URLs, drop empty heading: '' leftovers. Precondition, checklist and column keys (field: vs fieldInstance:): references/element-index-sources.md.
content-patterns.md).image, text, link need domain context (featuredImage), not over-specifying (blogFeaturedImage).infrastructure.md).preloadSingles so singles are global Twig variables..eagerly() — every relational field access inside a loop needs it to prevent N+1 queries (relations-and-eager-loading.md).project-config/write and rebuild treat the DB as the source of truth and delete or revert teammates' YAML on a restored prod dump. Run ddev craft up and require a clean project-config/diff first. See infrastructure.md (Project Config Essentials) and the craftcms skill's deployment.md (project-config/write safely).{slug}, {canonicalUid}, or custom fields.allowAdminChanges => false in production — without this, production schema changes won't sync back to dev.@web in filesystem URLs — spoofable or empty in console/queue contexts. Use env vars ($ASSETS_URL) (infrastructure.md).sections-and-entry-types.md).Read the relevant reference file(s) for your task.
Task examples:
field-pool-and-handles.md (Reuse-First Workflow)field-pool-and-handles.md (Reserved handles)sections-and-entry-types.mdcontent-patterns.mdfield-types.mdrelations-and-eager-loading.mdfield-types.md (Matrix section)content-patterns.md + infrastructure.md (propagation)users-and-permissions.mdinfrastructure.md (Project Config Essentials)infrastructure.md (Project Config Essentials) + the craftcms skill's deployment.md (project-config/write safely)infrastructure.md (Storage Model)infrastructure.md (Assets section)object-templates.md (Structure URI Patterns)object-templates.md (Asset Subpath Patterns, The Matrix Gotcha)element-index-sources.md| Reference | Scope |
|---|---|
references/field-pool-and-handles.md | Field instances and overrides, multi-instance vs single-instance fields, the Reuse-First Workflow, reserved handles (full lists and synonyms). |
references/sections-and-entry-types.md | Section properties, singles and preloadSingles, structure navigation queries, global entry types, entry type visual identity. |
references/field-types.md | All built-in field types: settings, Twig access patterns, query syntax, gotchas. Matrix configuration, view modes, nesting. |
references/relations-and-eager-loading.md | relatedTo() shapes (4 forms), .with() eager loading, .eagerly() lazy eager loading, nested eager loading, native eager-loadable attributes. |
references/content-patterns.md | Strategic patterns for blog, portfolio, multi-site corporate. Section/field/relation architecture per pattern. Entrification timeline and migration commands. CKEditor vs Matrix decisions. |
references/users-and-permissions.md | Users, user groups, CMS editions, addresses, permissions architecture, field layout UI elements. |
references/infrastructure.md | Multi-site propagation methods, volume propagation and the add-a-site trap [5.12+], field translation methods, project config workflow, how Craft stores content (five-table model, JSON field values, relations, nested sets), asset volumes/filesystems/transforms. |
references/object-templates.md | Object template syntax: {attribute} vs {{ twig }}, URI formats, asset subpaths, preview targets, owner/rootOwner nesting, structure patterns, the Matrix gotcha. |
references/element-index-sources.md | Entries CP index sources in project config: placement under headings, tableAttributes/defaultSort matched to peer sections, post-create checklist after adding sections. |
House rules: no AI or tool attribution and no co-author trailers in commits, PRs, comments, code or docs; no em dashes in prose; US spelling; no model or vendor names in pack files.
references/content-patterns.md (opens in a new tab)references/element-index-sources.md (opens in a new tab)references/field-pool-and-handles.md (opens in a new tab)references/field-types.md (opens in a new tab)references/infrastructure.md (opens in a new tab)references/object-templates.md (opens in a new tab)references/relations-and-eager-loading.md (opens in a new tab)references/sections-and-entry-types.md (opens in a new tab)references/users-and-permissions.md (opens in a new tab)scripts/craft-version.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Triggers on: single/channel/structure sections, field types, nested entries, relatedTo, .with()/.eagerly(), categories, tags, globals/global sets, preloadSingles, project-config/write/diff/apply/touch, YAML vs DB drift, restored prod DB dump, asset volumes, filesystems, image transforms, user groups, content permissions, entrify/entrification, CKEditor vs Matrix, CMS editions, multi-language/localization, field translation methods, content migration, field instances, Formie forms vs project config, elementSources/Entries index sidebar, tableAttributes, defaultSort, authoring schema from code. Always use when planning content architecture, creating sections/fields, configuring Matrix, setting up relations, choosing field types, designing field layouts, planning multi-site propagation, tidying the Entries element index, or running project-config commands. Do NOT trigger for PHP plugin/module development, custom field type code, front-end Twig, or buildchain.
Three short reads, in order
npx claudepluginhub michtio/craftcms-claude-skills --plugin craftcms-claude-skills16 skills in this plugin
/craft-cloudCraft Cloud, Pixel & Tonic's serverless hosting platform for Craft CMS. Covers craft-cloud.yaml, the Build → Migrate → Release deploy pipeline, the craftcms/cloud extension, edge transforms and static caching (cache.rules, ESI), the Cloud S3 filesystem, MySQL 8 / Postgres 15 (no MariaDB, no tablePrefix), the Console command runner and scheduled cron, queue jobs, custom domains, preview environments per branch, limits (ephemeral filesystem, no SSH, no .htaccess, no built-in mail), Cloud-compatible plugins, and self-hosted → Cloud migration./craftcmsCraft CMS 5 plugin and module development in PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, events, Twig extensions, widgets, permissions, GraphQL, testing, and debugging./craft-fortrabbitfortrabbit (fortrabbit.com): managed PHP hosting with a Craft CMS software template. Covers git push-to-deploy through the fortrabbit GitHub App, the template's build and post-deploy commands, the merge deployment strategy with the /config/project replace pattern, the deploy file (.fortrabbit/deploy.yml) and its replace-by-default trap, CRAFT_* ENV vars mapped from FORTRABBIT_DB_*, production settings (admin changes and updates off), persistent storage for asset volumes and rsync sync, MySQL over an SSH tunnel, the queue and image transforms in a worker job, crons, platform limits (no root, no sendmail), and DDEV local development./craft-garnishGarnish, Craft CMS's built-in JavaScript UI toolkit for the control panel. ALWAYS load when writing, editing, or reviewing JavaScript that runs in the Craft CP: plugin CP assets, custom field type JS, element index JS, CP webpack config, or code importing garnishjs / referencing window.Garnish. Also for CP accessibility, keyboard interactions, drag-sort, and CP JS memory issues./craft-gated-buildBuilds one approved slice with the outside builders listed in .ai/skills-profile.json (local AI, a script) and keeps the pack's gates: craft-gate-writer locks the gate ahead of any builder, each builder gets a brief and returns a handback, the handback is verified, the lock and craft-review-checker cover the result, at most three rounds, and craft-feature-builder takes over when every outside builder fails, is unavailable or passes its timeout setting./craft-mcpCraft CMS 5.12+ MCP servers, OAuth server and personal access tokens: authenticated, public and stdio (mcp/serve) servers, mcp:read/write/admin levels, Settings → MCP, config/mcp.php and config/oauth.php, oauth/generate-keys and CRAFT_OAUTH_PRIVATE_KEY/PUBLIC_KEY on DDEV, production, Cloud, Servd and fortrabbit, connecting Claude Code or another client, the snake_case tool catalogue, and plugin MCP tools, field interfaces and OAuth resources.Other plugins' skills for the same job