ui-migration
Skill0 starsChanged 5 months agoMITView on GitHub
Track component provenance (shadcn, custom, wrapper) during UI library migrations. Optionally integrates with the todo-workflow skill for multi-step migration tracking.
In this repository5 other files it gives its agents.
- idea-expansionSkill
- phase-trackingSkill
- project-pulseSkill
- shadcn-ui-migrationSkill
- todo-workflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 7 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when migrating between UI component libraries (e.g., custom design system → shadcn/ui, or upgrading shadcn versions).
- Very specific: line 17
If todo-workflow is loaded, migration tasks are tracked in TODOS.md and errors in ERRORS.md.
- Very specific: line 18
If todo-workflow is not loaded, this skill operates on a standalone COMPONENT_CATALOG.md with no task tracking.
- Distinctive: line 22
Every component in the project falls into one of these categories:
- Very specific: line 34
Create or maintain COMPONENT_CATALOG.md at the project root with this format:
- Distinctive: line 67
Run a survey to catalog every component file:
- Very specific: line 94
If todo-workflow is active:
- Distinctive: line 97
Delete old files only after all callers are updated.
- Very specific: line 98
Commit after each completed task (see Commit discipline in todo-workflow).
- Distinctive: line 102
After each component migration:
- Distinctive: line 104
Update provenance, dependencies, and notes.
- Very specific: line 105
If the old component was deleted, add a row to Legacy / Removed.
- Distinctive: line 109
After deleting a legacy directory or alias, search for stale references:
- Very specific: line 137
When migrating a legacy Select to shadcn:
- Very specific: line 140
Create a SelectWrapper.jsx if backward compat is needed, or update callers directly.
- Very specific: line 146
If using todo-workflow, mark task complete, log errors to ERRORS.md, and commit.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
UI Migration Skill
Track component provenance (shadcn, custom, wrapper) during UI library migrations. Optionally integrates with the todo-workflow skill for multi-step migration tracking.
When to use
Use this skill when migrating between UI component libraries (e.g., custom design system → shadcn/ui, or upgrading shadcn versions). It provides conventions for documenting component ancestry so future developers know what each component is built on.
Dependencies
This skill optionally depends on todo-workflow:
- If
todo-workflowis loaded, migration tasks are tracked inTODOS.mdand errors inERRORS.md. - If
todo-workflowis not loaded, this skill operates on a standaloneCOMPONENT_CATALOG.mdwith no task tracking.
Component Provenance Categories
Every component in the project falls into one of these categories:
| Category | Label | Meaning |
| shadcn | shadcn | Generated by shadcn@latest add <name>. Files live in src/components/ui/ and use @/lib/utils + cn(). |
| shadcn-wrapper | wrap | Custom wrapper around a shadcn component providing backward-compatible API. Files live outside src/components/ui/. |
| custom | custom | Fully hand-written, no shadcn dependency. |
| pattern | pattern | Described in AGENTS.md conventions but no file exists yet. |
| design-system | legacy-ds | Imported from a legacy @design-system alias. Used during active migration before deletion. |
Component Catalog
Create or maintain COMPONENT_CATALOG.md at the project root with this format:
# Component Catalog
## UI Components (src/components/ui/)
| Component | Provenance | Depends On | Notes |
|---|---|---|---|
| Button | shadcn | @base-ui/react/button, cva | Added during Tailwind v4 migration |
| Card | shadcn | — | Pure Tailwind + cn() |
| Input | shadcn | @base-ui/react/input | |
## Custom Components (src/components/)
| Component | Provenance | Imports | Notes |
|---|---|---|---|
| AppIcon | custom | lucide-react (dynamic) | Dynamic icon lookup |
| Header | custom | AppIcon, lucide-react, react-router-dom | |
| Sidebar | custom | AppIcon, react-router-dom | Collapsible nav |Sections
src/components/ui/— shadcn-generated components, one row per file.src/components/— custom components, one row per file.Legacy / Removed— components from the old design system that were deleted, with their migration path.Patterns (unimplemented)— documented component patterns fromAGENTS.mdthat don't yet have files. Only include these if they are part of the current migration scope.
Migration Workflow
1. Discover current state
Run a survey to catalog every component file:
src/components/ui/ → shadcn originals
src/components/ → custom components
src/features/*/ → consumersFor each component, record:
- File path
- Imports (to determine dependencies)
- Which category it falls into
2. Plan the migration
For each component being migrated, decide:
| Current | Target | Action |
legacy-ds | shadcn | Install via pnpm dlx shadcn@latest add <name>, then rewrite callers |
legacy-ds | custom | Hand-write replacement, then rewrite callers |
shadcn-wrapper | shadcn | Delete wrapper, update callers to use shadcn directly |
custom | shadcn | Install shadcn equivalent, rewrite component internally |
shadcn | shadcn (upgrade) | Reinstall via shadcn CLI |
3. Execute with todo-workflow (if loaded)
If todo-workflow is active:
- Break the migration into per-component tasks in
TODOS.md. - Process one task at a time: install/rewrite → update callers → verify.
- Delete old files only after all callers are updated.
- Commit after each completed task (see Commit discipline in
todo-workflow).
4. Update the catalog
After each component migration:
- Move the row to its new section in
COMPONENT_CATALOG.md. - Update provenance, dependencies, and notes.
- If the old component was deleted, add a row to
Legacy / Removed.
5. Clean up stale references
After deleting a legacy directory or alias, search for stale references:
rg '@design-system' --include '*.{js,jsx,ts,tsx}' src/Also check:
vite.config.js— alias definitionstsconfig.json/jsconfig.json— path aliasesREADME.md,AGENTS.md— documentation references
Component Survey Commands
# List all components by location
ls src/components/ui/*.{jsx,tsx} 2>/dev/null
ls src/components/*.jsx 2>/dev/null
# Find all feature imports to a component
rg "from '@/components/" src/features/ --include '*.jsx'
rg "from '@components/" src/features/ --include '*.jsx'
# Check for stale legacy imports
rg '@design-system' src/ --include '*.{js,jsx,ts,tsx}'Example: shadcn Migration
When migrating a legacy Select to shadcn:
pnpm dlx shadcn@latest add select- Create a
SelectWrapper.jsxif backward compat is needed, or update callers directly. - Update
COMPONENT_CATALOG.md:- | Select | legacy-ds | @design-system/ui/Select | Replaced by shadcn | + | Select | shadcn | @base-ui/react/select, lucide-react | Installed during v4 migration | - If using
todo-workflow, mark task complete, log errors toERRORS.md, and commit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

