drupal-standards

Enforce Drupal coding standards across PHP, JavaScript, CSS, SQL, Twig, and YAML files.

3|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/nonzod/drupaldev-claude-skill --skill drupal-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-standards
Source: https://github.com/nonzod/drupaldev-claude-skill/tree/main/.claude/skills/drupal-standards
Command: npx skills add https://github.com/nonzod/drupaldev-claude-skill --skill drupal-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates enforcement of Drupal coding standards across PHP modules, JavaScript, CSS, SQL, Twig templates, and YAML configs, based on the current development context.

Core Features & Use Cases

  • Context-aware loading: Reads core, documentation, namespaces, PSR-4 naming rules, and language-specific standards from coding_standards for PHP, JavaScript, CSS, SQL, Twig, YAML, and composer constraints.
  • Multi-file support: Applies standards across multiple file types in one workflow, including Drupal modules, services, templates, and configuration files.
  • Practical examples: Demonstrates how to structure code to Drupal conventions when developing modules, themes, or configuration.

Quick Start

Create or edit Drupal files and mention keywords like module, template, or form to trigger automatic standard loading.

Frequently Asked Questions about drupal-standards

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

FAQPage Schema
How do I enforce Drupal coding standards across PHP, JavaScript, and Twig files?

You can automatically apply Drupal coding standards across PHP modules, JavaScript, CSS, SQL, Twig templates, and YAML configurations based on the current development context.

What is the best way to structure custom Drupal module code to follow conventions?

The best way to structure custom Drupal module code is to load language-specific standards and PSR-4 naming rules, which provide practical examples for generating code that adheres to Drupal conventions.

Do I need to manually configure coding standards for each file type in a Drupal project?

No, manual configuration per file type is unnecessary because context-aware loading automatically reads core standards and applies them across multiple file types including PHP, JavaScript, CSS, SQL, Twig, and YAML in one workflow.

Can I apply Drupal coding standards to YAML configuration and Twig templates simultaneously?

Yes, multi-file support applies Drupal coding standards to YAML configurations and Twig templates simultaneously, alongside PHP, JavaScript, CSS, and SQL files in one workflow.

When do Drupal coding standards automatically load during module or theme development?

Drupal coding standards automatically load when developers mention keywords like module, template, form, or custom code while editing files in a Drupal project.

How does context-aware loading handle PSR-4 naming rules and composer constraints for Drupal?

Context-aware loading reads PSR-4 naming rules, namespaces, and composer constraints from coding_standards to ensure generated PHP modules and configuration files adhere to Drupal conventions.