Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ddev-ops

БесплатноЗапускает вложенные скриптыНе проверен

Use when a project has a .ddev/ folder or needs one: DDEV setup on a new machine, version pinning, config.local.yaml and .ddev/.env files, database import…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

DDEV Operations

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 --offline fails if this skill's prose and that file disagree, and --live (weekly) fails when DDEV moves.

Start here

  1. Read the project before changing it: .ddev/config.yaml, any config.*.yaml, ls -a .ddev/, then ddev describe (URLs, ports, services) and ddev version.

  2. 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.

  3. 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.

  4. 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.

  5. Ask before destroying data (Hard rule 11).

Hard rules

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.

  1. 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".
  2. Per-developer settings never go in config.yaml.
    • That means performance_mode, router_http_port/router_https_port, xdebug_enabled: true, bind_all_interfaces and host_db_port.
    • They belong in .ddev/config.local.yaml or ddev config global.
    • Project values beat global ones, so a committed value pins every teammate.
    • Git ignores the .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.
  3. Retired keys do nothing. DDEV loads config non-strictly: mutagen_enabled: false and nfs_mount_enabled are ignored, not obeyed.
  4. 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.
  5. 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.
  6. Never hand containers your machine's credentials. Every process in them - Composer and npm scripts included - can use what they reach.
    • No host SSH-agent forwarding: load one scoped key with ddev auth ssh -f <key>.
    • No compose mount of the Docker socket (full control of the host) or of your home directory.
    • No agent logins or keys under .ddev/: the project, .ddev/ included, is mounted into web.
  7. Pull sanitised data; never push to production.
    • Anonymise where the data lives and pull the result. No raw production personal data on laptops.
    • Delete db_push_command/files_push_command from your own recipes that can reach production.
    • A files_pull_command that fetches nothing makes ddev pull empty the upload directory, and the pull still exits 0. Omit the stanza instead.
  8. 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.
  9. Review an add-on before installing it. Its Bash install actions run on your machine. Prefer official ddev/ add-ons and pin --version.
  10. On Windows, keep projects inside the WSL2 filesystem, never under /mnt/c.
  11. 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, wh
Полный SKILL.md на GitHub

Установить ddev-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Edit
Write
Bash
Glob
Grep

Вложенные файлы

assets/ddev-facts.jsonassets/sanitized-pull.yaml.examplereferences/automation-and-worktrees.mdreferences/config-and-env.mdreferences/database.mdreferences/debugging-sharing.mdreferences/extending.mdreferences/frontend-node.mdreferences/performance.mdreferences/troubleshooting.mdscripts/audit-ddev-config.pyscripts/check-ddev-facts.pyscripts/run-python.sh

FAQ

Что делает скилл ddev-ops?

Use when a project has a .ddev/ folder or needs one: DDEV setup on a new machine, version pinning, config.local.yaml and .ddev/.env files, database import, snapshots, ddev pull and sanitised data, slow Mutagen or WSL2 sites, add-ons (Redis, Solr, cron), commands and hooks, Vite ports, Xdebug, ddev share, port conflicts, several git worktrees at once, scripting DDEV (describe -j), disk cleanup, upgrades and troubleshooting. Audits .ddev/ for team-breaking mistakes.

Как установить скилл ddev-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ddev-ops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ddev-ops с