agentleFS
Rikinshah787Rikinshah787/agent-skills-production-skills/skills/tailwindcss/SKILL.md

tailwindcss

Skill2 starsChanged 4 months agoMITView on GitHub

Use to style applications with Tailwind CSS v4 utilities, responsive and state variants, CSS-first theme tokens, dark mode, and production builds.

  • Installs packages

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use app-renderer-systems, refactoring-analysis and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • pedronauckSkill

    app-renderer-systems

    Create, extend, or debug frontend domain modules organized under systems/. Covers adapters, Query hooks, local state, and public exports; excludes generic components and backend implementation.

    Also in 3 projects that use this

  • pedronauckSkill

    refactoring-analysis

    Audit code quality and architectural health or plan refactoring using Fowler code smells and techniques; write prioritized findings to docs/_refacs/. Excludes formatting, performance, and security audits.

    Also in 3 projects that use this

  • barisariburnuSkill

    tanstack

    Expert assistance for TanStack Router, Query (v5), and Table (v8). Use when users need help with file-based routing, type-safe navigation, data loading, search params, queries, mutations, optimistic updates, infinite queries, table state management, or debugging TanStack libraries.

    Also in 3 projects that use this

  • rohitg00Skill

    typescript-advanced

    Advanced TypeScript patterns including generics, conditional types, mapped types, template literals, and type guards

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    nodejs

    Node.js development environment. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `nodejs` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • VercelSkill

    react

    React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.

    Also in 6 projects that use this

  • +1 more from pedronauck

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when: you want fast, consistent UI styling without maintaining a large component stylesheet.

    line 21
  2. Distinctive:

    Use when: you need responsive, state, dark-mode, and container-query variants.

    line 22
  3. Distinctive:

    Don't use for: a tiny page where a few lines of plain CSS are clearer.

    line 23
  4. Distinctive:

    Treat arbitrary values from users as untrusted.

    line 128
  5. Distinctive:

    Keep generated class names static to avoid missing CSS and accidental style injection.

    line 129

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tailwind CSS - Skillship

Build custom interfaces with composable utility classes and zero runtime. Tailwind v4 scans source files automatically and defines design tokens directly in CSS with @theme.

🧭 When to use this skill

  • Use when: you want fast, consistent UI styling without maintaining a large component stylesheet.
  • Use when: you need responsive, state, dark-mode, and container-query variants.
  • Don't use for: a tiny page where a few lines of plain CSS are clearer.

⚡ Quickstart

Option A: Vite (preferred for Vite apps)

npm install tailwindcss @tailwindcss/vite
// vite.config.ts
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({ plugins: [tailwindcss()] });

Option B: PostCSS (Next.js, Angular, and other PostCSS apps)

npm install tailwindcss @tailwindcss/postcss postcss
// postcss.config.mjs
export default {
  plugins: { "@tailwindcss/postcss": {} },
};

Import Tailwind once in the global stylesheet

@import "tailwindcss";

Use utilities

export function SaveButton() {
  return (
    <button className="rounded-md bg-cyan-700 px-4 py-2 font-semibold text-white hover:bg-cyan-800 focus-visible:outline-2 focus-visible:outline-offset-2">
      Save
    </button>
  );
}

🧩 Common recipes

Recipe: Responsive layout (mobile-first)

<section class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4">
  <!-- base classes apply everywhere; md: and xl: apply at those breakpoints and up -->
</section>

Recipe: Add design tokens with @theme

@import "tailwindcss";

@theme {
  --color-brand-500: oklch(0.62 0.16 210);
  --color-brand-700: oklch(0.48 0.13 210);
  --font-display: "Space Grotesk", sans-serif;
  --breakpoint-3xl: 120rem;
  --radius-card: 0.5rem;
}

This creates utilities such as bg-brand-500, font-display, 3xl:*, and rounded-card.

Recipe: Class-based dark mode

@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));
<article class="bg-white text-zinc-950 dark:bg-zinc-950 dark:text-zinc-50"></article>

Toggle the dark class on <html> and persist the preference in your application.

Recipe: Dynamic values without broken class detection

const variants = {
  success: "bg-emerald-600 text-white",
  danger: "bg-red-600 text-white",
};

export function Badge({ tone }: { tone: keyof typeof variants }) {
  return <span className={variants[tone]}>Status</span>;
}

Do not build class names like `bg-${color}-600`. Tailwind scans source as text and needs complete class names.

Recipe: Explicitly scan a shared package

@import "tailwindcss";
@source "../packages/ui/src";

🚀 Ship to production

  • Run the real production build and inspect the generated CSS size.
  • All dynamic styles map to complete, statically detectable class strings.
  • Shared/ignored source folders are registered with @source when automatic detection cannot see them.
  • Theme tokens live in @theme; ordinary runtime-only variables use :root.
  • Keyboard focus, contrast, reduced motion, and mobile layouts are tested.
  • Play CDN is not used in production.

🔐 Security & secrets

  • Tailwind has no reason to receive secrets. Never interpolate sensitive values into classes or generated CSS.
  • Treat arbitrary values from users as untrusted; map user choices to an allowlist of known classes.
  • Keep generated class names static to avoid missing CSS and accidental style injection.

🐛 Common errors & fixes

SymptomLikely causeFix
No utilities are generatedMissing CSS import or build pluginAdd @import "tailwindcss" and the Vite/PostCSS plugin
Dynamic color class has no CSSClass name was constructed at runtimeMap values to complete class strings
Shared package styles are missingAutomatic scanner excluded the packageAdd an explicit @source path
tailwind.config.js v3 recipe failsMixing v3 setup with v4Use CSS-first @theme and the v4 plugin
Dark classes never activateNo matching dark variant selectorAdd the custom variant or use the default media behavior

📚 Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.