From drupal-boost
Drupal 11 theme development with Single Directory Components (SDC), Starterkit themes, Twig templates, component composition, and CSS/JS libraries. Use when creating a theme, building SDCs, writing Twig templates, or styling Drupal output.
npx claudepluginhub abderrahimghazali/drupal-boostThis skill is limited to using the following tools:
```
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
themes/custom/THEME_NAME/
├── THEME_NAME.info.yml
├── THEME_NAME.theme # Preprocess functions
├── THEME_NAME.libraries.yml # CSS/JS libraries
├── THEME_NAME.breakpoints.yml # Responsive breakpoints
├── components/ # Single Directory Components
│ ├── card/
│ │ ├── card.component.yml
│ │ ├── card.twig
│ │ ├── card.css
│ │ └── card.js
│ └── hero/
│ ├── hero.component.yml
│ ├── hero.twig
│ └── hero.css
├── templates/ # Template overrides
│ ├── layout/
│ ├── node/
│ ├── block/
│ ├── field/
│ └── views/
├── css/ # Global styles
├── js/ # Global scripts
└── images/ # Theme images
php web/core/scripts/drupal generate-theme my_theme --starterkit starterkit_theme
name: Card
status: stable
description: A card component with image, title, and body
props:
type: object
properties:
title:
type: string
title: Card Title
image_url:
type: string
title: Image URL
variant:
type: string
title: Variant
enum: ['default', 'featured', 'compact']
default: 'default'
required:
- title
slots:
body:
title: Card Body
description: The main content of the card
libraryOverrides:
css:
component:
card.css: {}
js:
card.js: {}
dependencies:
- core/drupal
<article class="card card--{{ variant|default('default') }}">
{% if image_url %}
<img src="{{ image_url }}" alt="{{ title }}" class="card__image" />
{% endif %}
<h3 class="card__title">{{ title }}</h3>
<div class="card__body">
{% block body %}{% endblock %}
</div>
</article>
{% include 'THEME_NAME:card' with {
title: 'My Card',
image_url: '/path/to/image.jpg',
variant: 'featured',
} %}
{% embed 'THEME_NAME:card' with { title: 'Custom Body' } %}
{% block body %}
<p>Custom content in the body slot.</p>
{% endblock %}
{% endembed %}
{{ variable }} safely|raw only when you are 100% certain content is safe (rare)|t for translatable strings: {{ 'Hello'|t }}{{ attach_library('THEME_NAME/my-library') }}{{ path('entity.node.canonical', {'node': nid}) }}development.services.yml for template suggestions# THEME_NAME.libraries.yml
global-styling:
css:
theme:
css/global.css: {}
js:
js/global.js: {}
dependencies:
- core/drupal
- core/once
Attach in info.yml:
libraries:
- THEME_NAME/global-styling
|raw with user-generated content{{ attach_library() }} to load CSS/JS on demandblock__element--modifierRead reference files for details:
reference/sdc-patterns.md for advanced SDC patternsreference/twig-reference.md for Drupal Twig functions/filtersreference/starterkit-guide.md for theme generation