UI Component Migrator Skill
Migrates UI components between different frameworks, handling structure translation, state management conversion, and style migration.
Purpose
Enable UI framework migration for:
- Component structure translation
- State management migration
- Lifecycle method conversion
- Event handling transformation
- Style migration
Capabilities
1. Component Structure Translation
- Convert component syntax
- Transform templates
- Migrate component props
- Handle slots/children
2. State Management Migration
- Convert local state
- Migrate global state (Redux/Vuex/etc)
- Transform state updates
- Handle computed properties
3. Lifecycle Method Conversion
- Map lifecycle methods
- Convert to hooks/composition API
- Handle initialization
- Transform cleanup logic
4. Event Handling Transformation
- Convert event bindings
- Transform handlers
- Migrate custom events
- Handle event modifiers
5. Style Migration
- Convert CSS-in-JS
- Migrate scoped styles
- Transform CSS modules
- Handle theme systems
6. Test Migration
- Convert component tests
- Update test utilities
- Transform mocking
- Migrate snapshots
Tool Integrations
| Migration Path |
Tools |
Integration Method |
| React -> Vue |
Custom transformers |
AST |
| Vue -> React |
Custom transformers |
AST |
| Angular -> React |
Custom transformers |
AST |
| Class -> Hooks |
React codemods |
CLI |
| Options -> Composition |
Vue codemods |
CLI |
Output Schema
{
"migrationId": "string",
"timestamp": "ISO8601",
"source": {
"framework": "string",
"version": "string"
},
"target": {
"framework": "string",
"version": "string"
},
"components": [
{
"sourcePath": "string",
"targetPath": "string",
"status": "migrated|partial|failed",
"transformations": [],
"manualSteps": []
}
],
"summary": {
"total": "number",
"migrated": "number",
"partial": "number",
"failed": "number"
}
}
Integration with Migration Processes
- ui-framework-migration: Primary migration tool
- framework-upgrade: Internal framework upgrades
Related Skills
codemod-executor: Transformation execution
framework-compatibility-checker: Compatibility analysis
Related Agents
framework-upgrade-specialist: Orchestrates UI migration
1---
2name: ui-component-migrator
3description: Migrate UI components between frameworks with structure, state, and style transformation
4allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob", "Edit"]
5graph:
6 domains: [domain:software-engineering]
7 specializations: [specialization:code-migration-modernization]
8 skillAreas: [skill-area:dependency-upgrade-strategies, skill-area:breaking-change-management]
9 roles: [role:frontend-engineer, role:backend-engineer]
10 workflows: [workflow:technical-debt-reduction]
11 topics: [topic:refactoring]
12metadata:
13 source: https://skillmd.com/skills/a5c-ai/ui-component-migrator
14---
15
16# UI Component Migrator Skill
17
18Migrates UI components between different frameworks, handling structure translation, state management conversion, and style migration.
19
20## Purpose
21
22Enable UI framework migration for:
23- Component structure translation
24- State management migration
25- Lifecycle method conversion
26- Event handling transformation
27- Style migration
28
29## Capabilities
30
31### 1. Component Structure Translation
32- Convert component syntax
33- Transform templates
34- Migrate component props
35- Handle slots/children
36
37### 2. State Management Migration
38- Convert local state
39- Migrate global state (Redux/Vuex/etc)
40- Transform state updates
41- Handle computed properties
42
43### 3. Lifecycle Method Conversion
44- Map lifecycle methods
45- Convert to hooks/composition API
46- Handle initialization
47- Transform cleanup logic
48
49### 4. Event Handling Transformation
50- Convert event bindings
51- Transform handlers
52- Migrate custom events
53- Handle event modifiers
54
55### 5. Style Migration
56- Convert CSS-in-JS
57- Migrate scoped styles
58- Transform CSS modules
59- Handle theme systems
60
61### 6. Test Migration
62- Convert component tests
63- Update test utilities
64- Transform mocking
65- Migrate snapshots
66
67## Tool Integrations
68
69| Migration Path | Tools | Integration Method |
70|---------------|-------|-------------------|
71| React -> Vue | Custom transformers | AST |
72| Vue -> React | Custom transformers | AST |
73| Angular -> React | Custom transformers | AST |
74| Class -> Hooks | React codemods | CLI |
75| Options -> Composition | Vue codemods | CLI |
76
77## Output Schema
78
79```json
80{
81 "migrationId": "string",
82 "timestamp": "ISO8601",
83 "source": {
84 "framework": "string",
85 "version": "string"
86 },
87 "target": {
88 "framework": "string",
89 "version": "string"
90 },
91 "components": [
92 {
93 "sourcePath": "string",
94 "targetPath": "string",
95 "status": "migrated|partial|failed",
96 "transformations": [],
97 "manualSteps": []
98 }
99 ],
100 "summary": {
101 "total": "number",
102 "migrated": "number",
103 "partial": "number",
104 "failed": "number"
105 }
106}
107```
108
109## Integration with Migration Processes
110
111- **ui-framework-migration**: Primary migration tool
112- **framework-upgrade**: Internal framework upgrades
113
114## Related Skills
115
116- `codemod-executor`: Transformation execution
117- `framework-compatibility-checker`: Compatibility analysis
118
119## Related Agents
120
121- `framework-upgrade-specialist`: Orchestrates UI migration