custom-drupal-module

Generate a Drupal 11 module scaffold with PHP 8.2+ syntax and PSR-4 autoloading.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/AJV009/drupal-devkit --skill custom-drupal-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-drupal-module
Source: https://github.com/AJV009/drupal-devkit/tree/main/plugins/drupal-core/skills/custom-drupal-module
Command: npx skills add https://github.com/AJV009/drupal-devkit --skill custom-drupal-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates a complete, installable Drupal 11 module scaffold that adheres to modern PHP 8.2+ standards and Drupal 11 APIs, reducing boilerplate and accelerating module delivery.

Core Features & Use Cases

  • Create a production-ready module scaffold including .info.yml, routing, services, dependency injection, and basic plugin and configuration structures.
  • Provide guidance and scaffolding for tests (unit/kernel/functional) and config export/import workflows.
  • Use cases include creating new Drupal modules from scratch, upgrading legacy modules to Drupal 11, and rapidly prototyping module architectures.

Quick Start

Provide a module name and scope, and the tool will generate an installable Drupal 11 module scaffold with core files and basic configuration.

Frequently Asked Questions about custom-drupal-module

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

FAQPage Schema
How do I scaffold a Drupal 11 module with PSR-4 autoloading and dependency injection?

To scaffold a Drupal 11 module, provide a module name and scope to generate a complete installable structure. This creates core files including .info.yml, routing, services, and dependency injection configurations using PSR-4 autoloading standards.

Can I use this to upgrade a legacy module to Drupal 11?

Yes, you can upgrade legacy modules to Drupal 11 by generating a modern scaffold. The tool enforces PHP 8.2+ syntax, current Drupal 11 APIs, and PSR-4 autoloading to modernize outdated code architectures.

What files are included in a generated Drupal 11 module scaffold?

A generated Drupal 11 module scaffold includes .info.yml, routing, services, dependency injection, basic plugin structures, forms, and configuration files. It also provides test scaffolding for unit, kernel, and functional tests.

Do I need PHP 8.2 to generate an installable Drupal 11 module?

Yes, PHP 8.2+ syntax is enforced when generating an installable Drupal 11 module scaffold. The generated code strictly adheres to modern PHP standards and Drupal 11 APIs for production readiness.

How do I handle configuration export and import in a newly scaffolded Drupal module?

The generated Drupal module scaffold includes explicit config export and import workflow guidance. This configuration structure integrates with standard Drupal 11 configuration management for deployment.

What's the best way to prototype a Drupal module architecture quickly?

The best way to prototype a Drupal module architecture is generating a complete scaffold with predefined routing, services, and plugin structures. This reduces boilerplate and accelerates module delivery for rapid prototyping.