migrate-radix-to-base
하는 일
이 스킬은 React 프로젝트를 Radix UI에서 Base UI로 마이그레이션하는 방법을 에이전트에게 가르칩니다. shadcn 스타일의 래퍼 컴포넌트와 그 사용처를 한 번에 하나씩 업데이트하고, 진행하면서 빌드를 확인합니다.
사용하는 경우
- ✓React 프로젝트가 Radix UI에서 Base UI로 바꾸려고 할 때.
- ✓아코디언 같은 단일 shadcn 컴포넌트를 Base UI로 옮겨야 하는 경우.
- ✓팀이 무엇이 바뀌었고 무엇을 매핑하지 못했는지 마이그레이션 보고서를 원할 때.
스킬 링크
https://github.com/yournextstore/yournextstore/blob/main/.agents/skills/migrate-radix-to-base/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 shadcn 프로젝트의 아코디언 컴포넌트를 Radix에서 Base UI로 옮기고, 빌드가 계속 통과하도록 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 프로젝트 설정을 확인하고 깨끗한 기준 빌드를 만든 뒤, Radix와 나란히 Base UI를 설치하고 컴포넌트를 하나씩 옮깁니다. 가능하면 shadcn CLI를 쓰고, 매핑이 불분명하면 Base UI 타입 파일을 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Radix UI -> Base UI migration
You migrate shadcn wrappers, hand-rolled radix compositions, and their
consumers to @base-ui/react, keeping the project buildable at every step.
Be precise; never guess a mapping. When a prop or part is not in these
reference files, check node_modules/@base-ui/react/**/*.d.ts before
transforming, and record gaps in the report.
Preflight (always)
npx shadcn@latest info --json(or the project's runner): gives the current base, STYLE (e.g.radix-lyra), tailwind version, aliases, installed components, and package manager. Trust it over inference.- Detect the package manager (packageManager field / lockfile: pnpm-lock.yaml, bun.lock, yarn.lock, package-lock.json) and use IT for every install. Never leave a stale lockfile.
- Require a clean git tree; work on a branch; one commit per component.
- Baseline check BEFORE touching dependencies: run the project's typecheck/build so pre-existing failures are never attributed to you.
- Install
@base-ui/reactalongside radix. Radix packages are removed only after the LAST component is migrated (both coexist fine).
Strategy: golden pair first, transformation engine second
- Golden pair via the CLI (preferred). If the project is shadcn with a
known style (
radix-<style>), the shadcn CLI itself is the golden-pair executor:- Classify each ui wrapper FIRST: diff the user's file against its stock
origin, using the components.json style VERBATIM in the URL
(
https://ui.shadcn.com/r/styles/<style>/<component>.json, files[0].content). This works for prefixed styles (radix-nova) AND legacy unprefixed ones (new-york, new-york-v4, default), which are all still served. - WHOLE-PROJECT mode: flip
components.jsonstyleradix-<style>->base-<style>now. PROGRESSIVE mode: do NOT flip yet (the project is still mostly radix; the flip happens once, after the last component); fetch base variants directly by URL instead (https://ui.shadcn.com/r/styles/base-<style>/<component>.json). - PRISTINE wrappers, whole-project mode:
shadcn add <component> --overwritedelivers the base variant with the project's exact icon/font/preset resolution. Never bulk--all --overwrite; go component by component, or you drown in unrelated registry version drift. PROGRESSIVE mode: never use--overwrite(it destroys the original that consumers still import); write the fetched base variant content to<component>-base.tsxinstead. - CUSTOMIZED wrappers: fetch the base variant and replay the user's diff
onto it (their customizations must SURVIVE;
--overwritewould destroy them). Mechanical implementation that works at scale:git merge-file user.tsx radix-golden.tsx base-golden.tsx(three-way merge, radix golden as ancestor) auto-resolves most files; hand-resolve conflicts with the reference tables. - MANDATORY leftover sweep on EVERY golden-pair file, including ones that
merged "clean":
grep -n "radix-ui\|@radix-ui\|IconPlaceholder"per file. The registry sometimes reorders functions between variants, which makes three-way merges report zero conflicts while leaving stale radix hunks in place. A clean merge is NOT proof of a clean file. This is more reliable than reconstructing transforms; use it whenever the pair exists. Consumer/app code has no CLI mechanism: always hand-migrate it againstconsumer-props.md.
- Classify each ui wrapper FIRST: diff the user's file against its stock
origin, using the components.json style VERBATIM in the URL
(
- Legacy styles (new-york, new-york-v4, default): classification only, no
replay. These have no base counterpart (there is no base-new-york), and
retargeting onto a base-<style> variant would restyle the user's app. Use
the radix golden ONLY to detect customizations, then run the transformation
engine on the user's OWN file: rewire primitives, keep their exact classes,
apply class-mapping renames. Their look stays theirs. At the end of a
legacy whole-project migration, FLAG (do not fix): the style name still
reads as radix to the CLI, so future
shadcn addwill deliver radix variants; the user decides whether to switch style or add manually. - Transformation engine (fallback). Hand-rolled radix code, non-shadcn
projects, unknown styles: transform using
universal-patterns.md(imports in BOTH forms:radix-uiand@radix-ui/react-*; asChild->render with the worked example; Portal>Positioner>Popup; the positioner FORWARD rule; part renames)
자주 묻는 질문
Radix를 바로 제거하나요?
아닙니다. 스킬은 마지막 컴포넌트를 옮긴 후에야 Radix 패키지를 제거한다고 설명합니다.
매핑되지 않는 속성이 있으면 어떻게 하나요?
스킬은 Base UI 타입 파일을 확인하고, 그 공백을 보고서에 기록하라고 설명합니다.
어떤 패키지 관리자를 감지하나요?
스킬은 잠금 파일에서 감지한 프로젝트 자체의 패키지 관리자를 쓰라고 설명합니다.
상세 정보
작성자의 원본 설명
Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
인기도
- GitHub 스타
- 5.5k
- 순위
- #14802
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
audit
5.5k에이전트가 웹 인터페이스의 접근성, 성능, 테마, 반응형 디자인을 감사하고, 코드를 바꾸지 않은 채 우선순위가 정해진 보고서를 작성하도록 돕습니다.
clone-website
5.5k에이전트가 웹사이트의 레이아웃, 스타일, 콘텐츠를 새 프로젝트로 다시 만들도록 돕습니다. 섹션별로 작업하고 각 부분의 사양을 저장합니다.
critique
5.5k에이전트가 인터페이스에 대해 디자인 디렉터 수준의 비평을 하도록 돕습니다. 시각적 위계, 정보 흐름, 디자인이 일반적이거나 AI가 만든 느낌인지 확인합니다.
prettify
5.5k에이전트가 기존 페이지나 화면을 작고 집중된 디자인 변경으로 더 세련되고 풍부해 보이도록 돕습니다. 전면 재디자인은 하지 않습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.