New advertisers: 50% off your first month with code FIRSTMONTHSee slots
Omedia avatar

drupal-tooling

Drupal skill that brings DDEV environment and Drush command-line workflows into Claude Code.

version
1.0.0
GitHub stars
28
View on GitHub

What it does

  • Covers DDEV project setup and management, plus Drush cache, configuration, and module commands
  • Includes database import, export, and snapshot workflows alongside deployment and configuration steps
  • Supports debugging, troubleshooting, and performance optimization for Drupal 8-11+ sites
  • Designed for Docker-based development environments, Drush operations, and day-to-day site management tasks

Drupal development tooling skill for DDEV local environments and Drush command-line operations (Drupal 8-11+). Use when working with Docker-based development environments, Drush commands, deployment workflows, or site management tasks.

Add marketplace

/plugin marketplace add Omedia/drupal-skill

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install drupal-tooling@drupal-skills

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Drupal Development Tooling

Overview

Enable expert-level Drupal development tooling capabilities with comprehensive guidance for DDEV Docker-based local development environments and Drush command-line operations for Drupal 8, 9, 10, and 11+.

When to Use This Skill

Invoke this skill when working with:

  • DDEV operations: Starting, managing, or configuring local development environments
  • Drush commands: Site management, configuration, cache operations
  • Database management: Import/export, snapshots, migrations
  • Deployment workflows: Configuration sync, database updates
  • Development setup: Project initialization, environment configuration
  • Troubleshooting: Debugging environment or command-line issues

Core Capabilities

1. DDEV Local Development

Manage Docker-based local Drupal environments efficiently:

Project initialization:

# Initialize new Drupal project
ddev config --project-type=drupal10 --docroot=web --create-docroot

# Start containers
ddev start

# Install Drupal via Composer
ddev composer create drupal/recommended-project

# Install Drupal site
ddev drush site:install standard --account-name=admin --account-pass=admin

Daily operations:

# Start/stop project
ddev start
ddev stop
ddev restart

# SSH into container
ddev ssh

# Launch site in browser
ddev launch

# View logs
ddev logs
ddev logs -f  # Follow logs

Database operations:

# Import database
ddev import-db --src=database.sql.gz

# Export database
ddev export-db --file=backup.sql.gz --gzip

# Create snapshot
ddev snapshot

# Restore snapshot
ddev snapshot restore

# Access MySQL CLI
ddev mysql

Reference documentation:

  • references/ddev.md - Complete DDEV reference

2. Drush Command-Line Management

Execute site management tasks efficiently:

Cache management:

# Rebuild cache (most common)
ddev drush cr

# Clear specific cache
ddev drush cache:clear css-js
ddev drush cache:clear render

Configuration management:

# Export configuration
ddev drush config:export
ddev drush cex

# Import configuration
ddev drush config:import
ddev drush cim

# View configuration
ddev drush config:get system.site
ddev drush cget system.site

# Set configuration
ddev drush config:set system.site name "My Site"
ddev drush cset system.site name "My Site"

Module management:

# Enable module
ddev drush pm:enable mymodule -y
ddev drush en mymodule -y

# Uninstall module
ddev drush pm:uninstall mymodule -y
ddev drush pmu mymodule -y

# List modules
ddev drush pm:list
ddev drush pml

# Download module
ddev drush pm:download webform

Database updates:

# Run pending database updates
ddev drush updatedb -y
ddev drush updb -y

User management:

# One-time login URL
ddev drush user:login
ddev drush uli

# Login as specific user
ddev drush uli admin

# Create user
ddev drush user:create newuser --mail="user@example.com" --password="pass"

# Change password
ddev drush user:password admin "newpassword"

Reference documentation:

  • references/drush.md - Complete Drush reference

3. Development Workflows

Common development and deployment workflows:

Standard deployment:

# Run database updates
ddev drush updb -y

# Import configuration
ddev drush cim -y

# Clear cache
ddev drush cr

# One-liner version
ddev drush updb -y && ddev drush cim -y && ddev drush cr

Fresh site setup:

# Clone repository
git clone <repo> myproject
cd myproject

# Start DDEV
ddev start

# Install dependencies
ddev composer install

# Import database and files
ddev import-db --src=database.sql.gz
ddev import-files --src=files.tar.gz

# Clear cache
ddev drush cr

# Launch site
ddev launch

Theme/module development:

# Start work
ddev start

# Clear cache frequently
ddev drush cr

# Watch for changes (if using build tools)
ddev exec npm run watch

# View logs
ddev drush watchdog:tail

4. Code Generation

Use Drush generators to scaffold code:

# Generate module
ddev drush generate module

# Generate controller
ddev drush generate controller

# Generate form
ddev drush generate form

# Generate plugin block
ddev drush generate plugin:block

# Generate service
ddev drush generate service

# Generate theme
ddev drush generate theme

# Generate hook
ddev drush generate hook

# List all generators
ddev drush generate --help

5. Debugging & Troubleshooting

Debug and monitor your Drupal site:

Enable Xdebug:

# Enable Xdebug
ddev xdebug on

# Disable Xdebug (improves performance)
ddev xdebug off

# Check status
ddev xdebug status

View logs:

# Recent watchdog messages
ddev drush watchdog:show

# Follow watchdog logs
ddev drush watchdog:tail

# Container logs
ddev logs -s web
ddev logs -s db

Project information:

# Show project details
ddev describe

# Drupal status
ddev drush status
ddev drush st

# List all DDEV projects
ddev list

Best Practices

DDEV Best Practices

  1. Run tools through DDEV: Always use ddev drush, ddev composer, ddev npm
  2. Snapshots: Create before risky operations
  3. Performance: Enable Mutagen (Mac) or NFS for better file sync
  4. Xdebug: Only enable when debugging
  5. Version control: Commit .ddev/config.yaml to share configuration
  6. Clean shutdown: Use ddev stop before system shutdown

Drush Best Practices

  1. Aliases: Use short aliases (cr, cex, cim, uli)
  2. Automation: Add -y flag to skip confirmations
  3. Custom commands: Create for repetitive tasks
  4. Site aliases: Configure for multi-environment management
  5. Chaining: Use && for sequential operations
  6. Error handling: Check exit codes in scripts

Deployment Best Practices

  1. Order: Run updates (updb) before config import (cim)
  2. Testing: Test deployment workflow in staging first
  3. Backups: Always backup before major changes
  4. Rollback plan: Have a way to revert changes
  5. Monitoring: Check logs after deployment

Common Operations

Initialize DDEV for Existing Project

cd existing-project

# Configure DDEV
ddev config

# Start containers
ddev start

# Install dependencies
ddev composer install

# Import database (if available)
ddev import-db --src=backup.sql.gz

# Clear cache
ddev drush cr

Pull From Remote Environment

# Configure Drush alias for remote site
# Then pull database and files
ddev pull @production

# Or pull separately
ddev drush sql:sync @production @self
ddev rsync @production:%files @self:%files

Update Drupal Core

# Backup first
ddev snapshot

# Update with Composer
ddev composer update drupal/core "drupal/core-*" --with-all-dependencies

# Run database updates
ddev drush updb -y

# Clear cache
ddev drush cr

Enable Development Settings

# Copy development settings
cp sites/example.settings.local.php sites/default/settings.local.php

# Disable CSS/JS aggregation via Drush
ddev drush config:set system.performance css.preprocess 0 -y
ddev drush config:set system.performance js.preprocess 0 -y

# Enable Twig debugging
# Edit sites/default/services.yml:
# twig.config:
#   debug: true
#   auto_reload: true
#   cache: false

# Clear cache
ddev drush cr

Troubleshooting

DDEV Issues

Containers won't start:

# Check Docker is running
docker ps

# Restart DDEV
ddev restart

# Power off and restart
ddev poweroff
ddev start

# Clean restart
ddev restart --clean

Port conflicts:

# Check what's using ports
ddev describe

# Change ports in .ddev/config.yaml:
# router_http_port: "8080"
# router_https_port: "8443"

# Restart
ddev restart

Permission issues:

# Fix file permissions
ddev exec chmod -R 755 web/sites/default/files
ddev exec chown -R www-data:www-data web/sites/default/files

Drush Issues

Drush not found:

# Always run through DDEV
ddev drush status

# Not just: drush status

Configuration sync failures:

# Check for overridden configuration
ddev drush config:status

# Force import
ddev drush cim -y --partial

# Check specific config
ddev drush config:get system.site

Database update failures:

# Run with verbose output
ddev drush updb -v

# Check specific module updates
ddev drush updatedb:status

# Check logs
ddev drush watchdog:show

Performance Optimization

DDEV Performance (Mac)

Enable Mutagen:

# In .ddev/config.yaml
ddev config --mutagen-enabled

# Restart
ddev restart

Enable NFS:

# In .ddev/config.yaml
ddev config --nfs-mount-enabled

# Restart
ddev restart

Drush Performance

Disable Xdebug when not debugging:

ddev xdebug off

Use specific commands instead of aliases:

# Faster (loads less)
ddev drush cache:rebuild

# vs
ddev drush cr

Resources

Reference Documentation

  • references/ddev.md - Complete DDEV reference

    • Project initialization and configuration
    • Database and file operations
    • Add-ons and services (Redis, Elasticsearch, etc.)
    • Performance optimization
    • Troubleshooting
  • references/drush.md - Complete Drush reference

    • Cache management commands
    • Configuration management
    • Module and theme operations
    • Database operations
    • User management
    • Custom command development

Searching References

# Find DDEV command
grep -r "ddev snapshot" references/

# Find Drush command
grep -r "config:import" references/

# Find deployment info
grep -r "deployment" references/

Common Use Cases

Local Development Setup

  1. Clone project: git clone <repo>
  2. Configure DDEV: ddev config
  3. Start: ddev start
  4. Install dependencies: ddev composer install
  5. Import DB: ddev import-db --src=db.sql.gz
  6. Clear cache: ddev drush cr
  7. Launch: ddev launch

Deploying Configuration Changes

  1. Export config: ddev drush cex -y
  2. Commit to git: git add config/ && git commit
  3. Push: git push
  4. On server: drush cim -y && drush cr

Debugging Performance Issues

  1. Enable Xdebug: ddev xdebug on
  2. Set breakpoints in IDE
  3. Trigger request: ddev launch
  4. Step through code
  5. Disable Xdebug: ddev xdebug off

Version Compatibility

DDEV Versions

  • DDEV v1.21+ recommended
  • Supports all Drupal versions (8-11+)
  • Update with: brew upgrade ddev (Mac) or platform equivalent

Drush Versions

  • Drush 10+ for Drupal 8.4+
  • Drush 11+ for Drupal 9.0+
  • Drush 12+ for Drupal 10.0+
  • Install via Composer (project-specific)

See Also

From the Omedia/drupal-skill README

Drupal Development Skills for Claude Code

Comprehensive Drupal development skills for Claude Code, organized by specialization. Choose the skills you need for front-end development, back-end development, or development tooling for Drupal 8-11+.

Quick Start

Install from Marketplace

If this repository is hosted on GitHub or another git service:

# Add this marketplace
/plugin marketplace add Omedia/drupal-skill

# Install all three skills
/plugin install drupal-frontend
/plugin install drupal-backend
/plugin install drupal-tooling

# Or install just what you need
/plugin install drupal-frontend  # For theme development
/plugin install drupal-backend   # For module development

Install from Local Repository

For local development or testing:

# Add local marketplace
/plugin marketplace add /path/to/drupal-skill

# Install skills
/plugin install drupal-frontend
/plugin install drupal-backend
/plugin install drupal-tooling

Available Skills

drupal-frontend - Front End Specialist

Theme development, Twig templates, and Drupal's rendering system.

Features:

  • Theme structure and configuration
  • Twig templating syntax and filters
  • Template suggestions and debugging
  • Preprocessing functions
  • CSS/JS library management
  • Responsive design and breakpoints
  • Accessibility best practices

Use when:

  • Creating or customizing Drupal themes
  • Working with Twig templates
  • Implementing preprocessing functions
  • Managing CSS/JS assets
  • Building responsive, accessible designs

Includes:

  • Complete theming reference (theming.md)
  • Theme template scaffold
  • Twig examples and patterns

drupal-backend - Back End Specialist

Custom module development, hooks, APIs, and PHP programming.

Features:

  • Custom module development
  • Drupal hooks system
  • Controllers and routing
  • Forms API (configuration and custom)
  • Entity API operations
  • Plugin system (blocks, fields, etc.)
  • Services and dependency injection
  • Database operations

Use when:

  • Building custom modules
  • Implementing hooks
  • Working with entities, forms, or plugins
  • Creating custom controllers or services
  • Database operations and queries

Includes:

  • Hooks reference with examples (hooks.md)
  • Module structure patterns (module_structure.md)
  • Module template scaffold

drupal-tooling - Development Tools

Development environment and command-line tools

DDEV Docker environments and Drush command-line operations.

Features:

  • DDEV project setup and management
  • Database import/export and snapshots
  • Drush cache, configuration, and module commands
  • Deployment workflows
  • User management and debugging
  • Performance optimization

Use when:

  • Setting up local development environments
  • Managing databases and configuration
  • Running Drush commands
  • Deploying configuration changes
  • Debugging and troubleshooting

Includes:

  • Complete DDEV reference (ddev.md)
  • Complete Drush reference (drush.md)
  • Workflow examples

Usage Examples

Once installed, Claude automatically invokes the appropriate skill:

# Frontend work (uses drupal-frontend)
"Create a custom theme with a two-column layout"
"Write a preprocess function to add custom variables"
"Create a Twig template for article nodes"

# Backend work (uses drupal-backend)
"Create a custom module that adds a new content entity"
"Write a hook_form_alter to modify the user registration form"
"Build a custom block plugin with configuration"

# Tooling work (uses drupal-tooling)
"Set up a new DDEV project for Drupal 10"
"Import this database and clear the cache"
"Export configuration using Drush"

Supported Drupal Versions

All skills support:

  • Drupal 8.x
  • Drupal 9.x
  • Drupal 10.x
  • Drupal 11.x

Requirements

  • Claude Code installed
  • For drupal-tooling: Docker and DDEV installed for local development
  • For drupal-tooling: Drush 10+ for command-line operations
  • For drupal-backend: PHP 7.0+ (version depends on Drupal version)

Repository Structure

drupal-skill/
├── .claude-plugin/
│   └── marketplace.json          # Marketplace with all three skills
├── drupal-frontend/
│   ├── SKILL.md                  # Frontend skill instructions
│   ├── references/
│   │   └── theming.md
│   └── assets/
│       └── theme-template/
├── drupal-backend/
│   ├── SKILL.md                  # Backend skill instructions
│   ├── references/
│   │   ├── hooks.md
│   │   └── module_structure.md
│   └── assets/
│       └── module-template/
├── drupal-tooling/
│   ├── SKILL.md                  # Tooling skill instructions
│   └── references/
│       ├── ddev.md
│       └── drush.md
├── LICENSE
├── .gitignore
└── README.md                     # This file

Development

Testing Locally

  1. Clone this repository
  2. Add as local marketplace: /plugin marketplace add ./drupal-skill
  3. Install skills: /plugin install drupal-frontend (or backend, tooling)
  4. Test with Drupal development tasks

Contributing

Contributions are welcome! Please:

  1. Test changes thoroughly with multiple Drupal versions (8-11+)
  2. Update reference documentation as needed
  3. Follow existing code patterns and structure
  4. Update version numbers in marketplace.json

Why Three Separate Skills?

Focused Content: Each skill loads only relevant documentation and templates

Modular Installation: Install only what you need (frontend-only, backend-only, or both)

Better Performance: Smaller skills mean less context usage

Clear Separation: Frontend vs Backend vs Tooling mirrors real-world specializations

Support

For issues, questions, or contributions:

  • Open an issue in this repository
  • Check skill-specific SKILL.md files for detailed instructions
  • Review reference documentation in each skill's references/ directory

Details

Marketplace
Omedia/drupal-skill
Source
drupal-tooling
Author
Drupal Skills Team
Category
Development
License
MIT
Keywords
drupal, ddev, drush, docker, devops, deployment, cli, local-development, site-management, drupal-8, drupal-9, drupal-10, drupal-11
Listed since
Apr 7, 2026

More from Omedia/drupal-skill

All 3

Similar to drupal-tooling

More DevOps & Cloud