drupal-conventions

Apply Drupal conventions for theming, translation, and error handling in PHP and Twig.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drupal projects often struggle to maintain consistent conventions across theming, translations, and error handling. This skill provides on-demand Drupal conventions to streamline development and ensure consistency.

Core Features & Use Cases

  • Translation Rules: enforce consistent string handling and localization practices across PHP and Twig.
  • CSS Conventions: standardize class naming, theming patterns, and asset usage.
  • Error Handling: provide guidelines to throw and log errors safely and predictably.

Quick Start

Invoke this skill to load Drupal conventions into context before beginning theming, translation, or error handling tasks.

Frequently Asked Questions about drupal-conventions

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

FAQPage Schema
What are the standard Drupal conventions for handling translations in Twig templates?

Drupal conventions for translation enforce consistent string handling and localization practices across PHP and Twig, ensuring translatable strings are properly wrapped and formatted for the localization system.

How do I standardize CSS class naming and theming patterns in a Drupal project?

Standardize CSS class naming in Drupal by applying established theming conventions that dictate class naming structures, theming patterns, and asset usage to maintain visual and structural consistency.

What is the best way to handle and log errors predictably in Drupal PHP?

The best way to handle errors in Drupal is to follow specific error handling conventions that provide guidelines to throw and log errors safely and predictably within the PHP environment.

Can I apply these Drupal theming and translation conventions to existing custom modules?

Yes, these Drupal conventions are applicable across existing Drupal projects and modules, providing on-demand guidance for theming, translations, and error handling in both PHP backend and Twig environments.

Why do my Drupal Twig translations break when string handling is inconsistent across modules?

Inconsistent string handling breaks Drupal Twig translations because it violates localization conventions; enforcing standardized translation rules ensures consistent string extraction and processing across the project.