craftcms
Installation
SKILL.md
Craft CMS 5 — Extending (Plugins & Modules)
Reference for extending Craft CMS 5 through plugins and modules. Covers everything from elements and services to controllers, migrations, fields, and events.
This skill is scoped to extending Craft — building plugins, modules, custom element types, field types, and backend integrations. For site/platform development (content modeling, sections, entry types, Twig templating, plugin selection), see the craft-site skill.
Companion Skills — Always Load Together
When this skill triggers, also load:
craft-php-guidelines— PHPDoc standards, section headers, naming conventions, class organization, ECS/PHPStan, verification checklist. Required for any PHP code.ddev— All commands run through DDEV. Required for running ECS, PHPStan, scaffolding, and tests.craft-garnish— When working on CP JavaScript, asset bundles, or interactive CP components. Covers Garnish's class system, UI widgets (Modal, HUD, DisclosureMenu, Select), drag system, and the Craft.* JS class pattern.craft-pest— When writing, running, fixing, or reviewing tests. Covers themarkhuot/craft-pest-coreharness, database isolation (its rollback is opt-in and its env overrides are cwd-bound — both cause silent writes to the dev database), factories, HTTP/queue/DB assertions, and CI test jobs.craft-cloud— When the project is hosted on Craft Cloud (detect viacraft-cloud.yamlat the repo root orcraftcms/cloudincomposer.json). Required for plugin Cloud-compatibility constraints —App::isEphemeral()guards, asset-bundle CDN publishing, 15-minute queue-job cap,csrfInput()function over raw token output, and thecloud/updeploy lifecycle events.