michtio/craftcms-claude-skills/ddev
Claude Code and agent skill by michtio/craftcms-claude-skills
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
DDEV local development environment for Craft CMS projects. ALWAYS load this skill when running any ddev command, configuring .ddev/config.yaml, or troubleshooting local container issues. Covers config.yaml (project type, PHP/Node versions, database, docroot), shorthand commands, add-ons and built-in Mailpit, custom commands, Vite dev server exposure, database import/export, Xdebug toggling, sharing local sites, and troubleshooting (port conflicts, container restarts, ddev-injected env vars sile…
Install
npx vskill@latest install michtio/craftcms-claude-skills/ddevSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
DDEV for Craft CMS Development
Companion Skills — Always Load Together
When this skill triggers, also load:
- `craftcms` — Plugin/module development. Required when DDEV commands involve Craft CLI (
ddev craft make,ddev craft migrate,ddev craft project-config). - `craft-php-guidelines` — PHP coding standards. Required when DDEV commands involve code quality tooling (
ddev composer check-cs,ddev composer phpstan,ddev exec --dir … vendor/bin/pest).
Documentation
- DDEV docs: https://docs.ddev.com/en/stable/
- Craft CMS quickstart: https://docs.ddev.com/en/stable/users/quickstart/#craft-cms
- Configuration reference: https://docs.ddev.com/en/stable/users/configuration/config/
- Custom commands: https://docs.ddev.com/en/stable/users/extend/custom-commands/
- Additional services: https://docs.ddev.com/en/stable/users/extend/additional-services/
- Vite integration: https://docs.ddev.com/en/stable/users/usage/developer-tools/#nodejs
When unsure about a DDEV feature, WebFetch the relevant docs page.
Common Pitfalls
- Using
ddev exec composer installinstead ofddev composer install— DDEV shorthand commands handle path resolution and environment setup. Always use the shorthand. - Forgetting
ddev craft updoes bothmigrate/allandproject-config/apply— no need to run them separately after pulls or deploys. - Exposing the Vite dev server with
portsinstead ofweb_extra_exposed_ports—portscauses conflicts when running multiple DDEV projects.web_extra_exposed_portsroutes through Traefik and works with HTTPS. - Running
ddev composer global require— global packages install inside the container and vanish on restart. Install project-level dependencies only. - Setting
nodejs_versionbut runningnpm installon the host — Node must run inside the container viaddev npmto match the configured version. - Editing
.ddev/config.yamlwhile containers are running without restarting — changes to config requireddev restartto take effect. - Using
ddev import-dbwithout--target-db=dbon multi-database setups — the default target isdb, but if you've configured additional databases, be explicit. - Adding
#ddev-generatedto custom commands you've customized — DDEV overwrites files with this comment during updates. Only use it for add-on-managed commands. Custom commands you maintain should omit it. - Running
composer installon the host thenddev composer check-cs/ddev composer phpstan— if the host PHP version differs from DDEV's (e.g., host PHP 8.4, DDEV PHP 8.3),vendor/composer/platform_check.phpfails. Always runddev composer installsovendor/matches the container's PHP version.
Craft CLI First, Raw SQL Last
Always prefer Craft CLI commands over raw database queries:
Only fall back to ddev mysql when no CLI equivalent exists (e.g., checking table schemas, debugging specific rows, TRUNCATE cache for stuck mutex locks). Craft CLI commands handle project config, search index updates, and event firing that raw SQL skips.
Shorthand Commands
Always use DDEV shorthand over ddev exec:
Craft CMS Project Type
DDEV auto-injects: CRAFT_DB_SERVER, CRAFT_DB_USER, CRAFT_DB_PASSWORD, CRAFT_DB_DATABASE, PRIMARY_SITE_URL. These are injected into the container via .ddev/.env.web and can be opted out of with disable_settings_management: true in .ddev/config.yaml.
New Project Bootstrap
The canonical flow for a fresh DDEV + Craft project:
ddev composer create-project launches Craft's interactive install wizard on completion. If it doesn't run (or you need to re-run it), use ddev craft install. Swap craftcms/craft for a community starter project to bootstrap from one instead.
Common Commands
Post-Install Auto-Run
Composer scripts auto-run craft up after install/update:
No need to manually run ddev craft migrate/all or ddev craft project-config/apply — ddev craft up does both, and it auto-runs after ddev composer install/update.
Add-ons
Mailpit is built into DDEV core — no add-on installation needed. Outgoing mail is captured automatically. Access the web UI with ddev mailpit, or ddev describe shows its URL (e.g. https://{project}.ddev.site:8026).
Sharing a Local Site
ddev share defaults to the ngrok provider, which requires a free ngrok.com account and a configured ngrok auth token. (cloudflared is an alternative provider via --provider=cloudflared, no account required, but ngrok is the default.)
Custom Commands
Place scripts in .ddev/commands/web/ (container) or .ddev/commands/host/ (host):
Note: omit #ddev-generated on custom commands you maintain — DDEV overwrites files with that comment during updates. Only add-on-managed commands should include it.
Composer Path Repos and Volume Mounts
When developing plugins locally, Composer path repos symlink the plugin into vendor/. For this to work inside DDEV's Docker container, the host path must be volume-mounted so the symlink resolves.
Setup
- composer.json — use the local host path:
- docker-compose override — mount the same path into the container. Create
.ddev/docker-compose.mounts.yaml:
The mount path inside the container must match the host path exactly — Composer creates absolute symlinks that must resolve in both contexts. Replace /Users/Shared/dev/craft-plugins with your actual plugin directory path.
- Require the plugin:
ddev composer require vendor/plugin-handle:@dev
Common mistakes
- Using a Docker-internal path in
composer.jsonurl— the path must be the host filesystem path, not/var/www/... - Forgetting the volume mount —
ddev composer installsucceeds but the symlink points nowhere inside the container - Setting
"platform": {"php": "8.3"}incomposer.jsonconfig— don't. DDEV handles the PHP version via.ddev/config.yaml. Platform overrides cause dependency resolution mismatches between host and container, and prevent DDEV from managing version upgrades cleanly.
Browser Debugging with Chrome DevTools MCP
The Chrome DevTools MCP server gives Claude Code direct browser access — inspect pages, read console logs, check network requests, capture screenshots, and interact with the DOM.
Installation
Quit and reopen Claude Code to load the new MCP server. Requires Chrome or Chromium running — the MCP server handles the DevTools Protocol connection automatically.
What it enables
| Capability | Use Case | |
|---|---|---|
| Page inspection | Check rendered HTML, verify template output, inspect meta tags | |
| Console logs | Catch Twig errors, JS exceptions, Garnish initialization failures | |
| Network requests | Debug 404 assets, failed AJAX calls, Sprig/htmx swaps | |
| DOM queries | Verify form markup, check field rendering, validate ARIA attributes | |
| Screenshots | Visual verification of CP templates, responsive testing | |
| Navigation & login | Authenticate into the CP, navigate to plugin settings/edit pages |
When to use
- Front-end template debugging — 404s, missing assets, broken layouts, SEOmatic meta tag verification
- CP template verification — plugin settings pages render correctly, editable tables work, slideout editors load
- Garnish/JS debugging — modals, drag-sort, disclosure menus initialize without console errors
- Sprig/htmx debugging — watch network requests for htmx swaps, verify response HTML fragments
- Auth flow testing — walk through login, registration, password reset end-to-end
- Read-only mode verification — confirm settings pages display correctly with
allowAdminChangesoff - Visual regression — screenshot before/after template changes
CP authentication pattern
DDEV sites are accessible at https://{project}.ddev.site. To inspect CP pages:
- Navigate to
https://{project}.ddev.site/{cpTrigger} - Log in with admin credentials
- Navigate to the plugin/settings page to inspect
- Check console for JS errors, inspect DOM for correct markup
Project setup
The craft-project-setup skill offers to install Chrome DevTools MCP during scaffolding. If installed later, run claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest from the project root — this writes to the project's .claude.json, keeping it project-level.
Running a Plugin's Own Test Suite
When a plugin is symlinked into a host project, run its suite from the plugin's own directory inside the container:
--dir sets the working directory, and that is the load-bearing part. markhuot/craft-pest-core reads its environment overrides from getcwd().'/phpunit.xml(.dist)' only — it does not parse a --configuration= flag. So the shared-root form:
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 reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ddev/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. Not refreshed yet.
Extension points
pluginCustom plugin integration
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/ddev)