agentleFS
Sequela02Sequela02/canasta/skills/stack/tailwind-v4/SKILL.md

tailwind-v4

Skill0 starsChanged yesterdayMITView on GitHub

Configure Tailwind CSS v4 or change its tokens, utilities, responsive styles, and v3 migrations.

12 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use operational-enterprise-ai, product-proof-saas and 10 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.
  • boraoztuncSkill

    operational-enterprise-ai

    Create or redesign enterprise AI, automation, security, and operations product pages that explain system boundaries, approvals, auditability, exceptions, and rollback. Use for dark cinematic heroes, hairline grids, metric pauses, expandable solution rows, case-study evidence, security proof, and qualified demo or waitlist handoffs.

    Also in 3 projects that use this

  • boraoztuncSkill

    product-proof-saas

    Create or redesign SaaS and AI product landing pages where a real workflow, interface, or deterministic demo is the central proof. Use for pale atmospheric shells, product UI in the hero, prompt-to-output stories, audience tabs, compact feature modules, honest pricing comparisons, and FAQ handoffs.

    Also in 3 projects that use this

  • Dragoon0xSkill

    pricing-page

    Present pricing in ways that reduce friction and increase clarity. Handles tier naming, feature comparison, anchor pricing, and plan selection psychology. Use when designing pricing pages, plan selectors, or upgrade prompts.

    Also in 3 projects that use this

  • ParthJadhavSkill

    app-store-screenshots

    Use when building App Store or Google Play screenshot pages, generating exportable marketing screenshots for iOS, macOS, and/or Android apps, or scaffolding a screenshot editor with Next.js. Triggers on app store, mac app store, play store, screenshots, marketing assets, html-to-image, phone mockup, mac mockup, android screenshots, feature graphic.

    Also in 3 projects that use this

  • silvainfmSkill

    page-cro

    When the user wants to optimize, improve, or increase conversions on any marketing page — including homepage, landing pages, pricing pages, feature pages, or blog posts. Also use when the user says "CRO," "conversion rate optimization," "this page isn't converting," "improve conversions," or "why isn't this page working." For signup/registration flows, see signup-flow-cro. For post-signup activation, see onboarding-cro. For forms outside of signup, see form-cro. For popups/modals, see popup-cro.

    Also in 3 projects that use this

  • silvainfmSkill

    analytics-tracking

    When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.

    Also in 3 projects that use this

  • +1 more from boraoztunc
  • +1 more from silvainfm

The file

Show its rules and text

We split this skill into the rules it gives an agent

33 rules. 0 are common, 19 are distinctive, and 14 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 19

    Distinctive

    This author's own choices. Worth a look.

  • 14

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer official Tailwind documentation when behavior is uncertain:

    line 12
  2. Very specific:

    Use @import "tailwindcss".

    line 22
  3. Very specific:

    Use @theme for values that should generate utilities.

    line 23
  4. Very specific:

    Use @theme inline when mapping Tailwind utility tokens to runtime CSS variables, especially with shadcn-style semantic variables.

    line 24
  5. Very specific:

    Keep runtime semantic values in :root, .dark, or theme selectors.

    line 25
  6. Very specific:

    Use semantic names for component code: bg-background, text-foreground, border-border, text-muted-foreground.

    line 51
  7. Distinctive:

    Avoid raw palette utilities inside reusable components unless the token is intentionally local.

    line 52
  8. Distinctive:

    Do not duplicate the same value in both component code and CSS variables.

    line 53
  9. Very specific:

    Do not put theme-variant values directly inside static @theme blocks when they need runtime theme switching.

    line 54
  10. Very specific:

    Treat accent as a restrained interaction surface for hover, focus, selection, and low-emphasis controls—not as a second CTA, warning, or …

    line 56
  11. Distinctive:

    Keep neutral fallback tokens for boot, loading, offline, and missing-theme states.

    line 57
  12. Distinctive:

    Prefer standard scale utilities over arbitrary values.

    line 61
  13. Distinctive:

    Use arbitrary values only for real one-off geometry, measured layout constraints, or token bridging.

    line 62
  14. Very specific:

    Use gap-* instead of space-x-*/space-y-* for flexible layouts.

    line 63
  15. Very specific:

    Use size-* for square elements.

    line 64
  16. Very specific:

    Use min-w-0 and min-h-0 in flex/grid children that contain text, tables, charts, or scroll areas.

    line 65
  17. Very specific:

    Use container queries (@container, @sm:, @lg:) when component width matters more than viewport width.

    line 66
  18. Distinctive:

    Use logical properties in CSS when directionality matters.

    line 67
  19. Distinctive:

    Do not create CSS classes that secretly reimplement component variants.

    line 71
  20. Distinctive:

    Use CVA or the repository's existing variant system for components with repeated visual states.

    line 72
  21. Very specific:

    Put consumer className last in cn() merging.

    line 73
  22. Distinctive:

    Keep Tailwind classes readable: group by layout, box, typography, color, state, then motion when the class list is long.

    line 74
  23. Distinctive:

    Do not extract just to hide normal Tailwind usage.

    line 76
  24. Distinctive:

    Prefer intrinsic responsive layouts over breakpoint-heavy designs.

    line 80
  25. Very specific:

    Use data-attribute variants from primitives for state (data-[state=open]:...) instead of manual class switching.

    line 82
  26. Distinctive:

    Keep hover-only behavior behind interaction-capable devices when it changes meaning.

    line 83
  27. Distinctive:

    Ensure long labels, Spanish copy, and dynamic content can wrap or truncate intentionally.

    line 84
  28. Distinctive:

    Prefer native scrolling. If styling is needed, derive quiet scrollbar colors from semantic tokens and preserve platform behavior.

    line 85
  29. Distinctive:

    Keep full-app shell scrolling in the shell.

    line 86
  30. Distinctive:

    Avoid animating layout properties.

    line 92
  31. Very specific:

    Do not leave will-change permanently applied.

    line 93
  32. Distinctive:

    Use reduced-motion variants or CSS media queries for movement.

    line 94
  33. Distinctive:

    No unknown utility classes in build output.

    line 111

“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 v4

Use Tailwind CSS v4 as a CSS-first design-system layer. Keep this skill focused on Tailwind mechanics, tokens, utilities, variants, and maintainability. Use the upstream shadcn guidance (not bundled) for component registry/API work. For color conversion, palettes, contrast and gamut, consult MDN's OKLCH reference or the upstream OKLCH skill, which is not bundled.

Sources

Prefer official Tailwind documentation when behavior is uncertain:

Baseline

  • Tailwind v4 is CSS-first. Treat the main CSS file as the source of theme configuration.
  • Use @import "tailwindcss"; in the CSS entrypoint.
  • Use @theme for values that should generate utilities.
  • Use @theme inline when mapping Tailwind utility tokens to runtime CSS variables, especially with shadcn-style semantic variables.
  • Keep runtime semantic values in :root, .dark, or theme selectors; keep utility-generating names in @theme.
  • Tailwind v4 targets modern browsers: Safari 16.4+, Chrome 111+, and Firefox 128+. If a project must support older browsers, keep that as explicit product/platform debt.

Token Model

Use this split:

@import "tailwindcss";

@theme inline {
  --color-primary: var(--primary);
  --color-background: var(--background);
  --font-sans: var(--font-body);
}

:root {
  --primary: oklch(0.45 0 0);
  --background: oklch(1 0 0);
  --font-body: system-ui, sans-serif;
}

Rules:

  • Define new color values in OKLCH.
  • Use semantic names for component code: bg-background, text-foreground, border-border, text-muted-foreground.
  • Avoid raw palette utilities inside reusable components unless the token is intentionally local.
  • Do not duplicate the same value in both component code and CSS variables.
  • Do not put theme-variant values directly inside static @theme blocks when they need runtime theme switching.
  • Define semantic state tokens such as success, warning, info, and destructive when the product needs them; consume those names through component variants instead of palette-string props or local color maps.
  • Treat accent as a restrained interaction surface for hover, focus, selection, and low-emphasis controls—not as a second CTA, warning, or unrelated brand color.
  • Keep neutral fallback tokens for boot, loading, offline, and missing-theme states. Once an authoritative runtime theme is available, do not layer client-side color derivations over it.

Utility Composition

  • Prefer standard scale utilities over arbitrary values.
  • Use arbitrary values only for real one-off geometry, measured layout constraints, or token bridging.
  • Use gap-* instead of space-x-*/space-y-* for flexible layouts.
  • Use size-* for square elements.
  • Use min-w-0 and min-h-0 in flex/grid children that contain text, tables, charts, or scroll areas.
  • Use container queries (@container, @sm:, @lg:) when component width matters more than viewport width.
  • Use logical properties in CSS when directionality matters.

Components

  • Do not create CSS classes that secretly reimplement component variants.
  • Use CVA or the repository's existing variant system for components with repeated visual states.
  • Put consumer className last in cn() merging.
  • Keep Tailwind classes readable: group by layout, box, typography, color, state, then motion when the class list is long.
  • Extract a component or variant when repeated class bundles represent behavior or a reusable semantic state.
  • Do not extract just to hide normal Tailwind usage.

Responsive And State

  • Prefer intrinsic responsive layouts over breakpoint-heavy designs.
  • For simple responsive grids, consider grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) in CSS or equivalent Tailwind arbitrary grid only when it improves the layout.
  • Use data-attribute variants from primitives for state (data-[state=open]:...) instead of manual class switching.
  • Keep hover-only behavior behind interaction-capable devices when it changes meaning.
  • Ensure long labels, Spanish copy, and dynamic content can wrap or truncate intentionally.
  • Prefer native scrolling. If styling is needed, derive quiet scrollbar colors from semantic tokens and preserve platform behavior; reserve custom scroll components for bounded widgets.
  • Keep full-app shell scrolling in the shell. Do not add page-level viewport-height classes or competing overflow containers as a local layout fix.

Motion And Performance

  • Animate transform and opacity by default.
  • In Tailwind v4, transform-related properties can be independent CSS properties; verify transition utilities affect the property you actually animate.
  • Avoid animating layout properties.
  • Do not leave will-change permanently applied.
  • Use reduced-motion variants or CSS media queries for movement.

Anti-Patterns

  • Hardcoded hex/rgb/hsl colors in reusable JSX.
  • Arbitrary pixel values for normal spacing, type, radius, or width scale.
  • transition-all on interactive components.
  • Negative letter spacing as a default polish move.
  • Overusing grid where flex or normal document flow is simpler.
  • Theme tokens split across several CSS files without a clear owner.
  • Tailwind config files kept around as fake authority after migrating to v4.
  • Adding plugins or helper libraries before checking whether v4 has the feature natively.

Verification

For Tailwind changes, run the project's normal CSS/build check. When available, also verify:

  • No unknown utility classes in build output.
  • Dark/theme variants resolve correctly.
  • Long text and responsive states do not overflow.
  • Contrast remains acceptable after token changes.
  • shadcn components still use the expected base API and semantic tokens.

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.