michtio/craftcms-claude-skills/craft-project-setup
Claude Code and agent skill by michtio/craftcms-claude-skills
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install michtio/craftcms-claude-skills/craft-project-setupSKILL.md
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 versioncomposer.json— package type (craft-plugin,craft-module, orproject), dependencies, scripts (check-cs, phpstan, pest)src/orsrc/Plugin.php— plugin source directorytemplates/— site templatesconfig/project/— Craft project config (indicates a site)config/general.php— Craft general configmodules/— custom modulescraft-cloud.yamlat the repo root — Craft Cloud project. When present, include thecraft-cloudskill in the generated CLAUDE.md companion-skill list and add a "Hosted on Craft Cloud" note in the generated project context. See thecraft-cloudskill'sconfig-file.mdfor the file's role.servd.yamlat the repo root, orservd/craft-asset-storageincomposer.json, orSERVD_PROJECT_SLUG/SERVD_SECURITY_KEYenv vars — Servd project. When present, include theservdskill in the generated CLAUDE.md companion-skill list and add a "Hosted on Servd" note in the generated project context. See theservdskill for the platform's constraints..fortrabbit/deploy.yml(or.yaml,.json) in the repo, orFORTRABBIT_*variables referenced in config, or*.frbit.app/ssh.<region>.frbit.apphostnames in scripts or docs — fortrabbit project. When present, include thecraft-fortrabbitskill in the generated CLAUDE.md companion-skill list and add a "Hosted on fortrabbit" note in the generated project context. See thecraft-fortrabbitskill'slimitations.mdfor the detection signals.
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@tailwindin CSS files — Tailwind v3@themein CSS files — Tailwind v4vite.config.*— Vite configurationtemplates/_atoms/,_molecules/,_organisms/— atomic design patterns
Git detection
git branch --show-current— current branch namegit remote -v— remote URLgit log --oneline -10— recent commit style (conventional commits? prefixed?)- Default branch: check
git symbolic-ref refs/remotes/origin/HEADor look at branch names. Common patterns:main,master,develop
Chrome DevTools MCP detection
- Check
.claude.jsonfor existing MCP configuration - If not present, ask: "Would you like to install Chrome DevTools MCP for browser debugging? Enables inspecting CP templates, front-end pages, console errors, and visual testing."
- If yes: run
claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latestand note session restart is needed
From these signals, determine the project type:
| Signal | Type | |
|---|---|---|
composer.json type is craft-plugin | Plugin | |
composer.json type is craft-module | Module | |
config/project/ exists, templates/ exists | Site | |
Site signals + modules/ directory | Hybrid (site + custom module) | |
| Multiple Craft packages/projects in subdirectories | Monorepo (see below) |
Monorepo detection
A monorepo holds more than one independently-typed Craft package under one repository. Confirm at least one of these signals before classifying as monorepo — a single project with a modules/ folder is a Hybrid, not a monorepo:
- Multiple `composer.json` in subtrees with Craft types. Run
find . -name composer.json -not -path '*/vendor/*' -not -path '*/node_modules/*'and check thetypeof each. Two or more withcraft-plugin,craft-module, orproject(in distinct directories, not the repo root alone) means monorepo. - Root `composer.json` with path repositories. A root
composer.jsonwhoserepositoriesarray contains{ "type": "path", "url": "packages/*" }(or similar) wiring local packages together. - Workspace layout. A
packages/,plugins/,apps/, orsites/directory each containing its own composer-typed package, optionally with a rootpackage.jsondeclaringworkspaces.
When unsure between hybrid and monorepo: if the extra code lives inside one Craft install (modules/ under the site root, sharing its composer.json), it's hybrid. If each package has its own composer.json and could be installed independently, it's a monorepo.
Step 2: Ask clarifying questions
Confirm the detected type and gather project-specific details. Keep it short — 3-5 questions max.
For plugins:
- Plugin handle and vendor namespace (detect from
composer.jsonif possible) - Does it have custom element types?
- What Craft edition does it target? (Solo, Team, Pro)
For sites:
- CSS framework? (detect Tailwind version from
package.jsonortailwind.config.*) - Are they using atomic design patterns? (detect
_atoms/,_molecules/in templates) - Any custom modules alongside the site?
- Passwordless login — only when the site has (or will have) a front-end member area; skip otherwise. Detect first:
craftpulse/craft-warpincomposer.jsonmeans passwordless is already chosen — don't ask, record it, and route auth work at thecraft-pluginsskill'swarp.md. With a member area and no auth plugin detected, ask: "Should members sign in passwordless — magic links, email codes, passkeys — instead of passwords? (yes/no)" On yes, suggest Warp (craftpulse/craft-warp, commercial — the passwordless plugin this pack documents) and writeAuth: passwordless via Warp (proposed)into the generated CLAUDE.md so the planner proposes it at build time. Suggest only — nevercomposer requirea plugin without explicit approval. On no, writeAuth: password-basedand point front-end auth work at thecraft-siteskill'sauth-flows.md.
For all types:
- Confirm detected tooling: ECS, PHPStan, Pest (from
composer.jsonscripts) - Git workflow: main branch name, PR-based workflow?
- Chrome DevTools MCP: offer installation if not already in
.claude.json - Dev root folder: "Where is your development root? (e.g.,
~/dev/)" — this is the parent folder where the planner can clone public repos for research and audits. Detect by looking at the project's parent directory. Store in the generated CLAUDE.md asdevRootPath. - Hosting target — sites, hybrid, and monorepo projects only; skip for standalone plugins/modules (they're distributed as packages, not deployed to a host, so a hosting target is meaningless for them). Detect from signals first. If
craft-cloud.yamlexists at the repo root ORcraftcms/cloudis incomposer.json, this is a Craft Cloud project. Ifservd.yamlexists at the repo root ORservd/craft-asset-storageis incomposer.jsonORSERVD_*env vars are set, this is a Servd project. If a.fortrabbit/deploy file exists OR config referencesFORTRABBIT_*variables, this is a fortrabbit project. Confirm with the user but don't ask redundantly. If no hosting signal is present, ask: "Will this project deploy to Craft Cloud, Servd, fortrabbit, somewhere else (Forge, bare metal, etc.), or is that not decided yet?" Record the answer in the generated CLAUDE.md under a "Hosting" block. When the answer is Cloud, include thecraft-cloudskill; when it's Servd, include theservdskill; when it's fortrabbit, include thecraft-fortrabbitskill; either way surface that platform's build/deploy/runtime constraints. When it's something else, note the platform so future sessions know which deployment pattern applies (point at thecraftcmsskill'sdeployment.md). When it's not decided yet, writeHosting: TBDin the block (don't force a choice) — a later session should re-detect from signals (craft-cloud.yaml/servd.yaml/.fortrabbit/deploy.yml/ the hosting packages appearing incomposer.json) and, if still none, re-ask once the decision is made.
Do not ask about things you already detected. If composer.json shows nystudio107/craft-seomatic is installed, the generated templates.md should state "??? operator is available (provided by SEOmatic)" — not flag it as unknown. If phpstan/phpstan is in require-dev, include PHPStan commands in the generated CLAUDE.md — don't ask "do you use PHPStan?" Present your detection results for confirmation, not as questions.
Step 3: Generate the configuration
Generate CLAUDE.md and .claude/rules/ files. Two sources:
- From templates — files in
templates/{type}/are starting points. Replace placeholders ({{pluginHandle}},{{vendorNamespace}},{{pluginName}},{{composerName}}= the composer.jsonname, e.g.acme/my-plugin), customize based on detection results. These exist and are ready to use. - Generated from context — files not in
templates/must be written from scratch based on the project's actual setup. Use the skill references, detection results, and user answers to produce these. Don't skip a file just because no template exists.
Before generating, verify which templates exist for the detected project type:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/craft-project-setup/SKILL.md
Popularity
- Repository stars
- 71
- Repository forks
- 6
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 15 Aug 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/michtio/craftcms-claude-skills/craft-project-setup)