Skill library

Agent skill Frontend

Heroui Migration

Build or refine reusable components for a web interface.

  • UI components

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/heroui-inc/heroui/tree/v3/skills/heroui-migration --skill heroui-migration --agent claude-code --yes

Check this file in your project.claude/skills/heroui-migration/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/heroui-inc/heroui/tree/v3/skills/heroui-migration --skill heroui-migration

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring a HeroUI v2 project and a chosen coexistence strategy. The fixture used the official migration docs helper and verified the v3 button in @heroui/react and @heroui/styles 3.2.8.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
heroui-migration
Scenario
Migrate one v2 button using the official incremental guide
Deliverable
An approved one-button migration with a mapped variant, press and disabled behavior.
Skill name
heroui-migration

Define a component task with an observable result

A request with an unclear outcome

Change every HeroUI import and remove the old Provider now.

Untouched v2 components can still rely on their original dependency and Provider during coexistence.

A workflow with observable results

  1. Get the workflow and component migration docs
  2. Change one button to the v3 role
  3. Compare keyboard and disabled behavior

HeroUI Migration operation manual

Read the production migration advice first, then verify an isolated v3 button before widening scope.

Replace the bracketed details with your own project and target.

  1. Get the workflow and component migration docs

    Use the shipped scripts and the production documentation base.

    Prompt · Step 1
    Use heroui-migration to inspect [v2 route and Button]. From the project root locate the installed skill scripts and use `HEROUI_MIGRATION_DOCS_BASE=https://heroui.com/docs/react/migration` when running `get_migration_guide.mjs incremental` and `get_component_migration_guides.mjs button` with Node. Confirm the docs returned the right component. Read dependency, Provider and style boundaries before choosing the first call site.
  2. Change one button to the v3 role

    Follow the existing coexistence path and preserve callback behavior.

    Prompt · Step 2
    Use heroui-migration to migrate [approved Button] through [confirmed v2/v3 strategy]. Replace the old `color` and `variant` pair with the documented v3 semantic `variant`, use `onPress`, and preserve the control's disabled behavior. Confirm the v3 stylesheet path and keep the existing v2 Provider available to any v2 routes. Report dependency and source changes for this narrow slice.
  3. Compare keyboard and disabled behavior

    Use a disposable action and distinguish v3 checks from coexistence checks.

    • The selected v3 button uses a verified semantic variant.
    • The migration report states which v2 and v3 paths were actually tested.
    Prompt · Step 3
    Use heroui-migration to build [local migrated route]. Verify the compiled theme style, use keys and pointer input on the v3 button with a disposable action, and confirm the disabled version cannot fire. Where coexistence is installed, repeat the existing v2 path and report that evidence separately. Keep broader migration pending until the scoped behavior passes.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

The bundled script points at a preview hostReference
Command or reference
SKILL.md · Preview Mode
Examples
Use the documented production base override and confirm the returned URL.
Old color and variant values don't work togetherReference
Command or reference
Official Button migration
Examples
Map the old combination to one v3 semantic variant.

HeroUI Migration troubleshooting

Can I remove the v2 Provider after one change?

Review the official incremental workflow and remaining v2 consumers. The fixture verified the isolated v3 route; confirmed coexistence needs a separate project check.