Provides Tailwind CSS patterns for layout utilities, color schemes, responsive design, and className merging. Use when styling components or creating layouts.
Ships in sergiodxa-agent-skills-1. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Styling patterns and conventions for frontend applications. Contains 10 rules covering layout utilities, affordances, color schemes, responsive design, and className handling.
Reference these guidelines when:
Use custom stack utilities instead of flex classes.
// Bad
<div className="flex flex-col gap-4">
<div className="flex flex-row gap-4">
// Good
<div className="v-stack gap-4">
<div className="h-stack gap-4">
Available utilities:
v-stack - Vertical stack (flex column)h-stack - Horizontal stack (flex row)v-stack-reverse - Reversed vertical stackh-stack-reverse - Reversed horizontal stackz-stack - Overlapping stack (grid-based, centers children on top of each other)center - Center content both horizontally and verticallyspacer - Flexible spacer that fills available spacecircle - Perfect circle with aspect-ratio 1/1Use gap-* on parents instead of child margins.
// Bad
<div>
<Item className="mb-4" />
<Item className="mb-4" />
</div>
// Good
<div className="flex flex-col gap-4">
<Item />
<Item />
</div>
Switch layout direction at breakpoints.
// Mobile: vertical, Desktop: horizontal
<div className="v-stack lg:h-stack gap-4">
<main className="grow">...</main>
<aside className="shrink-0 lg:w-80">...</aside>
</div>
// Mobile: horizontal, Desktop: vertical
<div className="h-stack md:v-stack">
Use class-based color schemes with a custom dark variant.
<button className="rounded-full bg-gray-900 px-4 py-2 text-white dark:bg-gray-100 dark:text-gray-900">
Toggle
</button>
Always use cn() to merge classNames in components.
import { cn } from "~/lib/cn";
function Button({ className, variant }: Props) {
return (
<button
className={cn(
"base-classes",
{
"variant-primary": variant === "primary",
"variant-secondary": variant === "secondary",
},
className, // external className always last
)}
/>
);
}
Use proper types for className props.
import type { ClassName, ClassNameRecord } from "~/lib/cn";
// Single element
type Props = {
className?: ClassName;
};
// Multiple elements
type Props = {
className?: ClassNameRecord<"root" | "label" | "input">;
};
// Usage
<Input className={{ root: "w-full", label: "font-bold" }} />;
Define element-agnostic visual patterns that compose with utilities.
<label className="ui-button" htmlFor="document-upload">
Choose file
</label>
Use responsive prefixes with Tailwind defaults.
// Standard breakpoints (min-width)
<div className="px-4 md:px-8 lg:px-12">
// Show/hide with standard breakpoints
<div className="hidden md:block">Desktop only</div>
<div className="md:hidden">Mobile only</div>
Scale text responsively.
// Responsive font size
<h1 className="text-2xl md:text-3xl lg:text-4xl">
// Responsive line height with text
<p className="text-sm leading-5 md:text-base md:leading-6">
Design for input capabilities (pointer/hover) instead of device labels.
<button className="h-10 w-10 pointer-coarse:h-12 pointer-coarse:w-12">
<Icon />
</button>
| Don't | Do |
|---|---|
flex flex-col | v-stack |
flex flex-row | h-stack |
flex items-center justify-center | center |
bg-gray-100 | bg-neutral-100 |
bg-[#hex] | Use design tokens |
className="..." without cn() | cn("...", className) |
Inline style for responsive | Tailwind prefixes |
| File | Purpose |
|---|---|
tailwind.config.js | Config, custom utilities, colors |
app/styles/global.css | Color scheme CSS variables |
app/styles/tailwind.css | Additional utilities |
app/utils/cn.ts | className merge utility |
rules/affordance-classes.md (opens in a new tab)rules/classname-cn-utility.md (opens in a new tab)rules/classname-prop-types.md (opens in a new tab)rules/color-schemes.md (opens in a new tab)rules/layout-prefer-gaps.md (opens in a new tab)rules/layout-responsive-stacks.md (opens in a new tab)rules/layout-stack-utilities.md (opens in a new tab)rules/responsive-breakpoints.md (opens in a new tab)rules/responsive-capabilities.md (opens in a new tab)rules/responsive-text.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
11 skills in this plugin
/frontend-accessibility-best-practicesAccessibility (a11y) best practices for React components. Use when creating UI components, forms, interactive elements, or reviewing code for accessibility compliance./frontend-async-best-practicesAsync/await and Promise optimization guidelines. Use when writing, reviewing, or refactoring asynchronous code to eliminate waterfalls and maximize parallelism. Triggers on tasks involving data fetching, loaders, actions, or Promise handling./frontend-internationalization-best-practicesInternationalization best practices for React Router framework mode using remix-i18next. Use when setting up locales, middleware, resource routes, or language switching./frontend-js-best-practicesJavaScript performance optimization guidelines. Use when writing, reviewing, or refactoring JavaScript/TypeScript code to ensure optimal performance patterns. Triggers on tasks involving loops, data structures, DOM manipulation, or general JS optimization./frontend-react-best-practicesReact performance optimization guidelines. Use when writing, reviewing, or refactoring React components to ensure optimal rendering and bundle patterns. Triggers on tasks involving React components, hooks, memoization, or bundle optimization./frontend-react-router-best-practicesReact Router performance and architecture patterns. Use when writing loaders, actions, forms, routes, or working with React Router data fetching. Triggers on tasks involving React Router routes, data loading, form handling, or route organization./sergiodxa-agent-skills-1:frontend-tailwind-best-practicesfrom sergiodxa-agent-skills-1
sergiodxa-agent-skills-1@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin sergiodxa-agent-skills-1Other plugins' skills for the same job