tailwind-drupal

tailwind-drupal is a skill for Claude Code from trebormc/drupal-ai-agents. It costs 180 tokens per session (1,741 once invoked), scanned A, original, Apache-2.0.

A setup and usage guide for Tailwind CSS in Drupal themes. Tailwind CSS generates stylesheet rules from the utility classes found in project files.

In plain words
What is it for?
Use it when installing or configuring Tailwind, changing Tailwind classes in Twig, HTML, PHP, or Drupal files, and rebuilding CSS and clearing caches afterward.
Why use it?
It prevents a common problem where newly added classes have no effect because the CSS was not rebuilt or Drupal is still serving a cached version.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is "dev": "npx tailwindcss -i ./src/input.css -o ./css/styles.css --watch",.

Good fit Use it when installing or configuring Tailwind, changing Tailwind classes in Twig, HTML, PHP, or Drupal files, and rebuilding CSS and clearing caches afterward.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trebormc/drupal-ai-agents
agentmods
npx agentmods add skills/trebormc/drupal-ai-agents/tailwind-drupal

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tailwind-drupal

README.md
[![agentmods](https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/tailwind-drupal/github.svg)](https://agentmods.dev/skills/trebormc/drupal-ai-agents/tailwind-drupal)
Your own site
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/tailwind-drupal"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/tailwind-drupal/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tailwind-drupal

Your own site · 80×15
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/tailwind-drupal"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/tailwind-drupal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 180 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00180 $0.01741
Opus 5.5 $0.00072 $0.00696
Sonnet 5.5 $0.00036 $0.00348
Haiku 4.5 $0.00018 $0.00174

Measured 1mo ago against content hash 17c10babb80a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tailwind-drupal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/tailwind-drupal/SKILL.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CRITICAL RULE

Every time you add, modify, or remove Tailwind classes in ANY file (.twig, .html.twig, .php, .module, .theme), you MUST recompile the CSS and clear Drupal caches. Tailwind only includes classes it finds in scanned files. New classes that aren't compiled will NOT appear in the browser.

Mandatory post-change sequence

# 1. Recompile Tailwind CSS (ALWAYS after class changes)
ssh web npm run build --prefix $DDEV_DOCROOT/themes/custom/<THEME>

# 2. Clear Drupal cache (renders may reference old CSS)
ssh web drush cr

# 3. Verify in browser with hard refresh (Ctrl+Shift+R / Cmd+Shift+R)
#    Or use Playwright with cache disabled for testing

If you skip step 1, new Tailwind classes will NOT render. This is the most common cause of "Tailwind classes not working."

Installation in a Drupal theme

# Navigate to theme directory inside container
ssh web bash -c "cd $DDEV_DOCROOT/themes/custom/<THEME> && npm init -y"
ssh web bash -c "cd $DDEV_DOCROOT/themes/custom/<THEME> && npm install -D tailwindcss"
ssh web bash -c "cd $DDEV_DOCROOT/themes/custom/<THEME> && npx tailwindcss init"

Configuration files

package.json (in theme root)

{
  "scripts": {
    "dev": "npx tailwindcss -i ./src/input.css -o ./css/styles.css --watch",
    "build": "npx tailwindcss -i ./src/input.css -o ./css/styles.css --minify"
  },
  "devDependencies": {
    "tailwindcss": "^3.4"
  }
}
Script Use When
npm run dev Watch mode, auto-recompile on file changes During active development
npm run build One-time compile + minify Before commit, after changes

tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  // NOTE: all content paths are relative to the THEME directory (where this file lives)
  content: [
    // Drupal theme templates
    './templates/**/*.html.twig',
    './components/**/*.html.twig',
    // Custom modules that use Tailwind classes
    '../../modules/custom/**/*.html.twig',
    '../../modules/custom/**/*.php',
    '../../modules/custom/**/*.module',
    // Theme PHP files (preprocess functions with class arrays)
    './*.theme',
  ],
  theme: {
    extend: {
      colors: {
        primary: {
          50: '#eff6ff',
          100: '#dbeafe',
          200: '#bfdbfe',
          300: '#93c5fd',
          400: '#60a5fa',
          500: '#3b82f6',
          600: '#2563eb',
          700: '#1d4ed8',
          800: '#1e40af',
          900: '#1e3a8a',
        },
      },
      fontFamily: {
        sans: ['Inter', 'system-ui', 'sans-serif'],
      },
    },
  },
  plugins: [],
}

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 204 lines · 180 tokens per session scan A 17c10babb80a

Subscribe to this mod's changes

tailwind-drupal is a skill published in the GitHub repository trebormc/drupal-ai-agents (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 180 tokens to every session and 1,741 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

anti-slop-design

Autonomous Principal Design Technologist. Cures vibe-coded software from AI frontend slop using curated token archetypes and 7-axis quality gating.

sickn33/agentic-awesome-skills · 34 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

open-design-setup

Prepare or repair a project's prototyping environment so open-design can build prototypes with the project's own component library and render them through the project's toolchain. Use when the library target is needed and docs/design/prototyping.md is missing, stale, or failing; excludes HTML-only design work and…

compozy/compozy · 67 tokens

edit-site

Plans, coordinates and customizes PAC CLI-downloaded Standard or Enhanced data model non-SPA Power Pages sites created from Microsoft templates or manually in Design Studio. Use for requests involving pages, localized content, navigation, assets, snippets, site markers, Liquid/web templates, page layouts, or styling.…

microsoft/power-platform-skills · 104 tokens

frontend-visual-qa

Audits rendered UI and specific task/object-link handoffs; excludes ordinary source citations alone. Audits already-rendered UI and Markdown/Obsidian image layout — web app, deck/slide, dashboard, design-system, or Electron/native app — via real-browser/native-app journeys and a Playwright sweep. Use after UI…

daymade/claude-code-skills · 125 tokens