Skip to content
Development
Skill

/craft-project-setup

Scaffold 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

From plugin
craftcms-claude-skills
8013 skills6 agents
Install
$ npx -y skills add michtio/craftcms-claude-skills --skill craft-project-setup --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/craft-project-setup

Context preview

The summary Claude sees to decide when to auto-load this skill.

Scaffold 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

SKILL.md

craft-project-setup.SKILL.md
name: craft-project-setup
description: "Scaffold 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: 'set up Claude for this Craft project', 'initialize CLAUDE.md', 'scaffold project config', 'configure Claude Code for Craft', 'create CLAUDE.md', 'missing CLAUDE.md', 'does this project have a CLAUDE.md', 'bootstrap Claude config', 'new Craft project setup', 'onboard a developer to this Craft project', 'generate .claude/rules', 'set up coding standards config', 'upgrade Claude config', 'update CLAUDE.md', 'compare my setup', 'is my config up to date', 'audit my Claude setup', 'redo project setup'. Also triggers when starting work in a new Craft CMS project that lacks a CLAUDE.md file, or when the user wants to check or upgrade an existing configuration. Detects project type from composer.json (craft-plugin, craft-module, project), .ddev/config.yaml, templates/, config/project/, and modules/. NOT for installing Craft CMS itself, creating DDEV environments, writing PHP code, building templates, or content modeling. NOT for non-Craft projects — if the project is React, Next.js, Laravel, or any non-Craft framework, this skill does not apply."

Craft CMS Project Setup

Scaffold Claude Code configuration for Craft CMS projects. Generates a `CLAUDE.md` and `.claude/rules/` directory tailored to the project type.

Companion Skills — Used During Scaffolding

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:

  • **`craftcms`** + **`craft-php-guidelines`** + **`craft-garnish`** — for plugin and module projects (craft-garnish when plugin has CP JavaScript/asset bundles)
  • **`craft-site`** + **`craft-twig-guidelines`** + **`craft-content-modeling`** — for site projects
  • **`ddev`** — for all project types (DDEV commands in generated config)

Workflow

Step 1: Detect the project

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.

Project structure signals

  • `.ddev/config.yaml` — DDEV project name, PHP version, database type, Node version
  • `composer.json` — package type (`craft-plugin`, `craft-module`, or `project`), dependencies, scripts (check-cs, phpstan, pest)
  • `src/` or `src/Plugin.php` — plugin source directory
  • `templates/` — site templates
  • `config/project/` — Craft project config (indicates a site)
  • `config/general.php` — Craft general config
  • `modules/` — custom modules
  • `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.
  • `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.

Dependency detection (from composer.json `require` and `require-dev`)

Scan `composer.json` dependencies to auto-detect capabilities. Never ask the user about things you can read:

| Package | What it tells you | |---------|------------------| | `nystudio107/craft-seomatic` | SEOmatic installed — `???` operator is available, meta tags handled | | `nystudio107/craft-empty-coalesce` | `???` operator available (standalone) | | `nystudio107/craft-vite` | Vite buildchain with nystudio107 bridge | | `putyourlightson/craft-blitz` | Static caching — affects CSRF, template caching strategy | | `putyourlightson/craft-sprig` | Sprig/htmx available for reactive components | | `verbb/formie` | Formie form builder installed | | `craftcms/ckeditor` | CKEditor for rich text | | `ether/seo` | Alternative SEO plugin (not SEOmatic) | | `craftcms/phpstan-package` or `phpstan/phpstan` | PHPStan available | | `symplify/easy-coding-standard` | ECS available | | `pestphp/pest` | Pest testing framework | | `craftpulse/craft-warp` | Warp installed — the member area is passwordless (magic links, OTP codes, passkeys). Note it in the generated CLAUDE.md and route auth work at the `craft-plugins` skill's `warp.md`; skip the passwordless question in Step 2. | | `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. | | `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. |

Also check `composer.json` `scripts` section for `check-cs`, `phpstan`, `test`, `pest` commands.

Front-end detection (from package.json, config files)

  • `package.json` — Tailwind version (v3 vs v4), Alpine.js, Vue, build tool (Vite vs Webpack)
  • `tailwind.config.*` or `@tailwind` in CSS files — Tailwind v3
  • `@theme` in CSS files — Tailwind v4
  • `vite.config.*` — Vite configuration
  • `templates/_atoms/`, `_molecules/`, `_organisms/` — atomic design patterns

Git detection

  • `git branch --show-current` — current branch name
  • `git remote -v` — remote URL
  • `git log --oneline -10` — recent commit style (conventional commits? prefixed?)
  • Default branch: check `git symbolic-ref refs/remotes/origin/HEAD` or look at branch names. Common patterns:
Read more
Ships withcraftcms-claude-skills

Production-ready Claude Code skills, agents, and project templates for Craft CMS 5 development. Built and maintained by michtio.

Get the whole plugin

Other skills on craftcms-claude-skills.