tailwind-variants
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, migrate, or plan Tailwind Variants class systems with current docs. Use for tailwind-variants, tv, createTV, cn, cnMerge, cx, VariantProps, slots, compoundVariants, compoundSlots, defaultVariants, extend composition, twMergeConfig, /lite build, class overrides, TypeScript props, Tailwind CSS v4 pairing, and upgrades from v0/v1/v2/v3.x.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches Tailwind Variants (tv, slots, compound variants, extend, cn/cx/cnMerge, /lite, or migrations across TV …
- Very specific: line 14
Import path: default tailwind-variants vs tailwind-variants/lite.
- Very specific: line 25
Prefer the default build (import { tv, cn } from 'tailwind-variants') for design-system work.
- Very specific: line 28
Prefer extend for typed composition over string-splicing tv results into base arrays.
- Very specific: line 29
Use class / className props for consumer overrides.
- Very specific: line 31
Do not use removed responsiveVariants.
- Very specific: line 32
Prefer cx over deprecated cnBase.
- Distinctive: line 36
Prefer the repo's existing checks.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tailwind Variants
Use this skill when work touches Tailwind Variants (tv, slots, compound variants, extend, cn/cx/cnMerge, /lite, or migrations across TV majors).
Workflow
- Inspect the local styling stack before changing code:
- Packages:
tailwind-variantsversion, Tailwind CSS major (v4vsv3), optional directtailwind-mergeusage, Prettier Tailwind plugin. - Import path: default
tailwind-variantsvstailwind-variants/lite. - Patterns in use: single-element
tv, slots,extend, sharedcreateTV/defaultConfig,VariantPropson components.
- Packages:
- Refresh docs when versions are unclear or work touches merge config, lite builds, or major upgrades. Start from source-map.md.
- For install, default vs lite builds,
cn/cnMerge/cx, and config, use setup-core.md. - For
variants, boolean/compound variants, slots, andcompoundSlots, use variants-slots.md. - For
extend, overrides, TypeScriptVariantProps, and DX tooling, use composition-typescript.md. - For conflict resolution, custom
twMergeConfig, and v0/v1/v2/v3 migrations, use production-migration.md.
Implementation Judgment
- Pair TV v3.x with Tailwind CSS v4.x. If the project is still on Tailwind CSS v3, use
tailwind-variantsv0.x (or upgrade Tailwind first). - Prefer the default build (
import { tv, cn } from 'tailwind-variants') for design-system work. Use/liteonly when bundle size matters and merge is unnecessary. - On v3.3.0+, conflict resolution is built into the default build—do not require
tailwind-mergesolely for TV. Keeptailwind-mergeonly if the app calls it directly. - Omit
slotsfor a string-returning recipe. Passingslots: {}enables slot mode (implicitbaseslot)—avoid accidental empty-slot objects. - Prefer
extendfor typed composition over string-splicingtvresults intobasearrays. - Use
class/classNameprops for consumer overrides; let merge resolve conflicts when enabled. - Type React/Vue props with
VariantProps<typeof recipe>. Make variants required withOmit/Requiredwhen defaults are wrong. - Do not use removed
responsiveVariants. Put responsive prefixes (md:,lg:) in the class strings themselves. - Prefer
cxover deprecatedcnBase. Prefercnfor merged joins; usecnMergeonly for per-call merge config.
Verification
Prefer the repo's existing checks. For meaningful Tailwind Variants changes, include the relevant subset:
- Typecheck for
VariantProps, slot return shapes, andextendmerges. - Unit assertions on recipe output strings for critical variant/compound combinations (especially with merge on/off).
- Visual/browser smoke for overridden slots and composed components.
- Bundle check when switching default ↔
/liteor adding heavytwMergeConfig. - IntelliSense/
tailwindFunctions: ['tv']sanity if editors stop completing classes insidetv.
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
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.

