/craftcms-claude-skills:craft-sitefrom craftcms-claude-skills
Guides Craft CMS 5 front-end Twig development using atomic design: components, layouts, Vite buildchain, multi-brand CSS tokens, JavaScript boundaries (Alpine/DataStar/Vue), and front-end auth. Activates on Twig includes, embeds, component patterns, and Craft-specific template structures.
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.
!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+]).
Atomic design system patterns for Craft CMS 5 site templates. Vanilla Twig — no module dependency. Works with any Craft 5 project.
This skill is scoped to front-end template architecture — component design,
routing, composition, theming, and buildchain. For extending Craft (plugins,
modules, PHP), see the craftcms skill.
When this skill triggers, also load:
craft-twig-guidelines: Twig coding standards (naming, null handling, whitespace, include isolation, Craft helpers). Required for any Twig code.craft-content-modeling: sections, entry types, fields, Matrix, relations. Required when deciding what content to query.ddev: all Vite, npm and Craft CLI commands run through DDEV.craft-cloud: when hosted on Craft Cloud (craft-cloud.yaml or craftcms/cloud). Edge static caching rules, cloud.esi(...) islands, edge transform constraints, csrfInput() on cacheable pages.servd: when hosted on Servd (servd.yaml or servd/craft-asset-storage). Servd static caching, {% dynamicInclude %} islands, Blitz in reverse-proxy mode, off-server transforms.craft-fortrabbit: when hosted on fortrabbit (.fortrabbit/deploy.yml or FORTRABBIT_* vars). Asset volumes and deployments, queue and transforms in a worker job, site URL from FORTRABBIT_MAIN_DOMAIN.craft-plugins: when the task names a third-party plugin (Formie, SEOmatic, Blitz, ...). Per-plugin configuration, Twig API and pitfalls (see Plugin References below).Use WebFetch on specific doc pages when a reference file doesn't cover enough detail.
only on {% include %} — ambient variables leak in silently.{% if variant == 'x' %}) instead of extends/block.hero-button) instead of visual treatment (button--primary).utilities prop used as override — it's additive. Override via named-slot merge..eagerly() on relation fields in views — causes N+1 queries.devMode fallback in builders for unknown block types.csrfInput(), active nav state or language switcher inside {% cache %}. The first render is replayed to everyone. See template-caching.md.bg-yellow-600) instead of brand tokens (bg-brand-accent).<a>, <button>, or <span> from props), links are navigation (always <a>). Separate atom categories.project-config/touch after editing YAML outside the CP — Git pulls, manual edits, and merge conflict resolution don't update dateModified. Run ddev craft project-config/touch then ddev craft up, or craft up on other environments won't detect the change.url → <a>, type → <button>, fallback <span>); external links are detected from the URL, never passed as a prop. See atomic-patterns.md (Component System Conventions).custom:name) have no FA class, so branch on icon.set and output icon.svg|raw.{% embed %}.data-brand="{{ currentSite.handle }}" on <html>, three token layers. Tailwind v4 cascade layers don't replace named keys. See tailwind-conventions.md (CSS & Theming Conventions).collect() builds props and classes. JS: Twig → Alpine/DataStar → Vue. See boilerplate-routing.md (Routing Conventions).Read the relevant reference file(s) for your task. Multiple files often apply together.
Task examples:
atomic-patterns.md + composition-patterns.md + component-inventory.md + tailwind-conventions.mdboilerplate-routing.md + component-inventory.mdboilerplate-routing.md + composition-patterns.mdimage-presets.md + craft-plugins → image-optimize.md (or imager-x.md){% cache %}" / "scripts blocked by CSP nonce after adding {% cache %}" → read template-caching.md (CSP Nonces)generate-transform URLs" → read image-presets.md (Transform Generation Timing) + craft-plugins → image-optimize.mdtailwind-conventions.md + twig-collections.mdjavascript-boundaries.mdatomic-design.mdvite-buildchain.md; craft.vite.* functions → craft-plugins → vite.mdthird-party-integration.mdthird-party-integration.md + craft-plugins → amazon-ses.mdcraft-plugins skill, references/<plugin>.md: SEOmatic for a section (seomatic.md), Blitz with Cloudflare (blitz.md), add a form (formie.md), CKEditor nested entries (ckeditor.md), navigation menu (navigation.md), link field (hyper.md), redirects (retour.md), recurring dates (timeloop.md), JSON API endpoint (element-api.md), N+1 debugging (elements-panel.md), security audit (sherlock.md), YouTube/Vimeo as asset (embedded-assets.md), live search / reactive filtering / load-more (sprig.md), import a feed (feed-me.md), Imager-X responsive images (imager-x.md)multi-site-patterns.mdauth-flows.md; "user profile edit page" → read auth-account.mdsearch.mdfeeds.mdheadless.md; members logging in to a headless front end → headless.md (Signed-In Members over OAuth)_partials/ templates" / "render Matrix blocks with partials" → read element-partials.md; "use {% render %} / why is loop defined in my partial" → element-partials.md (The {% render %} Tag)craft.<handle>.thing().render())" → read example-templates.md| Reference | Scope |
|---|---|
references/atomic-design.md | Methodology: atomic design principles, 5-to-3 tier compression, context-agnostic naming, decompose-downward workflow |
references/atomic-patterns.md | Component construction: props/extends/block, variant files, button/link/text/icon atoms, component system conventions |
references/composition-patterns.md | Molecules, organisms, structural embeds, include/extends/embed decision table, calling conventions |
references/component-inventory.md | Classification decision tree, naming, props design, scaffolding, tier promotion, audit checklist |
references/boilerplate-routing.md | Layout chain, section template paths, globals, routers, views, content builders, directory structure, routing conventions |
references/tailwind-conventions.md | Named-key collections, utilities prop, dark mode, spacing, CSS & theming conventions (multi-brand tokens) |
references/vite-buildchain.md | nystudio107 Vite bridge, config/vite.php, vite.config.ts, craft.vite.script(), per-page loading, Tailwind v4, DDEV |
references/image-presets.md | Image atom with presets, srcset/sizes, ImageOptimize vs Craft Cloud, transform timing (generateTransformsBeforePageLoad) |
references/template-caching.md | {% cache %}: keying (globally, using key), what may go inside, CSP nonces, nav/footer example, transform URLs, verification |
references/javascript-boundaries.md | JS decision tree: Twig → Alpine/DataStar → Vue, mount points, data handoff, coexistence rules |
references/twig-collections.md | collect() method reference: creating, accessing, transforming, filtering, sorting, slicing, arrow functions |
references/third-party-integration.md | Script order, CMP, GTM/sGTM, analytics, SES transport, n8n webhooks, plugin CSS cascade, hand-written plugin widget templates, Blitz, head template |
references/multi-site-patterns.md | Language switchers, hreflang, site architectures, cross-site queries, static translations, multi-site forms |
references/auth-flows.md | Front-end authentication forms: login, registration, password reset, set new password |
references/auth-account.md | Account management: edit profile, email verification, navigation partial, access control tags, user session helpers, GeneralConfig auth settings |
references/search.md | Search: syntax, Twig queries, configuration, indexing, rebuilding, score and ranking |
references/feeds.md | Feeds: RSS 2.0, Atom, JSON Feed, XML sitemap, custom routes, date filters |
references/headless.md | headlessMode, GraphQL schemas and tokens, members over OAuth with currentUser [5.12+], CORS, preview tokens, Next.js/Nuxt/Astro |
references/element-partials.md | Element partials: entry.render(), {% render %} tag and collection render() [5.12+], _partials/ directory, template lookup, custom variables, eager loading in partials |
references/example-templates.md | Plugin example-template bundles and install command, fluent craft.<handle>.<thing>({...}).render() BaseTag builders, progressive enhancement |
Per-plugin configuration, Twig API and pitfalls live in the craft-plugins skill (references/<plugin>.md), so back-end, migration and deployment tasks find them too. For Formie, SEOmatic, Blitz, Imager-X / ImageOptimize, Sprig, CKEditor, Hyper, Navigation, Embedded Assets, Vite, Typogrify or Colour Swatches, load craft-plugins and open the matching reference.
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/atomic-design.md (opens in a new tab)references/atomic-patterns.md (opens in a new tab)references/auth-account.md (opens in a new tab)references/auth-flows.md (opens in a new tab)references/boilerplate-routing.md (opens in a new tab)references/component-inventory.md (opens in a new tab)references/composition-patterns.md (opens in a new tab)references/element-partials.md (opens in a new tab)references/example-templates.md (opens in a new tab)references/feeds.md (opens in a new tab)references/headless.md (opens in a new tab)references/image-presets.md (opens in a new tab)references/javascript-boundaries.md (opens in a new tab)references/multi-site-patterns.md (opens in a new tab)references/search.md (opens in a new tab)references/tailwind-conventions.md (opens in a new tab)references/template-caching.md (opens in a new tab)references/third-party-integration.md (opens in a new tab)references/twig-collections.md (opens in a new tab)references/vite-buildchain.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Triggers on: {% include ... only %}, {% embed %}, _atoms/_molecules/_organisms/_views/_builders, component--variant.twig, _component--props.twig, collect({}), utilities prop, data-brand theming, hero/card components, Matrix block rendering, craft.vite.script, vite.config.ts, responsive images, srcset, image transforms, SEOmatic meta/OpenGraph, multi-language, hreflang, Formie form styling, XML sitemap, search page and Sprig/htmx live search, headless GraphQL, Next.js/Nuxt/Astro, fluent BaseTag {{ tag.render() }}. Always use when creating, editing, or reviewing Craft front-end Twig templates, components, layouts, views, builders, buildchain, or front-end auth, including plugin template integration (Blitz, SEOmatic, Sprig, Formie, Imager-X). Do NOT trigger for PHP plugin/module development (craftcms) or content modeling (craft-content-modeling).
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-content-modelingCraft CMS 5 content modeling: sections, entry types, fields, Matrix, relations, project config, and content architecture strategy. Covers choosing section types, designing entry types and field layouts, selecting field types, Matrix and nested entries, relations and eager loading, and multi-site propagation./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.Other plugins' skills for the same job