Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

base-ui-migrator

БесплатноБез исполняемых скриптовНе проверен

Migrates React UI code to Base UI (`@base-ui/react`) — replacing bespoke modals, custom dropdowns, raw `<dialog>`/`<select>` elements, ad-hoc…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

Base UI Migrator

Automated workflow that converts bespoke React UI primitives and other component libraries to Base UI (@base-ui/react).

Base UI is the unstyled successor to Radix UI, maintained by the Material UI team and Radix authors. It exposes the same composition model (Root + parts) but with a single canonical API, modern data attributes for state styling, and built-in transitions. This skill knows the full catalog (37 components, snapshotted) and how to map common bespoke patterns to it.

When to Apply

Use this skill when:

  • The user explicitly asks to migrate to Base UI, or to a specific Base UI component.
  • You spot a React file with bespoke overlays — manual modals, dropdown menus built from useState + click-outside hooks, floating UI compositions — that have a Base UI equivalent.
  • The codebase uses Radix UI, Headless UI, Reach UI, or react-aria components — these are 1:1 mappable to Base UI.
  • The user wants to consolidate a fragmented set of UI primitives behind one library.
  • The user wants to scan a directory for migration opportunities.

Do NOT trigger when:

  • The user is starting a fresh project and asks for a UI library recommendation (suggest they install Base UI directly, no migration needed).
  • The user is migrating away from Base UI (out of scope).

Workflow Overview

┌─────────────────────────────────────────────────────────────┐
│ 0. Stale check — is assets/data/llms.txt > 7 days old?      │
│    └─ if yes → scripts/refresh-catalog.sh                   │
├─────────────────────────────────────────────────────────────┤
│ 1. Scan target — scripts/scan-candidates.sh <path>          │
│    Output: JSON {file, line, pattern, suggested_component}  │
├─────────────────────────────────────────────────────────────┤
│ 2. Triage — present candidates to the user, confirm scope   │
│    (write-risk gate: never migrate silently)                │
├─────────────────────────────────────────────────────────────┤
│ 3. Install @base-ui/react if missing                        │
│    └─ Use the project's package manager (autodetected)      │
├─────────────────────────────────────────────────────────────┤
│ 4. Per candidate:                                           │
│    a. Look up references/catalog.md → get component name    │
│    b. Read references/migration-patterns.md (top tier) OR   │
│       fetch-component-doc.sh <component> (cached on disk)   │
│    c. Edit source — replace bespoke with Base UI parts      │
│    d. Preserve existing styling (Tailwind / CSS Modules)    │
├─────────────────────────────────────────────────────────────┤
│ 5. Verify — scripts/verify-migration.sh                     │
│    Runs typecheck + build + flags leftover bespoke patterns │
├─────────────────────────────────────────────────────────────┤
│ 6. Cleanup — uninstall replaced libraries (optional)        │
└─────────────────────────────────────────────────────────────┘

Risk level: Write. The skill edits source files. It never force-pushes, deletes branches, or runs irreversible commands. Always commit (or stash) before starting so git diff shows the migration cleanly.

Tool Requirements

Tool Purpose Install
curl Fetch llms.txt + component docs preinstalled
jq Parse JSON output brew install jq
rg (ripgrep) Fast candidate scanning brew install ripgrep
Node.js + project's typecheck Verification step per project

scripts/scan-candidates.sh falls back to grep if rg is missing, but is much slower.

Quick Reference

Scripts

Script When to run
scripts/refresh-catalog.sh Catalog stale (>7 days) or before a large migration
scripts/scan-candidates.sh <path> Find migration candidates in a file/dir
scripts/fetch-component-doc.sh <name> Cache a single component's doc on demand
scripts/verify-migration.sh After editing — typecheck + build + leftover scan. Pass --skip-build for fast iteration during the migration.

References

File Read when
references/catalog.md Mapping a bespoke pattern to a Base UI component
references/migration-patterns.md Migrating overlays/interactive components (full before/after)
references/migration-patterns-primitives.md Migrating primitives (Button, Input, etc.) — condensed recipes
references/workflow.md Detailed step-by-step with error handling and rollback
references/styling-notes.md Adapting unstyled Base UI to your project's styling

Cached Catalog Data

Path Description
`assets/data/llms.txt
Полный SKILL.md на GitHub

Установить base-ui-migrator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/data/components/.gitkeepassets/data/components/accordion.mdassets/data/components/alert-dialog.mdassets/data/components/autocomplete.mdassets/data/components/avatar.mdassets/data/components/button.mdassets/data/components/checkbox-group.mdassets/data/components/checkbox.mdassets/data/components/collapsible.mdassets/data/components/combobox.mdassets/data/components/context-menu.mdassets/data/components/dialog.mdassets/data/components/drawer.mdassets/data/components/field.mdassets/data/components/fieldset.mdassets/data/components/form.mdassets/data/components/input.mdassets/data/components/menu.mdassets/data/components/menubar.mdassets/data/components/meter.mdassets/data/components/navigation-menu.mdassets/data/components/number-field.mdassets/data/components/otp-field.mdassets/data/components/popover.mdassets/data/components/preview-card.mdassets/data/components/progress.mdassets/data/components/radio.mdassets/data/components/scroll-area.mdassets/data/components/select.mdassets/data/components/separator.mdassets/data/components/slider.mdassets/data/components/switch.mdassets/data/components/tabs.mdassets/data/components/toast.mdassets/data/components/toggle-group.mdassets/data/components/toggle.mdassets/data/components/toolbar.mdassets/data/components/tooltip.mdassets/data/llms.txtconfig.json

FAQ

Что делает скилл base-ui-migrator?

Migrates React UI code to Base UI (`@base-ui/react`) — replacing bespoke modals, custom dropdowns, raw `<dialog>`/`<select>` elements, ad-hoc popovers/menus/tooltips, or other component libraries (Radix UI, Headless UI, Reach UI). Ships a 37-component catalog (snapshotted from base-ui.com/llms.txt) and scripts to refresh it, scan for migration candidates, and verify the migration compiles. Triggers on phrases like "migrate to base-ui", "use base-ui instead of X", "replace this dialog/popover/menu with base-ui", or when scanning a React codebase for components Base UI can replace. Trigger even if the user only mentions one component (e.g., "swap this modal for base-ui dialog") — the workflow scales from one file to a whole repo.

Как установить скилл base-ui-migrator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл base-ui-migrator запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить base-ui-migrator с