mcpField
D
drupal-coding-standards

drupal-coding-standards

github.com/ronaldtebrakeTesting & quality936 installsUpdated 29w ago
Repository

About drupal-coding-standards

drupal-coding-standards is a skill for AI agents reviewing code against Drupal's official coding standards. It selects standards by file type and provides actionable feedback for Drupal project files.

Key features

  1. 01Uses Drupal community standards
  2. 02Selects standards based on file type
  3. 03Reviews PHP, JavaScript, CSS, Twig, YAML, and SQL
  4. 04Provides actionable, standards-based feedback

Use cases

  1. 01Reviewing Drupal modules, themes, and profiles
  2. 02Checking code for Drupal standards compliance
  3. 03Auditing PHP and front-end files in Drupal projects

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ronaldtebrake/drupal-coding-standards-skill --skill drupal-coding-standards

After installing, type/drupal-coding-standardsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/standards/
index.md
assets/standards/accessibility/
accessibility.md
assets/standards/composer/
package-name.md
assets/standards/css/
architecture.md
coding.md
csscomb.md
file-organization.md
format.md
review.md
assets/standards/javascript/
best-practice.md
coding.md
documentation.md
eslint.md
jquery.md
assets/standards/markup/
style.md
assets/standards/php/
coding.md
documentation-examples.md
documentation.md
e_all.md
exceptions.md
index.md
namespaces.md
naming-services.md
placeholders-delimiters.md
psr4.md
assets/standards/spelling/
spelling.md
assets/standards/sql/
conventions.md
keywords.md
select-from.md
assets/standards/twig/
coding.md

Details

From the project README

Drupal Coding Standards Skill

This skill provides AI agents with the ability to review code according to Drupal's official coding standards. The standards are maintained by the Drupal community and automatically kept up-to-date via Composer dependency.

When to Use

Activate this skill when:

  • Reviewing code in Drupal projects (modules, themes, profiles)
  • Checking code for compliance with Drupal coding standards
  • Performing code reviews on PHP, JavaScript, CSS, Twig, YAML, or SQL files
  • Ensuring code follows Drupal best practices and conventions

How It Works

This skill uses dynamic context discovery to load only the relevant standards based on the file type being reviewed:

  1. Identify the file type being reviewed (.php, .js, .css, .twig, .yml, etc.)
  2. Consult the routing table in standards-index.md to find the corresponding standard file
  3. Load the specific standard from assets/standards/[category]/[file].md
  4. Apply the standards to review the code

Review Workflow

  1. Read standards-index.md to determine which standard file applies to the code being reviewed
  2. Load the relevant standard file from assets/standards/
  3. Review the code against the standards
  4. Provide specific, actionable feedback referencing the relevant sections of the standards

Comments

Markdown supported