tailwind-drupal

tailwind-drupal is a skill for Claude Code, Codex 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 CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

Made for: Claude Code, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00180 $0.01741
Opus 5 $0.00090 $0.00870
Sonnet 5 $0.00036 $0.00348
Haiku 4.5 $0.00018 $0.00174

Measured 4d ago against content hash 17c10babb80a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (10 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 180 tokens to every session and 1,741 once invoked, about $0.0009 per session on Opus 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

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

better-colors

Helps you build a color system and answer anything about color in your project. You can generate palettes, use semantic tokens, convert between formats, check contrast and more.

jakubkrehel/skills · 38 tokens

design-frontend-dev

Clean Impeccable frontend design skill. Use when the user wants to design, redesign, critique, audit, polish, harden, optimize, adapt, clarify, colorize, animate, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, onboarding, empty states…

The-Vibe-Company/companion · 127 tokens

markstream-svelte

Integrate the beta markstream-svelte package in Svelte 5 or SvelteKit apps. Use when Codex needs Svelte 5 runes, CSS and optional peers, smooth streaming, worker setup, renderer-local or scoped custom components, or SSR-safe boundaries. Svelte 4 is unsupported.

Simon-He95/markstream-vue · 67 tokens

scss-style-guide

SCSS/CSS coding standards and patterns for fundamental-styles project.

SAP/fundamental-styles · 17 tokens

web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

vercel-labs/agent-skills · 44 tokens