heroui-migration by heroui-inc/heroui
npx skills add https://github.com/heroui-inc/heroui --skill heroui-migration此技能帮助智能体将 HeroUI v2 应用程序迁移到 v3。HeroUI v3 引入了破坏性变更:复合组件、无需 Provider、Tailwind v4 以及移除了部分钩子。
curl -fsSL https://heroui.com/install | bash -s heroui-migration
请勿假设 v2 的模式在 v3 中仍然适用。 在实施更改之前,务必获取迁移指南。
| 功能 | v2 (迁移自) | v3 (迁移至) |
|---|---|---|
| Provider | 需要 <HeroUIProvider> | 无需 Provider |
| 组件 API | 扁平属性:<Card title="x"> | 复合结构:<Card><Card.Header> |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 事件处理器 | onClick | onPress |
| 样式 | classNames 属性 | className 属性 |
| 钩子 | useSwitch, useDisclosure 等 | 复合组件, useOverlayState |
| 包 | @heroui/system, @heroui/theme | @heroui/react, @heroui/styles |
关于迁移细节、示例和分步指南,请务必获取文档:
# 列出所有可用的组件迁移指南
node scripts/list_migration_guides.mjs
# 获取主要迁移工作流(完整或增量)
node scripts/get_migration_guide.mjs full
node scripts/get_migration_guide.mjs incremental
# 获取特定组件的迁移指南
node scripts/get_component_migration_guides.mjs button
node scripts/get_component_migration_guides.mjs button card modal
# 获取样式迁移指南
node scripts/get_styling_migration_guide.mjs
# 获取钩子迁移指南
node scripts/get_hooks_migration_guide.mjs
迁移文档(预览版):https://heroui-git-docs-migration-heroui.vercel.app/docs/react/migration/{filename}
示例:
.../agent-guide-full.mdx.../agent-guide-incremental.mdx.../button.mdx.../styling.mdx.../hooks.mdx当文档合并到生产环境后,可使用 HEROUI_MIGRATION_DOCS_BASE 环境变量覆盖基础 URL。
在使用 Cursor 或其他 MCP 客户端时,配置 Migration MCP 服务器以通过工具访问:
{
"mcpServers": {
"heroui-migration": {
"url": "https://migration-mcp.heroui.com"
}
}
}
开始前务必获取智能体指南: node scripts/get_migration_guide.mjs full 或 incremental
Card.Header、Card.Title、带有子元素的 Button——而非扁平属性HeroUIProvideronPressnode scripts/get_migration_guide.mjs fullnode scripts/get_styling_migration_guide.mjs此技能针对 docs/migration 分支的暂存部署。一旦文档合并到主分支并上线 heroui.com,请设置 HEROUI_MIGRATION_DOCS_BASE=https://heroui.com/docs/react/migration 或在脚本中更新默认值。
每周安装数
173
仓库
GitHub 星标
28.6K
首次出现
7 天前
安全审计
安装于
cursor171
codex171
gemini-cli170
amp170
cline170
kimi-cli170
This skill helps agents migrate HeroUI v2 applications to v3. HeroUI v3 introduces breaking changes: compound components, no Provider, Tailwind v4, and removed hooks.
curl -fsSL https://heroui.com/install | bash -s heroui-migration
Do NOT assume v2 patterns work in v3. Always fetch migration guides before implementing 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 |
For migration details, examples, and step-by-step guides, always fetch documentation:
# 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
Migration docs (preview): https://heroui-git-docs-migration-heroui.vercel.app/docs/react/migration/{filename}
Examples:
.../agent-guide-full.mdx.../agent-guide-incremental.mdx.../button.mdx.../styling.mdx.../hooks.mdxOverride base URL with HEROUI_MIGRATION_DOCS_BASE when docs are merged to production.
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"
}
}
}
Always fetch the agent guide before starting: node scripts/get_migration_guide.mjs full or incremental
Card.Header, Card.Title, Button with children—not flat propsHeroUIProvider when migratingonPressnode scripts/get_migration_guide.mjs fullnode scripts/get_styling_migration_guide.mjsThis 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.
Weekly Installs
173
Repository
GitHub Stars
28.6K
First Seen
7 days ago
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
cursor171
codex171
gemini-cli170
amp170
cline170
kimi-cli170
json-render生成式UI框架:AI驱动、多平台JSON渲染,安全构建动态界面
511 周安装