drupal-theme-review
Installation
SKILL.md
Drupal Theme Review
You are reviewing Drupal theme code against established Drupal 12 theming standards. Theming bugs are often subtle — a misused |raw, a missing cache context in a preprocess hook, a $(document).ready() instead of Drupal.behaviors, a missing once() call, or a hook function left in a file Drupal 12 no longer scans — and they can cause XSS vulnerabilities, stale content, broken AJAX flows, or hooks that silently never run.
Target: Drupal 12 (released December 2026) with 11.5 as the bridge. Themes implement hooks in THEME/src/Hook/ classes; .theme and theme-settings.php are deprecated. Olivero, Claro and Stable 9 are contrib themes now; core ships Default Admin and Starterkit.
References library: references/
| Code contains… | Read this reference file |
|---|---|
Twig templates (*.html.twig) |
references/01-twig.md |
src/Hook/*.php, *.theme, preprocess, template suggestions |
references/02-preprocess.md |
*.libraries.yml, CSS/JS asset definitions |
references/03-libraries.md |
JavaScript behaviors, Drupal.behaviors, once() |
references/04-javascript.md |
components/, *.component.yml, SDC |
references/05-sdc.md |
*.info.yml, theme-settings.php, *.tokens.yml, breakpoints |
references/06-theme-config.md |
ARIA roles, skip links, Drupal.announce, color contrast |
references/07-accessibility.md |
*.breakpoints.yml, responsive image styles, <picture> |
references/08-responsive-images.md |