D
drupal-coding-standards
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
- 01Uses Drupal community standards
- 02Selects standards based on file type
- 03Reviews PHP, JavaScript, CSS, Twig, YAML, and SQL
- 04Provides actionable, standards-based feedback
Use cases
- 01Reviewing Drupal modules, themes, and profiles
- 02Checking code for Drupal standards compliance
- 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-standardsAfter installing, type/drupal-coding-standardsin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/standards/index.mdassets/standards/accessibility/accessibility.mdassets/standards/composer/package-name.mdassets/standards/css/architecture.mdcoding.mdcsscomb.mdfile-organization.mdformat.mdreview.mdassets/standards/javascript/best-practice.mdcoding.mddocumentation.mdeslint.mdjquery.mdassets/standards/markup/style.mdassets/standards/php/coding.mddocumentation-examples.mddocumentation.mde_all.mdexceptions.mdindex.mdnamespaces.mdnaming-services.mdplaceholders-delimiters.mdpsr4.mdassets/standards/spelling/spelling.mdassets/standards/sql/conventions.mdkeywords.mdselect-from.mdassets/standards/twig/coding.mdDetails
From the project READMEDrupal 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:
- Identify the file type being reviewed (
.php,.js,.css,.twig,.yml, etc.) - Consult the routing table in
standards-index.mdto find the corresponding standard file - Load the specific standard from
assets/standards/[category]/[file].md - Apply the standards to review the code
Review Workflow
- Read
standards-index.mdto determine which standard file applies to the code being reviewed - Load the relevant standard file from
assets/standards/ - Review the code against the standards
- Provide specific, actionable feedback referencing the relevant sections of the standards
Comments
Markdown supported