Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

ant-to-shadcn-migrationANT TO shadcn/ui 迁移

Agent Skill

ant-to-shadcn-migration 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

220

周安装

9

GitHub Stars

1

下载量

71
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ant-to-shadcn-migration(ANT TO shadcn/ui 迁移)
来源仓库:https://github.com/uzhussain/ant-to-shadcn
仓库路径:skills/ant-to-shadcn-migration
安装命令:
npx skills add https://github.com/uzhussain/ant-to-shadcn --skill ant-to-shadcn-migration
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/uzhussain/ant-to-shadcn --skill ant-to-shadcn-migration

简介

用于将遗留 Ant Design 前端迁移至 shadcn/ui + Tailwind 架构,支持组件等价转换。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要重构 CRA/Vite 项目至 Next.js 时使用。
  • 使用时需遵循迁移指南,处理主题、布局、表单和无障碍适配,支持双框架并行过渡。
  • 安装前建议确认权限范围和维护状态,以及是否会触发联网、命令执行或文件读写。
  • 可通过 GitHub 仓库获取具体用法,建议结合原始 README 和示例脚本进一步验证功能。

SKILL.md

Ant Design to shadcn/ui Migration Guide

Comprehensive guide for migrating legacy Ant Design frontends to shadcn/ui + Tailwind (Radix under the hood), covering component equivalence, theming/tokens, layout/navigation, forms/tables, overlays/alerts, accessibility, and bundle-size cleanup. Targets React (CRA/Vite) apps moving to Next.js App Router, with patterns for running Ant and shadcn side-by-side during transition. Includes automated skeleton generation guidance for fresh layouts/pages with role-aware routing.

When to Apply

  • Migrating a CRA/Vite React app that uses Ant Design to Next.js App Router with shadcn/ui.
  • Replacing Ant Design components with shadcn/ui (and Radix) while moving styling to Tailwind and design tokens.
  • Cleaning up legacy global CSS/LESS, z-index stacks, and inline styles that conflict with Tailwind/shadcn.
  • Generating fresh layout/page skeletons per route (optionally role-aware) to reduce legacy cruft.

Version Policy

Use the latest stable versions of:

  • next ≥ 16.x (App Router)
  • react ≥ 19.x
  • tailwindcss ≥ 3.4.x
  • shadcn/ui latest
  • @radix-ui packages as pulled by shadcn/ui
  • class-variance-authority, tailwind-merge, lucide-react, sonner
  • react-hook-form ≥ 7.x and zod ≥ 3.x for forms (recommended)

Rule Categories by Priority

PriorityCategoryImpactPrefixRules
1Setup & DependenciesCRITICALsetup-5
2Design Tokens & ThemingCRITICALtheme-2
3Layout & Navigation (Responsive)HIGHlayout-3
4Forms & ValidationHIGHforms-3
5Data Display (Tables/Lists)HIGHdata-2
6Feedback & OverlaysHIGHoverlay-2
7Content, Icons, TypographyMEDIUMcontent-1
8Styling & CSS CleanupMEDIUMcss-2
9Accessibility, Responsiveness & InteropMEDIUMa11y-4
10Testing & VerificationLOWtest-2
11Common GotchasHIGHgotchas-4

Component Equivalence (Matrix)

Ant Design 6.xshadcn/ui + Tailwind (or pattern)Notes
ButtonButton, ButtonGroup
FloatButtonButton with fixed/absolute + shadow
Iconlucide-reactDrop Ant icons
TypographyTailwind text utilities; Typography classes
DividerSeparator
Flex/Grid/MasonryTailwind flex/grid; CSS masonry if needed
Layout, Space, SplitterTailwind stack/gap; custom splitter with Resizable
AnchorNavigationMenu/ScrollArea or manual anchor links
BreadcrumbBreadcrumb
DropdownDropdownMenu
MenuNavigationMenu or Sheet nav
PaginationPagination
StepsCustom flex steps
TabsTabs
AutoComplete/MentionsCombobox/Command
Cascader/TreeSelectCombobox with grouped/indented options
Checkbox/RadioCheckbox, RadioGroup
ColorPickerCustom popover + color input
DatePicker/TimePickerCalendar + Popover, time input
Form/Form.ItemForm (RHF) + shadcn fields
Input/InputNumberInput (number type), InputGroup
RateCustom star row using Button/Toggle
SelectSelect or Combobox
Slider/SwitchSlider, Switch
TransferDual list with checkboxes and buttons
UploadFile input + dropzone + progress
AvatarAvatar
Badge/TagBadge
CalendarCalendar
CardCard
CarouselCarousel
CollapseAccordion
DescriptionsDefinition list with grid/flex
EmptyEmpty or custom empty block
Imageimg with Tailwind classes
ListCards/grid/flex list
Popover/TooltipPopover, Tooltip
QRCodeUse QR library + Card
SegmentedToggleGroup
StatisticCard + text/metric styling
Tabletanstack + Table
TimelineCustom vertical list with bullets
TourCustom popover walkthrough (command + popover)
TreeIndented list + checkboxes; virtualize if large
AlertAlert
DrawerSheet
Message/Notificationtoast/sonner
Modal/PopconfirmDialog / AlertDialog
ProgressProgress
ResultAlert success/error block
Skeleton/SpinSkeleton or spinner utility
WatermarkCSS background or canvas overlay
Affixsticky positioning
App/ConfigProvider/UtilNot needed; use shadcn/Tailwind tokens and providers
Pro* (ProTable, etc.)Compose with tanstack table + filters/forms + cards

Notes on gaps

  • Rate: star toggles via Button/Toggle.
  • Transfer: dual list with checkboxes and CTA buttons.
  • QRCode: use a QR library; render inside Card.
  • Tour: custom step popovers anchored to elements.
  • Watermark: CSS background-image or canvas; keep scoped.
  • Affix: position: sticky on containers.
  • Tree: indented list; add virtualization for large sets.
  • Pro* suites: rebuild via tanstack table + forms + cards; no direct shadcn equivalent.
  • ConfigProvider/App/Util: not needed; use Tailwind/shadcn tokens and providers already configured.
  • Masonry: CSS columns or grid with grid-auto-rows + spans.
  • Statistic: simple text/number in Card with muted labels.
  • Shadcn-only (helpful replacements): Command/Combobox for search/select; Sonner for toasts; Menubar/Sidebar for complex nav; Spinner for lightweight loading; Chart (community/blocks) where Ant charts were used; Input OTP for code entry; Field/Textarea for richer forms.

Migration Order

  1. Verify/upgrade Ant to latest 6.x before mapping (align with Ant components).
  2. Setup: Tailwind/shadcn install, deps, project structure, shadcn MCP server ready.
  3. CSS Cleanup: Identify global/LESS/inlined styles; decide what to keep; add base resets and z-index tokens.
  4. Theming: Map Ant tokens → CSS vars/Tailwind theme; dark mode guardrails; spacing/radius/typography scales.
  5. Layout/Nav (Responsive): Rebuild layouts/nav/breadcrumbs with desktop/tablet/mobile variants; role-aware scaffolding; drawer-on-mobile.
  6. Forms: Convert Form.Item patterns to shadcn + react-hook-form + zod; validation and submission states; success/failure/inline errors.
  7. Data Display: Tables/lists/empty states; pagination/sorting/filtering patterns; loading/skeleton/error states.
  8. Overlays/Feedback: Dialogs/sheets/popovers/tooltips/toasts/alerts/spinners with z-index scale.
  9. Content/Icons: Replace Ant icons/typography with lucide and Tailwind text styles; see content-icons-typography.
  10. Accessibility/Interop: Focus traps, keyboard nav, ARIA, responsive checks; safe coexistence during phased rollout; see a11y-responsive-checks, a11y-motion-contrast, responsive-touch, rtl-l10n.
  11. Testing/Verification: Visual checks, a11y scans, bundle/size linting, API/error-path checks; prefer modern UX fallbacks over 1:1 Ant copies when overlays/patterns conflict (gotchas-ux-fallbacks).
  12. Performance/Bundle: verify Ant CSS/icons absent; use lucide; virtualize large tables/lists to avoid jank (perf-bundle-guard).
  13. Observability: keep analytics/error logging when refactoring flows; don’t drop events when swapping notifications with toasts (analytics-observability).
  14. Scroll/State: guard useEffect/init to avoid state resets; use stable handlers and shadcn ScrollArea for section navigation (gotchas-scroll-state).

Scans and Mapping

Run scans to route findings to rules:

  • antd imports and package version → setup-antd-upgrade, setup-, css-legacy, theme-bridge, component mappings.
  • ConfigProvider, theme.useTokentheme-bridge, theme-dark-mode, css-layering.
  • Global CSS/LESS (*.less, global.css, index.css) → css-legacy-inventory, css-layering, css-asset-hygiene.
  • Inline style= with Ant tokens → theme-bridge, css-inline-cleanup.
  • Duplicate/placeholder components/pages (NewButton, NewPage, *V2) → gotchas-component-sprawl.
  • Layout.Sider, Menu, Breadcrumblayout-shell, layout-nav.
  • Form, Form.Item, message, notification, Modal.confirmforms-*, overlay-*, gotchas-ux-fallbacks.
  • Table, List, Descriptions, Tag, Badge, Emptydata-*, components-* (pagination/result/empty), data-table-tanstack.
  • Route configs/menus/guards → layout-route-scaffold, layout-auth-discovery, gotchas-coexistence.
  • Auth/roles (Clerk/Supabase/cookies/hooks), router guards, landing vs app shell → layout-auth-discovery.
  • @ant-design/icons, global Ant CSS, LESS files → content-icons-typography, css-legacy-inventory, perf-bundle-guard.
  • Dark-mode selectors or toggles → theme-dark-mode-guardrails.
  • Public assets references → css-asset-hygiene, assets-images.
  • Fonts → fonts-setup.
  • Scroll/section nav code → gotchas-scroll-state.
  • Reduced motion/contrast/focus → a11y-motion-contrast, a11y-responsive-checks, responsive-touch.
  • RTL/l10n → rtl-l10n.
  • Analytics/logging → analytics-observability.

Quick scan commands (adjust paths as needed)

# Ant version
npm ls antd

# Ant imports and icons
rg \"antd\" src app
rg \"@ant-design/icons\" src app

# ConfigProvider and tokens
rg \"ConfigProvider\" src app
rg \"theme\\.useToken\" src app

# Ant imperative APIs
rg \"Modal\\.confirm\" src app
rg \"notification\\.\" src app
rg \"message\\.\" src app

# Table/columns
rg \"columns\\s*=\\s*\\[\" src app

# LESS and global CSS
rg --files -g\"*.less\" src app
rg \"global\\.css\" src app

# Dark mode selectors
rg \"\\.dark\" src app

# Assets and fonts
rg --files -g\"*.{png,jpg,jpeg,svg}\" public/ src app
rg \"font-family\" src app

# Responsive/touch/scroll
rg \"overflow\" src app
rg \"scrollIntoView\" src app

# Routes/guards/menus
rg \"<Router\" -g\"*.tsx\" src app
rg \"RequireAuth|useAuth|Clerk|Supabase\" src app
rg \"menu\" src app/components

# Analytics/logging
rg \"track|analytics|logEvent\" src app

Post-Migration Verification (UI-first)

  • Shell/nav: responsive desktop/tablet/mobile; active states; breadcrumbs; role-guarded routes.
  • Forms: validation + error/success toasts; disabled states; loading indicators; keyboard focus order; screen reader labels.
  • Tables/lists: empty/loading/error/skeleton states; pagination/sort/filter; row focus/hover.
  • Overlays/toasts: focus trap, ESC/close, return focus; z-index layering; no console errors on open/close.
  • Theming: light/dark parity; token application (colors/spacing/radius); contrast and focus outlines.
  • CSS sanity: no leaking global styles; no unexpected z-index overlaps; Ant CSS isolated or removed; legacy UI parked separately.
  • Performance: bundle size reduced (no Ant CSS), tree-shaking verified.

Rule Index (by prefix)

  • Setup: setup-antd-upgrade, setup-shadcn-install, setup-shadcn-mcp, setup-legacy-parking, build-env
  • Theme: theme-bridge-tokens, theme-dark-mode-guardrails
  • Layout: layout-route-scaffold, layout-responsive-shell, layout-auth-discovery
  • Forms: forms-rhf-shadcn, forms-api-states, forms-select-date-upload
  • Data: data-tables-state, data-table-tanstack, components-pagination, components-result-empty
  • Overlays: overlay-alerts-toasts, overlay-toast-console
  • Components (augment data/overlay): components-tabs-steps, components-tree-cascader, components-upload, components-pagination, components-result-empty
  • Content: content-icons-typography
  • Styling: css-legacy-inventory, css-asset-hygiene, assets-images, fonts-setup
  • Accessibility/Responsive: a11y-responsive-checks, a11y-motion-contrast, responsive-touch, rtl-l10n
  • Performance: perf-bundle-guard
  • Testing: test-visual-a11y, test-e2e-visual
  • Gotchas: gotchas-coexistence, gotchas-ux-fallbacks, gotchas-scroll-state, gotchas-component-sprawl
  • Other: analytics-observability

How to Use

  1. Run scans to inventory Ant usage, CSS/LESS, routes/roles, and inline styles.
  2. Apply rules by category (see rules/), starting with setup, CSS cleanup, theming, then layout/forms/data/overlays.
  3. Enforce component singularity: replace Ant components (no wrappers), squash custom duplicates into canonical shadcn components, and keep styling via variants/classes.
  4. Generate new App Router layouts/pages per route with shadcn skeletons; use clean naming, wire routes to nav/tests, and keep Ant only where not yet migrated (side-by-side strategy).
  5. Verify with the post-migration checklist; add visual/a11y snapshots where possible.

Structure readiness check (reuse vs fresh scaffold)

  • Reuse existing structure if: routes/nav/breadcrumb data are centralized; CSS/LESS is scoped/minimal; assets/fonts are organized; guards/roles are discoverable and centralized.
  • Fresh scaffold if: routing/layouts are unclear, Ant CSS bleeds globally, assets/styles are scattered, or guards/roles are ad-hoc.
  • Always run scans first (antd imports, ConfigProvider, LESS, icons, overflow/scroll, assets/fonts, routes/guards, analytics) to inform the choice.

Component sourcing (shadcn-first)

  • Install components via shadcn CLI/MCP (registry) only; do not hand-roll replacements if a shadcn component/block exists.
  • Prefer shadcn MCP for updated patterns/blocks; avoid custom ad-hoc builds unless the component does not exist in the registry.
  • Keep installs tracked in components.json and use npx shadcn@latest for additions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.53%
按下载量换算25

Claude

30.08%
按下载量换算21

Cursor

18.08%
按下载量换算13

Gemini CLI

10.42%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/uzhussain/ant-to-shadcn --skill ant-to-shadcn-migration 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills