/claude-mods:ddev-opsfrom claude-mods
Sets up, audits, and troubleshoots DDEV local development environments. Handles version pinning, config files, database import/snapshots, add-ons, Xdebug, port conflicts, and team-breaking config mistakes.
Ships in claude-mods. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Why: DDEV is the local stack behind most PHP agency sites, and it fails quietly: a default that moved under an unpinned project, a key it silently ignores, one developer's setting committed for the whole team.
Versions verified 2026-10-05 against DDEV v1.25.4. Fast-moving facts (defaults, PHP and Node.js end-of-life floors, built-in command names) live once in
assets/ddev-facts.json;scripts/check-ddev-facts.py --offlinefails if this skill's prose and that file disagree, and--live(weekly) fails when DDEV moves.
Read the project before changing it: .ddev/config.yaml, any config.*.yaml,
ls -a .ddev/, then ddev describe (URLs, ports, services) and ddev version.
Audit it from any directory, <skill-dir> being this skill's folder (the launcher
finds a working Python 3.8+, which matters on Windows where python3 is often a
Store stub):
bash "<skill-dir>/scripts/run-python.sh" "<skill-dir>/scripts/audit-ddev-config.py" /path/to/project
bash "<skill-dir>/scripts/run-python.sh" "<skill-dir>/scripts/audit-ddev-config.py" /path/to/project --json | jq '.data[]'
Exit 10 means findings, sorted high to low (severity, check, file:line, detail); 0
means clean. --ignore <check> documents a deliberate exception.
Run everything through DDEV - ddev composer, ddev php, ddev npm,
ddev exec - so commands use the container's PHP and Node, not the host's.
Snapshot before anything risky, with a unique name:
ddev snapshot --name=before-<task>-$(date +%Y%m%d%H%M%S). A reused name saves
nothing and still exits 0.
Ask before destroying data (Hard rule 11).
Rules 2, 3, 4, 6, 8 and 12 were each seen in a 2026-10-05 read of 36 DDEV-based agency repositories; the rest are quiet failures DDEV's own docs and source describe.
Pin php_version and database to production. Unpinned projects follow DDEV's
defaults, which move: v1.25.0 switched PHP 8.3 to 8.4 and MariaDB 10.11 to 11.8.
Also pin nodejs_version and composer_version: "2".
Per-developer settings never go in config.yaml.
performance_mode, router_http_port/router_https_port,
xdebug_enabled: true, bind_all_interfaces and host_db_port..ddev/config.local.yaml or ddev config global..local files only after DDEV has run in that checkout, because
its .ddev/.gitignore isn't committed. Add .ddev/config*.local.y*ml and
.ddev/.env*.local to the project root's .gitignore.Retired keys do nothing. DDEV loads config non-strictly:
mutagen_enabled: false and nfs_mount_enabled are ignored, not obeyed.
upload_dirs resolve from the docroot. With docroot: web, storage means
web/storage; folders beside the docroot are ../storage and ../node_modules.
Setting the list replaces the type's defaults; override files append to it.
No secrets in committed .ddev/.env* files. Use the .local twin
(.ddev/.env.web.local, v1.25.4+), kept out of git as rule 2 says. Commit a
.example with git add -f, since DDEV's .gitignore hides *.example.
Never hand containers your machine's credentials. Every process in them - Composer and npm scripts included - can use what they reach.
ddev auth ssh -f <key>..ddev/: the project, .ddev/ included, is mounted
into web.Pull sanitised data; never push to production.
db_push_command/files_push_command from your own recipes that can reach
production.files_pull_command that fetches nothing makes ddev pull empty the upload
directory, and the pull still exits 0. Omit the stanza instead.Don't keep project copies of DDEV's built-in commands (craft, npm,
artisan, wp...). A project command shadows the built-in and freezes an old
version. Command files must have LF endings: DDEV skips CRLF ones with only a warning.
Review an add-on before installing it. Its Bash install actions run on your
machine. Prefer official ddev/ add-ons and pin --version.
On Windows, keep projects inside the WSL2 filesystem, never under /mnt/c.
Confirm with the user before destroying data. These destroy data:
ddev delete, ddev stop --remove-data, ddev start --reset-database;ddev snapshot --cleanup, ddev clean, ddev push;ddev import-db and ddev import-files, which empty their target first;docker volume prune -a, which deletes stopped projects' databases.ddev poweroff stops everyone's projects.
Several checkouts need distinct project names. A committed name: makes every git
worktree claim the same project. Omit it, or override it in config.local.yaml.
ddev is not a sandbox. Project host commands and exec-host hook tasks run on
your machine with your rights; a pre-start one runs on the first ddev start. In a
repository you didn't write, audit first and show the user any host-hook or
host-command finding before starting the project.ddev (it opens a dashboard) or flagless ddev config (it asks
questions). Pass --file/--source to imports and -y to anything that prompts.ddev exec ignores the host folder you run it from;
pass --dir /var/www/html/<path>, or a plugin's suite runs against the project's
config and development database.ddev mysql -e '...'), never
read a dump or snapshot (database.md).ddev describe -j | jq -r '.raw.primary_url' (also
.raw.status, .raw.dbinfo.published_port); ddev list -j;
ddev launch --print-url.ddev exec commands that contain $, pipes or redirects, so they
expand inside the container.ddev snapshot name and
ddev add-on remove leaving files behind both exit 0.Details, the destroys-data table and worktree setup: automation-and-worktrees.md.
| Task | Read |
|---|---|
| Existing repo on a new machine, new project, version pinning, CI parity, Composer, what to commit, env files, upgrading DDEV | config-and-env.md |
| Scripting DDEV, JSON output, commands that destroy data, several git worktrees (OAuth callbacks, webhooks), renaming or moving a project, AI agents inside DDEV | automation-and-worktrees.md |
Import/export, snapshots, seed and reset, changing engine, ddev pull recipes, sanitised data, uploads from production, dumps and agents | database.md |
Slow project, Mutagen, upload_dirs, WSL2, choosing a Docker provider | performance.md |
| Add-ons (Redis, search, cron), commands, hooks, daemons, nginx/Apache config, extra services, networking between projects, PHP ini, SSH keys | extending.md |
| Node.js version, npm/pnpm/yarn, dev-server ports and daemons | frontend-node.md |
| Craft + Vite HMR not connecting (CORS, allowed hosts, the port in four places) | frontend-upgrade-ops' references/craft-vite-twig.md |
Xdebug, XHGui profiling, Mailpit, ddev share, hostnames | debugging-sharing.md |
| Something is broken: Docker, ports, router, TLS, disk, DNS, Mutagen | troubleshooting.md |
| Task | Command |
|---|---|
| Start, stop, restart, everything off | ddev start, ddev stop, ddev restart, ddev poweroff |
| What is running and where | ddev describe (-j for JSON), ddev list, ddev launch |
| Shell, one-off command | ddev ssh, ddev exec <cmd> |
| Logs | ddev logs, ddev logs -s db, ddev logs -f |
| Database in and out | ddev import-db --file=x.sql.gz, ddev export-db --file=x.sql.gz |
| Snapshot and restore | ddev snapshot --name=<unique>, ddev snapshot restore --latest |
| Data from hosting | ddev pull <provider> (--skip-files, --skip-db, -y) |
| Xdebug, profiler | ddev xdebug on (off, status), ddev xhgui on, ddev xhgui launch |
| Mail catcher | ddev mailpit |
| Add-ons | ddev add-on get <owner>/<repo>, ddev add-on list --installed, ddev add-on update |
| Effective config, custom files | ddev utility configyaml --full-yaml, ddev utility check-custom-config |
| Health checks | ddev utility diagnose, port-diagnose, tls-diagnose, mutagen-diagnose, xdebug-diagnose |
| Rebuild images | ddev start --no-cache, ddev utility rebuild |
| Resource | Use |
|---|---|
scripts/audit-ddev-config.py [DIR] [--json] [--ignore CHECK] | Read-only audit of .ddev/; details below the table |
scripts/check-ddev-facts.py --offline | After editing facts or prose: assets/ddev-facts.json vs this skill's text |
scripts/check-ddev-facts.py --live | Weekly: newest DDEV release, docs defaults, built-in commands, PHP/Node.js end-of-life floors. Exit 7 = a source was unreachable (advisory) |
scripts/run-python.sh | Launches either script with the first real Python 3.8+ (python3, python, py) |
assets/ddev-facts.json | The facts both scripts share - bump values, prose and the "Versions verified" note together |
| assets/sanitized-pull.yaml.example | Database-only provider recipe for a sanitised dump: no files stanza, no push stanzas |
The auditor:
php-unpinned, php-out-of-range, php-eol, db-unpinned, node-eol,
composer-v1;obsolete-key, unknown-key (against DDEV's own config schema),
perf-mode-committed, router-ports-committed, xdebug-committed,
name-in-worktree;upload-dir-misplaced, upload-dir-outside,
shadowed-command, crlf-command;host-command, host-hook, ssh-agent-forwarded,
docker-socket-mounted, home-mounted;provider-push, provider-files-noop, committed-secret (env, config,
compose and web-server files), credential-file, local-file-committed (reads git's
index; never runs a git or fsmonitor command the audited repository supplies)..ddev/config.yaml, 4 unreadable config,
2 usage.| Topic | Owner |
|---|---|
Craft on DDEV: ddev craft, .ddev/.env.web CRAFT_* vars, Craft versions to pin, queue, asset upload_dirs | craftcms-ops (references/ddev.md) |
Local-versus-production drift as a security problem: php.ini differences, devMode, keys, mail, ddev share exposure, personal data | security-ops (references/ddev-config-drift.md) |
| craft-vite and Vite HMR config behind DDEV (port in four places, CORS, allowed hosts) | frontend-upgrade-ops (references/craft-vite-twig.md) |
Install commands, lockfiles, .nvmrc/engines agreeing with DDEV's Node and PHP | package-manager-ops |
| Compose syntax for a hand-written extra service; Dockerfiles generally | docker-ops |
| Page speed of the site itself | web-perf-ops |
Never write a real-looking project hostname in examples: say "the project URL from
ddev describe".
docs/content/users/ at tag v1.25.4.pkg/ddevapp/ (config.go, provider.go, ddevapp.go,
upload_dirs.go, craftcms.go), pkg/settings/viper.go and
cmd/ddev/cmd/commands.go.Read 2026-10-05 and re-checked by an independent accuracy review on 2026-10-06. What
the references mark "Observed" was reproduced that day in throwaway projects on DDEV
v1.25.4 (Docker Desktop, WSL2). DDEV
publishes no agent skill for its users; its own repository's AGENTS.md and .claude/
serve people contributing to DDEV.
assets/ddev-facts.json (opens in a new tab)assets/sanitized-pull.yaml.example (opens in a new tab)references/automation-and-worktrees.md (opens in a new tab)references/config-and-env.md (opens in a new tab)references/database.md (opens in a new tab)references/debugging-sharing.md (opens in a new tab)references/extending.md (opens in a new tab)references/frontend-node.md (opens in a new tab)references/performance.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)scripts/audit-ddev-config.py (opens in a new tab)scripts/check-ddev-facts.py (opens in a new tab)scripts/run-python.sh (opens in a new tab)tests/fixtures/live/commands-db.json (opens in a new tab)tests/fixtures/live/commands-host.json (opens in a new tab)tests/fixtures/live/commands-web.json (opens in a new tab)tests/fixtures/live/config.md (opens in a new tab)tests/fixtures/live/eol-nodejs.json (opens in a new tab)tests/fixtures/live/eol-php.json (opens in a new tab)tests/fixtures/live/releases.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub 0xdarkmatter/claude-mods --plugin claude-mods116 skills in this plugin
/a11y-opsWeb accessibility end to end: WCAG 2.2 AA, EAA and ADA Title II obligations, audits (axe, pa11y, keyboard, screen reader), the common failures, accessibility statements, and server-rendered Craft CMS/Twig sites (Formie, CKEditor, multi-site lang). Use when asked about a11y, WCAG, EAA, EN 301 549, Section 508, VPAT, NVDA/VoiceOver, focus, skip links, ARIA, landmarks, alt text, form labels or errors, contrast, target size, or 'is my site accessible'./adr-opsAuthor, index, and lint Architecture Decision Records — append-only memory that recovers the WHY behind a system's shape. Triggers on: adr, architecture decision record, decision log, record this decision, supersede an adr, why was this decided, adr template, next adr number./api-design-opsOther plugins' skills for the same job