$npx -y skills add michtio/craftcms-claude-skills --skill craft-project-setupScaffold Claude Code configuration specifically for Craft CMS projects. Generates CLAUDE.md and .claude/rules/ files tailored to the project type (plugin, site, module, hybrid, or monorepo). Only for Craft CMS projects — not for Next.js, Laravel, or other frameworks. Triggers on:
| 1 | # Craft CMS Project Setup |
| 2 | |
| 3 | Scaffold Claude Code configuration for Craft CMS projects. Generates a `CLAUDE.md` and `.claude/rules/` directory tailored to the project type. |
| 4 | |
| 5 | ## Companion Skills — Used During Scaffolding |
| 6 | |
| 7 | This skill generates configuration that references other skills. It does not load them at activation, but the generated CLAUDE.md and rules will guide users toward: |
| 8 | |
| 9 | - **`craftcms`** + **`craft-php-guidelines`** + **`craft-garnish`** — for plugin and module projects (craft-garnish when plugin has CP JavaScript/asset bundles) |
| 10 | - **`craft-site`** + **`craft-twig-guidelines`** + **`craft-content-modeling`** — for site projects |
| 11 | - **`ddev`** — for all project types (DDEV commands in generated config) |
| 12 | |
| 13 | ## Workflow |
| 14 | |
| 15 | ### Step 1: Detect the project |
| 16 | |
| 17 | Read the project root to determine what exists. **Detect, don't assume.** Every piece of information below should be resolved by reading actual project files — never flag something as "unknown" when the answer is in `composer.json`, `package.json`, `.ddev/config.yaml`, or `git` state. |
| 18 | |
| 19 | #### Project structure signals |
| 20 | |
| 21 | - `.ddev/config.yaml` — DDEV project name, PHP version, database type, Node version |
| 22 | - `composer.json` — package type (`craft-plugin`, `craft-module`, or `project`), dependencies, scripts (check-cs, phpstan, pest) |
| 23 | - `src/` or `src/Plugin.php` — plugin source directory |
| 24 | - `templates/` — site templates |
| 25 | - `config/project/` — Craft project config (indicates a site) |
| 26 | - `config/general.php` — Craft general config |
| 27 | - `modules/` — custom modules |
| 28 | - `craft-cloud.yaml` at the repo root — **Craft Cloud project.** When present, include the `craft-cloud` skill in the generated CLAUDE.md companion-skill list and add a "Hosted on Craft Cloud" note in the generated project context. See the `craft-cloud` skill's `config-file.md` for the file's role. |
| 29 | - `servd.yaml` at the repo root, or `servd/craft-asset-storage` in `composer.json`, or `SERVD_PROJECT_SLUG`/`SERVD_SECURITY_KEY` env vars — **Servd project.** When present, include the `servd` skill in the generated CLAUDE.md companion-skill list and add a "Hosted on Servd" note in the generated project context. See the `servd` skill for the platform's constraints. |
| 30 | |
| 31 | #### Dependency detection (from composer.json `require` and `require-dev`) |
| 32 | |
| 33 | Scan `composer.json` dependencies to auto-detect capabilities. Never ask the user about things you can read: |
| 34 | |
| 35 | | Package | What it tells you | |
| 36 | |---------|------------------| |
| 37 | | `nystudio107/craft-seomatic` | SEOmatic installed — `???` operator is available, meta tags handled | |
| 38 | | `nystudio107/craft-empty-coalesce` | `???` operator available (standalone) | |
| 39 | | `nystudio107/craft-vite` | Vite buildchain with nystudio107 bridge | |
| 40 | | `putyourlightson/craft-blitz` | Static caching — affects CSRF, template caching strategy | |
| 41 | | `putyourlightson/craft-sprig` | Sprig/htmx available for reactive components | |
| 42 | | `verbb/formie` | Formie form builder installed | |
| 43 | | `craftcms/ckeditor` | CKEditor for rich text | |
| 44 | | `ether/seo` | Alternative SEO plugin (not SEOmatic) | |
| 45 | | `craftcms/phpstan-package` or `phpstan/phpstan` | PHPStan available | |
| 46 | | `symplify/easy-coding-standard` | ECS available | |
| 47 | | `pestphp/pest` | Pest testing framework | |
| 48 | | `craftcms/cloud` | **Project hosted on Craft Cloud.** Load the `craft-cloud` companion skill; document Cloud-specific build, deploy, and runtime constraints in the generated CLAUDE.md. | |
| 49 | | `servd/craft-asset-storage` | **Project hosted on Servd.** Load the `servd` companion skill; document Servd's deploy workflow, ephemeral filesystem, static caching, and asset storage in the generated CLAUDE.md. | |
| 50 | |
| 51 | Also check `compose |