Skip to content

jamieaa64/Drupal-DDEV-Setup-Claude-Skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Drupal Setup & Development Skill for Claude Code

A comprehensive Claude Code skill for the complete Drupal development lifecycle - from project creation to team collaboration and ongoing maintenance.

Works in both Claude Code CLI (local) and Web environments.

⚑ Quick Start

1. Install the Skill

See INSTALL.md for detailed installation instructions.

Quick install (Claude Code CLI):

# Clone repository
git clone https://github.com/jamieaa64/Drupal-DDEV-Setup-Claude-Skill.git
cd Drupal-DDEV-Setup-Claude-Skill

# Copy to user skills directory
mkdir -p ~/.claude/skills
cp -r .claude/skills/drupal-setup ~/.claude/skills/

Quick install (Claude Code Web):

# Package the skill
./package-skill.sh

# Upload drupal-setup-skill.zip to Claude Code Web

2. Use the Skill

New project:

Create a new Drupal site called "my-project"

Existing project:

Set up this existing Drupal project

Update after pulling:

Update my local Drupal environment

🎯 What This Skill Does

For New Projects

  • 30-second setup with organizational best practices
  • Creates Drupal 11 Core or Drupal CMS projects
  • Generates all configuration files (settings.php, .gitignore, DDEV config)
  • Sets up Git repository and pushes to GitHub
  • Includes comprehensive documentation

For Existing Projects

  • 2-minute onboarding for new team members
  • Automatic environment sync after pulling changes
  • One-command reset for clean slate
  • Works with or without DDEV
  • Environment-aware (adapts to local CLI vs web)

Key Features

  • βœ… Intelligent scenario detection (new vs existing project)
  • βœ… Environment detection (DDEV vs web)
  • βœ… Template-based Quick Mode (fast, production-aligned)
  • βœ… Optional Full Mode (SQLite for testing)
  • βœ… Complete lifecycle management (setup β†’ develop β†’ maintain)
  • βœ… Team collaboration workflows

πŸ“š Documentation

πŸš€ Usage Examples

Scenario 1: Creating a New Project

You: "Create a new Drupal site called 'client-portal'"

Claude: I'll help you set up a new Drupal project!

1. Project name: client-portal
2. Drupal variant: [1] Drupal 11 Core / [2] Drupal CMS / [3] Minimal
   Choice: 1
3. Setup mode: [1] Quick (30s) / [2] Full (5-8min)
   Choice: 1 (default)
4. GitHub repository: https://github.com/org/client-portal
5. Include common modules? Y

βœ“ Project created in 30 seconds!
βœ“ Pushed to GitHub
βœ“ Ready for team to clone and deploy

Scenario 2: New Team Member Onboarding

# New developer joins team
git clone https://github.com/org/client-portal
cd client-portal
You: "Set up this existing Drupal project"

Claude: This looks like an existing Drupal project!

What would you like to do?
[1] Initial setup (first time working on this project)
[2] Update after pulling changes
[3] Reset local environment
[4] Create new project instead

Choice: 1

[With DDEV - Fully Automated]
βœ“ ddev start
βœ“ ddev composer install
βœ“ ddev drush site:install --existing-config
βœ“ ddev launch

Done! Site ready at https://client-portal.ddev.site
Login: admin / admin

Your local development environment is ready!

Scenario 3: Syncing After Pulling Changes

git pull  # Team member pushed changes
You: "Update my local Drupal environment"

Claude: Syncing your environment...

βœ“ ddev composer install (new dependencies)
βœ“ ddev drush config:import -y (config changes)
βœ“ ddev drush updb -y (database updates)
βœ“ ddev drush cache:rebuild

Changes applied:
- Dependencies updated (composer.lock changed)
- Configuration imported (3 config files changed)
- Database updates run (2 updates)
- Cache cleared

Your local environment is now in sync with the repository!

Scenario 4: Reset Broken Environment

You: "Reset my Drupal environment"

Claude: Resetting your local environment...

βœ“ ddev delete -y (removed database)
βœ“ ddev start
βœ“ ddev composer install
βœ“ ddev drush site:install --existing-config
βœ“ ddev launch

Environment reset complete!
Fresh Drupal installation with current configuration.

πŸ—οΈ Project Structure

Created projects include:

project-name/
β”œβ”€β”€ .ddev/
β”‚   └── config.yaml          # DDEV configuration
β”œβ”€β”€ config/
β”‚   └── sync/                # Drupal configuration (version controlled)
β”œβ”€β”€ private/                 # Private files directory
β”œβ”€β”€ web/                     # Drupal web root
β”‚   β”œβ”€β”€ modules/custom/     # Custom modules
β”‚   β”œβ”€β”€ themes/custom/      # Custom themes
β”‚   └── sites/default/
β”‚       β”œβ”€β”€ settings.php    # Organization-specific settings
β”‚       └── settings.local.php
β”œβ”€β”€ .gitignore              # Comprehensive Drupal .gitignore
β”œβ”€β”€ composer.json           # PHP dependencies
β”œβ”€β”€ README.md               # Project documentation
└── CLAUDE.md               # Claude Code guidance for this project

πŸ”§ Requirements

For New Projects (Quick Mode)

  • Claude Code (Web or CLI)
  • Composer access
  • Git
  • GitHub account

For Full Automation (Existing Projects)

  • Claude Code CLI (local)
  • DDEV installed
  • Docker installed and running

For Web (Limited Functionality)

  • Claude Code Web
  • Can do: File operations, composer install, config editing
  • Cannot do: Database operations, drush commands

πŸŽ“ Benefits for Teams

Benefit Before After
New developer onboarding 2-4 hours (manual setup, troubleshooting) 2 minutes (automated)
Environment sync Remember drush commands, manual steps One command
Project setup Copy/paste from wiki, adapt settings 30 seconds, consistent
Broken environment Reinstall from scratch, lose local changes One command reset
Team consistency Everyone does it differently Same workflow for all

πŸ› οΈ Workflows Supported

  1. New Project Creation

    • Quick Mode (default): Template-based, fast
    • Full Mode (advanced): Live Drupal with SQLite
  2. Existing Project Setup

    • Initial setup (first time)
    • Update after pull (sync environment)
    • Reset environment (clean slate)
  3. Environment Types

    • Local CLI with DDEV (full automation)
    • Web without DDEV (file operations + guidance)

πŸ“¦ What's in the Box

  • skill.md (15KB) - Main skill instructions
  • init.sh (1KB) - Initialization script
  • README.md (12KB) - Skill documentation
  • templates/ - Production-ready templates
    • settings.php - Organization settings
    • gitignore - Drupal .gitignore
    • ddev-config.yaml - DDEV configuration
    • README.md - Project documentation
    • CLAUDE.md - Claude guidance for projects

Total size: ~46KB

🚧 Future Enhancements

Planned features (see plan.md):

  • DevPanel Integration - Push to GitHub β†’ Automatic deployment
  • Drupal.org Integration - Work with Drupal.org issues and GitLab branches
  • Multi-environment support - Dev/staging/prod configurations
  • CI/CD templates - GitHub Actions workflows
  • Custom module scaffolding - Generate module boilerplate

🀝 Contributing

Contributions welcome! This skill is designed to evolve with team needs.

Ideas for contributions:

  • Additional Drupal variants (Drupal 10, contrib distributions)
  • More template variations
  • Additional common module presets
  • DevPanel integration implementation
  • Testing frameworks setup

πŸ“„ License

See LICENSE file.

πŸ™ Acknowledgments

Built for efficient Drupal development with Claude Code, incorporating:

  • Drupal community best practices
  • DDEV local development standards
  • Configuration-first development approach
  • Team collaboration workflows

πŸ“ž Support


Ready to streamline your Drupal development? Install now β†’

About

A Claude Skill to help automate the process of getting setup with a new or existing Drupal project that will use DDEV

Resources

License

Stars

14 stars

Watchers

3 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors