Class Variance Authority
Class Variance Authority (CVA) is a small TypeScript library that turns a base class string plus named variants into a typed function returning class names. Use when building Tailwind components with variants such as size, intent or state, writing a shadcn/ui-style Button or Badge, replacing conditional className ternaries, or typing component props with VariantProps.
Install
npx skills add TerminalSkills/skills --skill class-variance-authoritygit clone --depth 1 https://github.com/TerminalSkills/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/class-variance-authority ~/.claude/skills/class-variance-authorityPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Class Variance Authority (CVA)
## Overview
`class-variance-authority` (0.7.1, the current stable release) exports `cva`, `cx` and the `VariantProps` type. You describe a base string, a set of variants, optional `compoundVariants` and `defaultVariants`; calling the result with props returns one class string. It does no CSS conflict resolution, so it is usually paired with `clsx` and `tailwind-merge` in a `cn()` helper. shadcn/ui builds its components this way. A newer rewrite is published as `cva` (still in beta, `1.0.0-beta.x`); this skill covers `class-variance-authority`.
## Instructions
### Step 1: Install and add the `cn` helper
```bash
npm install class-variance-authority clsx tailwind-merge
```
```typescript
// lib/utils.ts
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
```
### Step 2: Define variantsDetails
- Skill name
class-variance-authority- Repository
- TerminalSkills/skills
- Path
skills/class-variance-authority/SKILL.md- License
- Apache-2.0
- Repo updated
- 8 November 2026
FAQ
What does the Class Variance Authority skill do?
Class Variance Authority (CVA) is a small TypeScript library that turns a base class string plus named variants into a typed function returning class names. Use when building Tailwind components with variants such as size, intent or state, writing a shadcn/ui-style Button or Badge, replacing conditional className ternaries, or typing component props with VariantProps.
How do I install the Class Variance Authority skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add TerminalSkills/skills --skill class-variance-authority. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Class Variance Authority popular?
It lives in TerminalSkills/skills, which has 213 GitHub stars and 34 forks.
Related skills
3dsmax Rendering
213TerminalSkills/skills
Scripts and configures production rendering in Autodesk 3ds Max with the V-Ray and Corona renderers: output size and files, render elements, denoising, light mix, batch and command-line rendering, and network rendering. Use when a user asks to set up a production render, render several cameras in one batch, render from the command line or on a render farm, add render passes for compositing, or cut render time for archviz and product shots.
3dsmax Scripting
213TerminalSkills/skills
Covers scripting Autodesk 3ds Max, the 3D modeling and rendering application, with MAXScript and Python (pymxs): scene manipulation, object creation, material assignment, camera and light setup, batch operations, and file I/O. Use when tasks involve automating repetitive 3ds Max workflows, batch processing scenes, running scripts headless with 3dsmaxbatch, creating custom tools, or scripting scene setup for archviz, product visualization, or VFX.
3proxy
213TerminalSkills/skills
3proxy is a small open-source proxy server that runs HTTP/HTTPS, SOCKS4/5, SNI and TCP/UDP port-mapping proxies from one config file. Use when a user asks to set up an HTTP or SOCKS5 proxy, add proxy users and passwords, write 3proxy access rules, chain or rotate upstream (parent) proxies, limit bandwidth, connections or monthly traffic per user, run 3proxy in Docker, or fix a 3proxy.cfg that will not start.
Clerk Auth
213TerminalSkills/skills
Clerk is a hosted authentication and user-management service with drop-in UI components, social login, email/password, organizations, RBAC and webhooks. Use when adding sign-in to Next.js, React, or Express apps, protecting routes with clerkMiddleware, setting up multi-tenant organizations and roles, or syncing Clerk users to your own database.
Chromajs
213TerminalSkills/skills
Manipulate colors with chroma.js — convert between color spaces (RGB, HSL, LAB, LCH), generate palettes and scales, mix and blend colors, check contrast ratios, and build accessible color systems. Use when tasks involve creating color palettes, theming, accessibility checks, or data visualization color scales.
Cluster Corpus By Theme
200lyndonkl/claude
Performs axial-coding-style thematic clustering over the substacker corpus of published posts to surface candidate sections. Uses Braun & Clarke's six-phase thematic analysis — familiarization, initial coding, searching for themes, reviewing themes, defining themes, naming. Reads full bodies, not titles. Use when re-opening the section question. Trigger keywords — cluster, theme, axial coding, thematic analysis, candidate sections.
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.