drupal-rules

Enforce Drupal development best practices for dependency injection and module scaffolding.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drupal development teams often struggle to maintain consistent coding practices across modules. This Skill provides a consolidated set of rules for dependency injection, Entity API usage, module scaffolding, config defaults, and asset handling to standardize Drupal development workflows.

Core Features & Use Cases

  • Enforces service-oriented design and dependency injection, avoiding static calls.
  • Guides secure, structured module development, including file layout and configuration management.
  • Use Case: When starting a new Drupal module, apply these rules to ensure maintainability, security, and compatibility with modern Drupal standards.

Quick Start

Follow these rules when starting a new Drupal module to ensure compliance with best practices.

Frequently Asked Questions about drupal-rules

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

FAQPage Schema
How do I enforce dependency injection and avoid static calls in Drupal module development?

Enforce dependency injection in Drupal module development by standardizing service-oriented design and explicit service configuration, ensuring all code avoids static calls and adheres to strict typing guidelines.

What are the best practices for Drupal module scaffolding and Entity API usage?

Best practices for Drupal module scaffolding and Entity API usage involve applying consistent file layouts, secure configuration management, and strict typing rules to ensure maintainability and compatibility with modern Drupal standards.

Can I apply Drupal coding standards to both small custom modules and larger distributions?

You can apply these Drupal coding standards to both small custom modules and larger Drupal distributions, as the guidelines are designed to scale across different project sizes while guiding coding, security, and testing workflows.

Does standardizing Drupal development workflows help with security and configuration management?

Standardizing Drupal development workflows improves security and configuration management by guiding secure module development, enforcing config defaults, and ensuring structured asset handling across the project.

Why does my Drupal module need strict typing and explicit service configuration?

Your Drupal module needs strict typing and explicit service configuration to meet modern Drupal standards, ensuring maintainability, reducing errors, and enforcing a consistent service-oriented design across the codebase.

When do I need to follow Drupal coding standards for dependency injection and Entity API?

You need to follow Drupal coding standards for dependency injection and Entity API when starting a new module or managing an existing one, ensuring compliance with best practices for security, testing, and deployment workflows.