---
title: "Skills"
description: "Use Agent Skills to build cva components and migrate between cva versions."
url: "https://cva.style/beta/getting-started/skills/"
---

Agent Skills give your coding agent guidance for component work and version upgrades.

## `cva-best-practices`

[`cva-best-practices`](https://github.com/joe-bell/cva/tree/main/skills/cva-best-practices) condenses these docs into guidance for typed variants, defaults, composition, class conflicts, and schema-driven galleries. It checks the installed package before applying beta APIs.

Install it for component work:

```sh
npx skills add https://github.com/joe-bell/cva --skill cva-best-practices
```

Then give your agent a component task:

> Use cva-best-practices to add size and intent variants to this button, keeping its native HTML props.

The relevant guides remain the source of truth for each recommendation. Use the migration skill below when changing versions.

## `cva-migrate`

[`cva-migrate`](https://github.com/joe-bell/cva/tree/main/skills/cva-migrate) upgrades a project between `cva` versions. Install it for repeated use, or paste the prompt into your agent to run it once:

* Command

  ```sh
  npx skills add https://github.com/joe-bell/cva --skill cva-migrate
  ```

* Prompt

  ```text
  Run `npx skills use "https://github.com/joe-bell/cva" --skill "cva-migrate"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
  ```

Then tell the agent which version to install:

> Migrate this project to `cva@1.0.0-beta.12`.

The three curated routes upgrade `class-variance-authority@0.6.0` through `0.7.1` to `cva@1.0.0-beta.12`, `cva@1.0.0-beta.0` through `beta.10` to `beta.11`, and `beta.0` through `beta.11` to `beta.12`. For other routes, the skill checks every relevant [GitHub release](https://github.com/joe-bell/cva/releases), the tagged package metadata, and the published npm artifacts. It stops if those sources do not support a migration step.
