tailwind-components

tailwind-components is a skill for Claude Code from punkadillo/figma-code-composer. It costs 29 tokens per session (3,733 once invoked), scanned A, original, MIT.

A guide for turning repeated Tailwind CSS utility patterns into reusable components. Tailwind CSS is a styling system that applies small CSS classes directly in markup.

In plain words
What is it for?
Extract reusable buttons, forms, and other interface patterns using component code, shared CSS rules, or Tailwind plugins.
Why use it?
It helps prevent repeated class lists and keeps shared styles easier to update.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Extract reusable buttons, forms, and other interface patterns using component code, shared CSS rules, or Tailwind plugins.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/punkadillo/figma-code-composer/tailwind-components
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.

Any agent
npx skills add punkadillo/figma-code-composer --skill tailwind-components
Clone the repo
git clone --depth 1 https://github.com/punkadillo/figma-code-composer

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/tailwind-components.svg)](https://agentmods.dev/skills/punkadillo/figma-code-composer/tailwind-components)
Your own site
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/tailwind-components"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/tailwind-components.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,733 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.00029 $0.03733
Opus 5 $0.00015 $0.01867
Sonnet 5 $0.00006 $0.00747
Haiku 4.5 $0.00003 $0.00373

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

Security

Grade A, and why

tailwind-components 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.

.figma-pipeline/skills/tailwind-components/SKILL.md · 612 lines

How it starts

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

Tailwind CSS - Component Patterns

While Tailwind is utility-first, you'll often want to extract common patterns into reusable components. This skill covers strategies for building maintainable component architectures with Tailwind.

Key Concepts

Component Extraction Strategies

There are several approaches to creating reusable components with Tailwind:

  1. Template/Component Abstraction (Recommended)
  2. CSS @apply Directive (Use sparingly)
  3. JavaScript/TypeScript Component Classes
  4. Tailwind Plugins

Template Component Abstraction

The most maintainable approach is to extract components at the template level:

// Button.tsx
interface ButtonProps {
  variant?: 'primary' | 'secondary' | 'outline'
  size?: 'sm' | 'md' | 'lg'
  children: React.ReactNode
  onClick?: () => void
}

export function Button({
  variant = 'primary',
  size = 'md',
  children,
  onClick
}: ButtonProps) {
  const baseClasses = 'font-semibold rounded transition-colors focus:ring-2 focus:ring-offset-2'

  const variantClasses = {
    primary: 'bg-blue-500 hover:bg-blue-600 text-white focus:ring-blue-300',
    secondary: 'bg-gray-500 hover:bg-gray-600 text-white focus:ring-gray-300',
    outline: 'border-2 border-blue-500 text-blue-500 hover:bg-blue-50 focus:ring-blue-300',
  }

  const sizeClasses = {
    sm: 'px-3 py-1.5 text-sm',
    md: 'px-4 py-2 text-base',
    lg: 'px-6 py-3 text-lg',
  }

  return (
    <button
      className={`${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]}`}
      onClick={onClick}
    >
      {children}
    </button>
  )
}

Best Practices

1. Use Class Variance Authority (CVA)

For complex component variants, use cva for better type safety:

import { cva, type VariantProps } from 'class-variance-authority'

const button = cva(
  // Base classes
  'font-semibold rounded transition-colors focus:ring-2',
  {
    variants: {
      intent: {
        primary: 'bg-blue-500 hover:bg-blue-600 text-white',
        secondary: 'bg-gray-500 hover:bg-gray-600 text-white',
        danger: 'bg-red-500 hover:bg-red-600 text-white',
      },
      size: {
        small: 'text-sm px-3 py-1.5',
        medium: 'text-base px-4 py-2',
        large: 'text-lg px-6 py-3',
      },
      disabled: {
        true: 'opacity-50 cursor-not-allowed',
      },
    },
    compoundVariants: [
      {
        intent: 'primary',
        size: 'medium',
        className: 'uppercase',
      },
    ],
    defaultVariants: {
      intent: 'primary',
      size: 'medium',
    },
  }
)

interface ButtonProps extends VariantProps<typeof button> {
  children: React.ReactNode
}

export function Button({ intent, size, disabled, children }: ButtonProps) {
  return (
    <button className={button({ intent, size, disabled })}>
      {children}
    </button>
  )
}

Read the full file on GitHub · 612 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 · 612 lines · 29 tokens per session scan A c9fa56a708c6

Subscribe to this mod's changes

tailwind-components is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 19d ago), licensed MIT. It adds 29 tokens to every session and 3,733 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 skills, from other repositories

mcp-host-styling-integration

Integrates MCP App UI with host theming system. Applies host CSS variables, handles onhostcontextchanged, safe area insets, display mode detection, and fullscreen configuration.

a5c-ai/babysitter · 44 tokens

moai-design-tools

Design tool integration specialist covering Figma MCP, Pencil renderer, and Pencil-to-code export. Use when fetching design context from Figma, rendering Pencil designs, or exporting to React/Tailwind code.

modu-ai/moai-adk · 45 tokens

ui-first-builder

Creates production-ready UI immediately from any description. Generates complete pages, components, and realistic mock data in FIRST response. Uses Next.js 16 + Tailwind + shadcn/ui. Never asks questions - infers everything from context. Triggers: UI creation, page building, component generation, build interface…

wasintoh/toh-framework · 75 tokens

component-design

Apply a coherent visual system, responsive behavior, interaction states, and accessibility to Kun components.

KunAgent/Kun · 21 tokens

coss-ui

Set up or extend a Next.js web app with Coss/UI — the official Cal.com design system, built on Base UI + Tailwind CSS v4 and installed through the shadcn CLI via the namespaced @coss/ registry. Two modes: Init (shadcn init @coss/style on a new project) and Add (pull @coss/ui primitives, single @coss/ components, or…

lukedj78/dev-flow · 244 tokens

animated-icons

Add a Motion-animated icon to a Next.js app from a shadcn registry instead of hand-animating an SVG. Two registries, picked from the project's icon set: heroicons-animated (316 icons, shadcn add @heroicons-animated/ ) and hugeicons-animated (165 icons, shadcn add @hugeicons-animated/ , which also installs a shared…

lukedj78/dev-flow · 247 tokens