drupal-module-scaffold

Scaffold Drupal 10/11 modules with .info.yml, PSR-4 namespaces, and .module files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes evals (resource) components.

What problem does it solve?

This Skill automates the creation of foundational files and directory structures for new Drupal modules, ensuring adherence to best practices and saving significant setup time.

Core Features & Use Cases

  • Boilerplate Generation: Creates essential files like .info.yml, .module, src/ directory, and optional configuration files (.routing.yml, .services.yml, etc.).
  • PSR-4 Compliance: Sets up the correct PSR-4 namespace structure within the src/ directory for autoloading.
  • Use Case: When starting a new custom module for a Drupal 10/11 site, use this Skill to generate the basic structure, including .info.yml with correct core_version_requirement and dependencies.

Quick Start

Create a new Drupal module called my_events for Drupal 10 and 11.

Frequently Asked Questions about drupal-module-scaffold

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

FAQPage Schema
How do I scaffold a Drupal module with the correct PSR-4 structure?

Scaffolding a Drupal module requires generating the .info.yml, .module file, and src/ directory to establish PSR-4 namespace structure for autoloading. This ensures correct file conventions and PSR-4 compliance for Drupal 10/11 modules.

What files are needed to start custom Drupal 10 module development?

Starting custom Drupal module development requires essential files including .info.yml, .module, and a PSR-4 compliant src/ directory. Optional routing, services, permissions, and libraries YAML files can also be generated to support module functionality.

Can I generate routing and services YAML files when creating a Drupal module?

Yes, you can generate optional routing, services, permissions, and libraries YAML files when scaffolding a Drupal module. These optional configuration files are created alongside the essential .info.yml and .module boilerplate to support extended functionality.

Does this Drupal scaffolding approach support both Drupal 10 and 11?

This Drupal scaffolding approach supports both Drupal 10 and 11 by generating .info.yml files with correct core_version_requirement settings. It ensures adherence to Drupal coding standards and version compatibility across both platform versions.

What is the best way to automate Drupal module boilerplate generation?

The best way to automate Drupal module boilerplate generation is using a scaffolding tool that creates .info.yml, .module, and PSR-4 directory structures instantly. This saves significant setup time and ensures adherence to Drupal coding standards and best practices.