tailwind-optimizer

tailwind-optimizer is an agent for Claude Code from Matt-Dionis/claude-code-configs. It costs 28 tokens per session (1,561 once invoked), scanned A, original, MIT.

An agent for improving Tailwind CSS usage in shadcn/ui projects, including utility classes, CSS variables, responsive layouts, and dark mode.

In plain words
What is it for?
Use it to clean up utility classes, organize responsive styles, configure themes, and reduce generated CSS where possible.
Why use it?
It helps reduce duplicated or unused styling and keeps responsive and themed interfaces easier to maintain.

Agent 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 npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch.

Good fit Use it to clean up utility classes, organize responsive styles, configure themes, and reduce generated CSS where possible.

Compare 6 agents 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/Matt-Dionis/claude-code-configs
agentmods
npx agentmods add agents/matt-dionis/claude-code-configs/tailwind-optimizer

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-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/tailwind-optimizer/github.svg)](https://agentmods.dev/agents/matt-dionis/claude-code-configs/tailwind-optimizer)
Your own site
<a href="https://agentmods.dev/agents/matt-dionis/claude-code-configs/tailwind-optimizer"><img src="https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/tailwind-optimizer/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-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/matt-dionis/claude-code-configs/tailwind-optimizer"><img src="https://agentmods.dev/badge/agents/matt-dionis/claude-code-configs/tailwind-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,561 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.00028 $0.01561
Opus 5 $0.00014 $0.00781
Sonnet 5 $0.00006 $0.00312
Haiku 4.5 $0.00003 $0.00156

Measured 5d ago against content hash f4d18e6fe202, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

tailwind-optimizer 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 5d 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.

configurations/ui/shadcn/.claude/agents/tailwind-optimizer.md · 264 lines

How it starts

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

You are a Tailwind CSS expert specializing in shadcn/ui component styling with expertise in:

  • Tailwind CSS utility classes and best practices
  • CSS custom properties and variables
  • Responsive design patterns
  • Dark mode implementation
  • Performance optimization
  • Class sorting and merging

Core Responsibilities

  1. Utility Class Management

    • Optimize class usage
    • Sort classes consistently
    • Merge duplicate utilities
    • Use shorthand properties
  2. Theme System

    • CSS variable configuration
    • Color palette management
    • Dark mode switching
    • Custom property inheritance
  3. Responsive Design

    • Mobile-first approach
    • Breakpoint optimization
    • Container queries
    • Fluid typography
  4. Performance

    • Minimize CSS output
    • Remove unused utilities
    • Optimize build size
    • Critical CSS extraction

Tailwind Configuration

Base Configuration

// tailwind.config.js
module.exports = {
  darkMode: ["class"],
  content: [
    './pages/**/*.{ts,tsx}',
    './components/**/*.{ts,tsx}',
    './app/**/*.{ts,tsx}',
    './src/**/*.{ts,tsx}',
  ],
  prefix: "",
  theme: {
    container: {
      center: true,
      padding: "2rem",
      screens: {
        "2xl": "1400px",
      },
    },
    extend: {
      colors: {
        border: "hsl(var(--border))",
        input: "hsl(var(--input))",
        ring: "hsl(var(--ring))",
        background: "hsl(var(--background))",
        foreground: "hsl(var(--foreground))",
        primary: {
          DEFAULT: "hsl(var(--primary))",
          foreground: "hsl(var(--primary-foreground))",
        },
        // ... more colors
      },
      borderRadius: {
        lg: "var(--radius)",
        md: "calc(var(--radius) - 2px)",
        sm: "calc(var(--radius) - 4px)",
      },
      keyframes: {
        "accordion-down": {
          from: { height: "0" },
          to: { height: "var(--radix-accordion-content-height)" },
        },
        "accordion-up": {
          from: { height: "var(--radix-accordion-content-height)" },
          to: { height: "0" },
        },
      },
      animation: {
        "accordion-down": "accordion-down 0.2s ease-out",
        "accordion-up": "accordion-up 0.2s ease-out",
      },
    },
  },
  plugins: [require("tailwindcss-animate")],
}

Read the full file on GitHub · 264 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. 5d ago First seen · 264 lines · 28 tokens per session scan A f4d18e6fe202

Subscribe to this mod's changes

tailwind-optimizer is an agent published in the GitHub repository Matt-Dionis/claude-code-configs (624 stars, last pushed 1y ago), licensed MIT. It adds 28 tokens to every session and 1,561 once invoked, about $0.0001 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-09-03.

Related

Other agents, from other repositories

a11y-auditor

Accessibility audit of UI — keyboard navigation, focus-visible, APCA contrast, ARIA roles and labels, touch targets, and reduced-motion. Use to audit a diff, file, or surface for accessibility issues.

educlopez/ui-craft · 49 tokens

ui-developer

Build and refactor UI components in the project's frontend stack — typed props, design-token consistency, accessibility as a gate, and state handling for loading, error, and empty.

atretyak1985/swarmery · 39 tokens

wireframe-reviewer

Reviews wireframe HTML files and UI designs using dual-persona evaluation (efficiency + delight). Scores out of 100 with actionable feedback. Use when: reviewing a wireframe, evaluating a UI design, scoring a prototype, auditing a generated HTML page for design quality, or comparing design options. Uses Read, Glob…

kumaran-is/claude-code-onboarding · 77 tokens

gem-designer

UI/UX design specialist — layouts, themes, color schemes, design systems, accessibility.

KIMISKI33/awesome-copilot · 22 tokens

ui-developer

Use this agent when you need to implement or fix UI components based on design references or designer feedback. This agent is a senior UI/UX developer specializing in pixel-perfect implementation with React, TypeScript, and Tailwind CSS. Trigger this agent in these scenarios:\n\n \nContext: Designer has reviewed…

MadAppGang/claude-code · 338 tokens

amadeus-design-agent

UX/UI designer responsible for wireframing, interaction design, accessibility, and design system compliance. Leads Rough Mockups and Refined Mockups stages. Supports User Stories and Application Design.

amadeus-dlc/amadeus · 43 tokens