drupal-coding-standards

Enforces Drupal coding standards on PHP projects via PHPCS and PHPStan during CI workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drupal projects often drift from established coding standards, causing maintenance challenges and integration issues. This skill enforces Drupal PHP standards, DrupalPractice checks, and PHPStan-based analysis to ensure consistent quality across modules and custom code.

Core Features & Use Cases

  • PHPCS with Drupal, DrupalPractice, and custom rules to identify style violations.
  • PHPStan analysis for type safety and modern Drupal patterns.
  • Guardrails for naming conventions, class declarations, and code structure in Drupal 10/11 projects.
  • Use Case: A module developer wants to ensure every new module adheres to standards before submission or deployment.

Quick Start

Run the Drupal coding standards checks in your project to validate code quality before committing.

Frequently Asked Questions about drupal-coding-standards

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

FAQPage Schema
How do I enforce Drupal coding standards in my PHP project?

You can enforce Drupal coding standards by running PHPCS with Drupal and DrupalPractice rules alongside PHPStan static analysis. This validates your custom codebase against established conventions for naming, class declarations, and structure.

What is the best way to run PHPStan and PHPCS checks for Drupal 10 modules?

The best way to run PHPStan and PHPCS for Drupal 10 modules is during pre-commit, CI workflows, or code reviews. This applies static analysis and style checks to ensure modules adhere to established quality patterns before deployment.

Does this Drupal coding standards skill support Drupal 11 custom codebases?

Yes, this supports Drupal 11 custom codebases. It applies guardrails for naming conventions, class declarations, and code structure specific to Drupal 10 and 11, performing static analysis to ensure consistent quality across modules.

Do I need to install PHPCS and PHPStan before using this skill?

Yes, you need Drupal coding standards tooling configured in your project beforehand. This includes PHPCS with Drupal standards and DrupalPractice rules, plus PHPStan, to perform the required static analysis and style checks.

Why does my Drupal module fail coding standards checks during code review?

Drupal modules fail coding standards checks due to style violations caught by PHPCS or type safety issues found by PHPStan. Running these tools identifies naming convention errors, improper class declarations, and structural problems in your code.

Can I use this for DrupalPractice checks in a CI workflow?

Yes, you can use this for DrupalPractice checks in a CI workflow. It supports running PHPCS with DrupalPractice rules and PHPStan analysis in pre-commit, CI, and code-review contexts to validate code quality before submission.