agentleFS
LDKTCLDKTC/Agent-P-FullStack/skills/tailwind/SKILL.md

tailwind

Skill1 starsChanged 4 months agoMITView on GitHub

Write and review utility-first Tailwind CSS — composing utilities directly in markup instead of custom CSS, using the project's design-token scale (spacing/color/font-size/radius from tailwind.config) instead of arbitrary values, mobile-first responsive prefixes (sm:/md:/lg:), state variants (hover:/focus:/dark:/aria-*) instead of hand-written pseudo-class CSS, and keeping class strings maintainable as a project grows (@apply vs. component extraction, config-driven tokens and dark mode). Use when a project's package.json lists tailwindcss as a dependency (or a tailwind.config/@theme block exists), or when asked directly to write, style, or review something with Tailwind — any framework, or plain HTML, not just React — including when asked (Thai or English) to เขียนหรือจัดสไตล์ด้วย Tailwind CSS ให้ถูกแบบ utility-first. Not for the underlying markup semantics/accessibility itself — that's html-css, which this skill styles on top of.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use waapi, lottie and 9 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.
  • anton-abyzovSkill

    waapi

    Web Animations API adapter patterns for HyperFrames. Use when authoring element.animate() motion, Animation currentTime seeking, document.getAnimations(), KeyframeEffect timing, fill modes, or native browser animations that must render deterministically in HyperFrames.

    Also in 3 projects that use this

  • MindrallySkill

    lottie

    Expert guidelines for implementing performant Lottie animations on the web

    Also in 3 projects that use this

  • anton-abyzovSkill

    css-animations

    CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

    Also in 3 projects that use this

  • freshtechbroSkill

    animejs

    Versatile JavaScript animation engine for DOM, CSS, SVG, and JavaScript objects. Use when creating timeline-based animations, stagger effects, SVG morphing, keyframe sequences, or complex choreographed animations. Triggers on tasks involving Anime.js, timeline animations, staggered sequences, SVG path animations, morphing, or multi-step animation choreography. Alternative to GSAP for SVG-heavy animations and React-independent projects.

    Also in 3 projects that use this

  • OpenAISkill

    hyperframes-registry

    Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

    Also in 3 projects that use this

  • OpenAISkill

    hyperframes-cli

    HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.

    Also in 3 projects that use this

  • +3 more from anton-abyzov
  • +2 more from openai

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 1 is distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check package.json for a tailwindcss dependency and find the config: tailwind.config.{js,ts,mjs} (v3-style) or an @theme block in the main …

    line 21
  2. Very specific:

    Never simulate desktop-first by overriding down with max-* variants as the default pattern — that inverts the cascade and gets harder to …

    line 77
  3. Very specific:

    Use a consistent ordering (layout → box model → typography → visual → state/responsive) so diffs are readable — or defer to …

    line 102
  4. Very specific:

    Don't write a custom CSS class or @apply block for something a utility combination already expresses, or as a substitute for extracting a …

    line 123
  5. Very specific:

    Don't reach for arbitrary [...] values as the default instead of the token scale — they're for genuine one-offs.

    line 126
  6. Very specific:

    Don't hand-write :hover/:focus/:disabled CSS rules when the matching variant does the same job inline.

    line 129
  7. Very specific:

    Don't write desktop-first with max-* overrides as the default responsive pattern.

    line 131
  8. Very specific:

    Don't scatter ad hoc dark: color pairs across every element when the need is one semantic token defined once in config.

    line 133
  9. Very specific:

    Don't skip html-css's semantic/accessibility fundamentals because the styling is utility classes — they're layered on top, not a …

    line 135
  10. Distinctive:

    Don't assume React — this skill applies identically in any framework or plain HTML using Tailwind.

    line 137

“Common” is measured: kept by at least 6 in 10 of the 18 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

The utility-first styling layer on top of html-css: that skill owns semantic/accessible markup, this skill owns how it gets styled once Tailwind is the tool in use. Semantics and accessibility don't stop mattering because classes replaced a stylesheet — apply html-css underneath every component this skill touches. Framework-agnostic: Tailwind classes work the same in React JSX, Vue templates, Svelte, or plain HTML, so nothing here assumes React. When the framework does happen to be React, frontend-dev (and skills/react/SKILL.md for React specifically) is what matches component conventions — this skill is what governs the class strings inside whatever gets built.

Step 1 — Confirm Tailwind is actually in play

Check package.json for a tailwindcss dependency and find the config: tailwind.config.{js,ts,mjs} (v3-style) or an @theme block in the main CSS file (v4-style config-in-CSS). If neither exists and nothing asked directly for Tailwind, stop — this isn't the right skill; use html-css for plain CSS instead.

Step 2 — Read the token scale before writing a single class

Open the config and note any extended/overridden spacing, colors, fontSize, borderRadius, screens. These are the project's real design tokens — prefer them over Tailwind's defaults whenever the project has customized them (bg-brand-500 over a default palette color that happens to look close):

// tailwind.config.js
theme: {
  extend: {
    colors: { brand: { DEFAULT: '#3b82f6', dark: '#1d4ed8' } },
    spacing: { 18: '4.5rem' },
  },
},

Step 3 — Compose utilities in markup; extract a component before reaching for @apply

Reach for existing utilities before writing custom CSS — flex items-center gap-4 rounded-lg border p-4 beats a hand-rolled .card rule doing the same thing. When a combination repeats, extract a component (React/Vue/etc.), not an @apply class — the component is the reuse mechanism. Reserve @apply for the narrow case with no component boundary: styling markup you don't control (CMS/markdown output, third-party widgets) or a global reset layered over Tailwind's preflight. A growing @apply block is hand-written CSS again with extra indirection — a signal to extract a component, not to keep the block.

Step 4 — Scale classes over arbitrary values

p-4, text-lg, rounded-md, bg-brand-500, gap-6 before p-[17px], text-[15px], rounded-[7px], bg-[#3b82f6]. Arbitrary [...] values are an escape hatch for a genuine one-off (a pixel-perfect overlay position, a third-party widget's fixed dimension) — not the default when a scale step is one step off from the mockup. The same arbitrary value showing up three-plus times isn't a one-off anymore — move it into the config (Step 2) so a design change is one edit, not a repo-wide find-and-replace.

Step 5 — Responsive prefixes, mobile-first

Unprefixed utilities are the mobile/base style; sm:/md:/lg:/xl:/ 2xl: add overrides going up (min-width), matching html-css's mobile-first convention:

<div class="flex flex-col gap-4 md:flex-row md:gap-8">

Never simulate desktop-first by overriding down with max-* variants as the default pattern — that inverts the cascade and gets harder to reason about with every added breakpoint.

Step 6 — State variants and dark mode, driven by config

hover:, focus:, focus-visible:, active:, disabled: for interaction states; aria-*/data-* variants (aria-expanded:, data-[state=open]:) for component state instead of custom class toggling in JS; group-hover:/ peer-* for parent/sibling-driven state. Stack with responsive prefixes in order (md:hover:bg-brand-600) rather than writing a separate :hover rule for something Tailwind already expresses inline.

Set darkMode once in config (class for user-toggleable, media for OS-only), then use dark: consistently. Back theme colors with CSS variables wired into theme.extend so a rebrand or new theme is edits in one place, not scattered dark:bg-gray-800 dark:text-white-style pairs on every element:

colors: { surface: 'rgb(var(--color-surface) / <alpha-value>)' }

Step 7 — Keep class strings readable

Use a consistent ordering (layout → box model → typography → visual → state/responsive) so diffs are readable — or defer to prettier-plugin-tailwindcss if it's already a devDependency instead of hand-ordering. For conditional classes, use the project's existing merge helper (clsx, or cn built on tailwind-merge) instead of manual string concatenation or nested ternaries; check for one before adding a new dependency. A class string too long to read at a glance is a signal to extract a component (Step 3), not to keep golfing the string shorter.

Step 8 — Self-check before reporting done

Confirm focus states are still visible (focus-visible: present on every interactive element — html-css Step 3 still applies). Confirm the base (no-prefix) view renders correctly as the true mobile view, then check each breakpoint up. Grep the diff for [ arbitrary-value brackets and justify each against Step 4, and for @apply blocks against Step 3. Confirm dark: variants exist everywhere a light-mode color utility was added, if the project supports dark mode.

What not to do

  • Don't write a custom CSS class or @apply block for something a utility combination already expresses, or as a substitute for extracting a component.
  • Don't reach for arbitrary [...] values as the default instead of the token scale — they're for genuine one-offs; three-plus repeats belong in config.
  • Don't hand-write :hover/:focus/:disabled CSS rules when the matching variant does the same job inline.
  • Don't write desktop-first with max-* overrides as the default responsive pattern.
  • Don't scatter ad hoc dark: color pairs across every element when the need is one semantic token defined once in config.
  • Don't skip html-css's semantic/accessibility fundamentals because the styling is utility classes — they're layered on top, not a replacement.
  • Don't assume React — this skill applies identically in any framework or plain HTML using Tailwind.

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.