heroui-migration
できること
このスキルは、HeroUIのバージョン2から3へのWebアプリの移行を手引きします。削除されたプロバイダーや、新しいコンポーネント構造などの主な変更点を説明します。
使う場面
- ✓HeroUI v2を使っているアプリを、v3に上げたいとき。
- ✓バージョン3で構造が変わったコンポーネントを更新する必要があるとき。
- ✓HeroUIの公式の移行ガイドを探したいとき。
スキルのリンク
https://github.com/heroui-inc/heroui/blob/v3/skills/heroui-migration/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“アプリをHeroUI v2からv3に上げる手伝いをしてください。最も変わったコンポーネントから始めてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、多くのv2のパターンがもう動かないため、何かを変える前に公式の移行ドキュメントを読みます。その後、コンポーネントごとに更新を適用します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
HeroUI v2 to v3 Migration Guide
This skill helps agents migrate HeroUI v2 applications to v3. HeroUI v3 introduces breaking changes: compound components, no Provider, Tailwind v4, and removed hooks.
Installation
curl -fsSL https://heroui.com/install | bash -s heroui-migration
CRITICAL: Always Fetch Migration Docs Before Applying
Do NOT assume v2 patterns work in v3. Always fetch migration guides before implementing changes.
Key v2 → v3 Changes
| Feature | v2 (Migrate From) | v3 (Migrate To) |
|---|---|---|
| Provider | <HeroUIProvider> required |
No Provider needed |
| Component API | Flat props: <Card title="x"> |
Compound: <Card><Card.Header> |
| Event handlers | onClick |
onPress |
| Styling | classNames prop |
className prop |
| Hooks | useSwitch, useDisclosure, etc. |
Compound components, useOverlayState |
| Packages | @heroui/system, @heroui/theme |
@heroui/react, @heroui/styles |
Accessing Migration Documentation
For migration details, examples, and step-by-step guides, always fetch documentation:
Using Scripts
# List all available component migration guides
node scripts/list_migration_guides.mjs
# Get main migration workflow (full or incremental)
node scripts/get_migration_guide.mjs full
node scripts/get_migration_guide.mjs incremental
# Get component-specific migration guides
node scripts/get_component_migration_guides.mjs button
node scripts/get_component_migration_guides.mjs button card modal
# Get styling migration guide
node scripts/get_styling_migration_guide.mjs
# Get hooks migration guide
node scripts/get_hooks_migration_guide.mjs
Direct URLs
Migration docs (preview): use a concrete guide URL from the examples below, and never fetch a URL that still contains a placeholder.
Examples:
- Full migration:
.../agent-guide-full.mdx - Incremental:
.../agent-guide-incremental.mdx - Button:
.../button.mdx - Styling:
.../styling.mdx - Hooks:
.../hooks.mdx
Override base URL with HEROUI_MIGRATION_DOCS_BASE when docs are merged to production.
MCP Alternative
When using Cursor or other MCP clients, configure the Migration MCP server for tool-based access:
{
"mcpServers": {
"heroui-migration": {
"url": "https://migration-mcp.heroui.com"
}
}
}
Migration Strategies
Full Migration
- Best for: Projects that can dedicate focused time; teams comfortable with temporarily broken code
- Migrate all component code first (project broken during migration)
- Switch dependencies to v3
- Complete styling migration
Incremental Migration
- Best for: Projects that must stay functional; large codebases migrating gradually
- Set up coexistence (pnpm aliases or component packages)
- Migrate components one-by-one
- Both v2 and v3 coexist during migration
Always fetch the agent guide before starting: node scripts/get_migration_guide.mjs full or incremental
Core Principles
- Fetch first: Use scripts to get migration guides before applying changes
- Compound components: v3 uses
Card.Header,Card.Title,Buttonwith children—not flat props - No Provider: Remove
HeroUIProviderwhen migrating - onPress not onClick: All interactive components use
onPress - Workflow: Analyze → Migrate components → Switch deps → Styling migration
Migration Workflow Summary
- Create migration branch
- Analyze project (HeroUI imports, component usage)
- Fetch main guide:
node scripts/get_migration_guide.mjs full - Migrate components in batches (fetch component guides per batch)
- Switch dependencies to v3
- Fetch styling guide:
node scripts/get_styling_migration_guide.mjs - Apply styling updates
Preview Mode
This skill targets the staging deployment of the docs/migration branch. Once docs are merged to main and live on heroui.com, set HEROUI_MIGRATION_DOCS_BASE=https://heroui.com/docs/react/migration or update the default in scripts.
よくある質問
HeroUIのプロバイダーはまだ必要ですか?
いいえ。バージョン3ではプロバイダーのコンポーネントは不要です。
コンポーネントの構造はどう変わりましたか?
コンポーネントは複合パーツで構成されるようになりました。たとえばCard.Headerのようにヘッダー部分を持つ形で、フラットなタイトルのプロップではありません。
スタイルの変更も扱いますか?
はい。バージョン3はTailwind v4を使い、classNamesの代わりにclassNameプロップを使うことを説明します。
詳細
作者による元の説明
HeroUI v2 to v3 migration guide for agents. Use when migrating HeroUI v2 apps to v3, upgrading components, or accessing migration documentation. Keywords: HeroUI migration, v2 to v3, migration guide, upgrade HeroUI.
repo: heroui-inc/heroui
人気
- GitHubのスター
- 31k
- ランキング
- #9325
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
heroui-native
31kエージェントが、HeroUI Nativeのボタン、カード、ダイアログなどのコンポーネントを使って、モバイルアプリの画面を作れるよう支援します。
heroui-react
31kエージェントが、ボタン、モーダル、フォーム、カードなどのHeroUI v3コンポーネントを使って、Reactのウェブインターフェースを作れるよう支援します。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。