ddev

Run Drupal PHP development tools inside DDEV containers.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/cosmicdreams/claude-plugins --skill ddev-cosmicdreams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddev
Source: https://github.com/cosmicdreams/claude-plugins/tree/main/drupal-lab/skills/ddev
Command: npx skills add https://github.com/cosmicdreams/claude-plugins --skill ddev-cosmicdreams

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates inconsistent, failing, or misleading Drupal PHP commands caused by missing PHP versions, missing test environment variables, and missing browser/database services on the host.

Core Features & Use Cases

  • Container-accurate Drupal tooling: Runs Drupal-oriented development tools (phpcs, phpstan, phpunit, drush, composer) in a DDEV container that matches the expected PHP 8.5, MariaDB, Chrome webdriver, and test env configuration.
  • Fast targeted checks: Supports running linters and analyzers on individual files or directories instead of only slow full runs.
  • Test execution with browser support: Provides PHPUnit runs (including JS-capable test flows) with the correct environment and automatic clearing of stale Chrome sessions via the custom ddev phpunit command.
  • Clear guardrails: Prevents mixing responsibilities by explicitly not using this skill for DDEV lifecycle management (start/stop/setup), which belongs to process-lifecycle.

Quick Start

Start the DDEV environment for your worktree and run the Drupal coding standards lints inside the container for the files you changed.

Frequently Asked Questions about ddev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Drupal PHPUnit tests inside a DDEV container to avoid host environment mismatches?

You can run Drupal PHPUnit tests inside a DDEV container to avoid host environment mismatches by executing commands against the active project root after DDEV is started. This ensures the correct PHP 8.5, MariaDB, and Chrome webdriver configuration are loaded automatically.

Can I run PHPCS and PHPStan on individual files using DDEV?

Yes, you can run PHPCS and PHPStan on individual files or directories using DDEV. This allows for fast targeted coding standards checks and static analysis without needing to execute slow full project runs.

Why does my Drupal browser test fail with stale Chrome sessions in DDEV?

Drupal browser tests fail with stale Chrome sessions in DDEV due to lingering webdriver processes. This is resolved by using the custom ddev phpunit command, which provides automatic clearing of stale Chrome sessions before executing test flows.

Does this DDEV skill handle starting and stopping the DDEV lifecycle?

No, this DDEV skill does not handle starting, stopping, or setting up the DDEV lifecycle. It explicitly avoids DDEV lifecycle management, which belongs to process-lifecycle tools, and only executes Drupal development commands after DDEV is started.

How do I execute Drush and Composer commands for Drupal worktrees safely?

To execute Drush and Composer commands for Drupal worktrees safely, run them inside the DDEV container using the active project root specified in your configuration. This guarantees the commands match the expected container environment.