drupal-rules

Installation
SKILL.md

Drupal Development Rules

Consolidated rules for Drupal development. Follow these for every implementation task.

Autopilot Interventions (MANDATORY)

When you see AUTOPILOT [type]: messages in hook output, you MUST stop what you are doing and follow the instruction. These are not suggestions — they are policy enforcement from the session autopilot. The intervention contains a specific tool call you must execute before making further edits. Ignoring an autopilot intervention is equivalent to ignoring a test failure.

Services & Dependency Injection

Mandatory Rules

  1. Use services + dependency injection -- NEVER use \Drupal::* static calls in classes.
  2. Use Entity API for all CRUD operations -- NEVER use raw SQL queries.
  3. New modules require: .info.yml, .module, /src (PSR-4), .services.yml.
  4. Config defaults go in config/install/, not hook_install().
  5. Use the library system for front-end assets -- no inline JS/CSS.

Service Design

Installs
38
GitHub Stars
18
First Seen
Jul 9, 2026