BeClaude

drupal-backend

3Community RegistryDevelopmentby Drupal Skills Team · MIT

Drupal Back End Specialist skill for custom module development, hooks, APIs, and PHP programming (Drupal 8-11+). Use when building custom modules, implementing hooks, working with entities, forms, plugins, or services.

First seen 5/22/2026

Summary

This skill provides expert guidance on Drupal front-end development, covering theme creation, Twig template customization, preprocessing functions, and asset management.

  • It helps developers build maintainable, performant Drupal themes by leveraging best practices for the rendering system and template suggestions.

Overview

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:

bash
# 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:

bash
# 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:

code
# 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

code
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

Install & Usage

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/drupal-backend.md https://raw.githubusercontent.com/Omedia/drupal-skill/main/SKILL.md
3
Invoke in Claude Code
/drupal-backend

Use Cases

Creating a custom Drupal theme from scratch with proper info.yml and libraries.yml files.
Writing and overriding Twig templates for nodes, blocks, fields, and other entities.
Implementing preprocessing functions in .theme or .module files to alter template variables.
Adding and managing CSS/JS libraries with dependencies and conditional loading.
Working with template suggestions to create page-specific or view-mode-specific templates.
Debugging rendering issues using Twig debug mode and Kint output.

Usage Examples

1

/drupal-frontend Create a new theme called 'my_custom_theme' with Bootstrap 5 as a base and add a libraries.yml file for global CSS and JS.

2

/drupal-frontend Override the node.html.twig template to add a custom class to the article tag based on the node type.

3

/drupal-frontend Write a preprocess function in mytheme.theme that adds a variable 'is_promoted' to all node templates.

View source on GitHub
apiplugindrupalphpmodule-developmentbackendhooksentity-api

Security Audits

LicensePassSourceWarnRepositoryPass

Frequently Asked Questions

What is drupal-backend?

This skill provides expert guidance on Drupal front-end development, covering theme creation, Twig template customization, preprocessing functions, and asset management. It helps developers build maintainable, performant Drupal themes by leveraging best practices for the rendering system and template suggestions.

How to install drupal-backend?

To install drupal-backend: create the skills directory (mkdir -p .claude/skills), then run: mkdir -p .claude/skills && curl -o .claude/skills/drupal-backend.md https://raw.githubusercontent.com/Omedia/drupal-skill/main/SKILL.md. Finally, /drupal-backend in Claude Code.

What is drupal-backend best for?

drupal-backend is a skill categorized under Development. It is designed for: api, plugin, drupal, php, module-development, backend, hooks, entity-api. Created by Drupal Skills Team.

What can I use drupal-backend for?

drupal-backend is useful for: Creating a custom Drupal theme from scratch with proper info.yml and libraries.yml files.; Writing and overriding Twig templates for nodes, blocks, fields, and other entities.; Implementing preprocessing functions in .theme or .module files to alter template variables.; Adding and managing CSS/JS libraries with dependencies and conditional loading.; Working with template suggestions to create page-specific or view-mode-specific templates.; Debugging rendering issues using Twig debug mode and Kint output..