Drupal Vite Theme

Patterns and pitfalls for a fast custom Drupal 10/11 theme built with Vite + Tailwind CSS v4 + Single Directory Components (SDC) via the drupal/vite module. Use when creating or changing a Vite-built theme, editing vite.config.js, *.libraries.yml with `vite:` keys, Tailwind v4 `@theme`/tokens/preflight, SDC component CSS, content-hashed dist assets or the Vite manifest; when a cold render is slow or 504s ("gateway timeout cold, fine after retries", "works for anonymous, hangs for logged-in"), assets 404 after a deploy, a JS/CSS fix "works locally but not in prod", styles silently vanish (token

84 stars 5 forksFrontend & Design

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add grasmash/drupal-claude-skills --skill drupal-vite-theme
Manual install
git clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-vite-theme ~/.claude/skills/drupal-vite-theme

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Drupal Vite Theme (Vite + Tailwind v4 + SDC)

A server-rendered Drupal theme where **Vite owns bundling**, the **drupal/vite**
module maps library source paths to content-hashed build output, **Tailwind v4**
supplies utilities and design tokens, and **SDC components** carry their own
CSS. The goal is a theme that stays fast as it grows: page-cacheable anonymous
pages, near-zero JS, per-route CSS that grows sublinearly.

This is a patterns-and-pitfalls skill, not a tutorial. Each lesson is
**rule → why → detect/fix**.

**Verified against:** drupal/vite **1.5.1**, Drupal core **11.4**, Vite **6.4**,
Tailwind CSS **4.3** (`@tailwindcss/vite` 4.3). Re-check version-bound claims
when you upgrade.

**Scope:** this skill covers the Drupal side of the build (library wiring,
hashed assets, SDC). If the theme also ships a JavaScript framework (React,
Vue, Angular, Svelte, Alpine, etc.), find and load a skill for that framework
too (`npx skills find <framework>`) and follow its current best practices,
including security guidance (XSS via `v-html`/`dangerouslySetInnerHTML`, build
config, dependency audit). For `drupalSettings` use `drupal-performance` for
cache contexts, and use `processed` rather than raw field values for markup.

## When This Skill Activates

- Building or restructuring a theme on Vite / Tailwind v4 / SDC
- Editing `vite.config.js`, `mytheme.libraries.yml` (`vite:` keys), `mytheme.info.yml` (`vite:` block), or `settings.php` `$settings['vite']`
Read the full skill on GitHub

Details

Skill name
drupal-vite-theme
Path
skills/drupal-vite-theme/SKILL.md
License
MIT
Repo updated
1 October 2026

FAQ

What does the Drupal Vite Theme skill do?

Patterns and pitfalls for a fast custom Drupal 10/11 theme built with Vite + Tailwind CSS v4 + Single Directory Components (SDC) via the drupal/vite module. Use when creating or changing a Vite-built theme, editing vite.config.js, *.libraries.yml with `vite:` keys, Tailwind v4 `@theme`/tokens/preflight, SDC component CSS, content-hashed dist assets or the Vite manifest; when a cold render is slow or 504s ("gateway timeout cold, fine after retries", "works for anonymous, hangs for logged-in"), assets 404 after a deploy, a JS/CSS fix "works locally but not in prod", styles silently vanish (token

How do I install the Drupal Vite Theme skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add grasmash/drupal-claude-skills --skill drupal-vite-theme. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Drupal Vite Theme popular?

It lives in grasmash/drupal-claude-skills, which has 84 GitHub stars and 5 forks.

Related skills

Acquia Source

84

grasmash/drupal-claude-skills

Connect to an Acquia Source ("Source powered by Drupal CMS") site — its JSON:API and MCP endpoints, OAuth2 auth, the @drupal-canvas CLI, and the Canvas Page API deploy workflow. Use when wiring an AI agent or app to a Source CMS site, building/uploading Drupal Canvas Code Components, deploying landing pages via the Page API, or registering the Source MCP server with Claude Code/Cursor.

Frontend & Design

Canvas Contribution

84

grasmash/drupal-claude-skills

Workflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix intended for upstream, or when moving a local Canvas change onto a drupal.org issue. Extends drupal-contrib-mgmt with Canvas-specific details.

Frontend & Design

Claude Code MCP Setup

84

grasmash/drupal-claude-skills

Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.

AI, LLMs & Agents

Mockup Parity

84

grasmash/drupal-claude-skills

Workflow for porting static HTML mockups into themed Drupal Twig/SDC routes without dropping working capabilities: a two-gate reconciliation process, per-delta classification (style, structural, or conflict with a prior decision), fixing through shared components, and a Playwright-verified visual diff ledger. Use when porting a mockup screen into a route, conforming an existing route to its mockup, or executing any parity or reskin work item. Load alongside design-review.

Frontend & Design

Drupal Canvas Sdc

84

grasmash/drupal-claude-skills

Drupal Canvas SDC (Single Directory Components) with Twig templates. Use when creating, modifying, or troubleshooting Twig-based Canvas components in themes/modules, component.yml schemas, Canvas registration (props need title, required props need examples), canvas.component config entities, component versioning and outdated instances, config drift after a Canvas upgrade, Canvas preview issues, or page builder functionality. For React/JSX Code Components, see the upstream drupal-canvas/skills suite.

Frontend & Design

Smart Router Skill

49

darrenhinde/Opencode-skills-example

Movie character personality skill with configurable missions - choose your character and watch themed workflows unfold

Frontend & Design15

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.