Loading...
Loading...
Use React/React Native code as the source of truth and implement the equivalent feature in iOS/Swift. Understands the feature behavior, components, state management, and logic from React, then creates idiomatic iOS code that matches the target codebase's existing patterns. Use when porting features from React/React Native to native iOS or building native alternatives to web components.
npx skill4agent add michaelboeding/skills react-to-iosReact Code → Understand Feature → Match iOS Codebase Patterns → Implement
(what) (how it's done here)| React/React Native | iOS/Swift Equivalent |
|---|---|
| |
| |
| Environment objects / Dependency injection |
| Computed properties / lazy vars |
| State machine / Combine |
| Props | Init parameters / Bindings |
| SwiftUI |
| |
| |
| |
| |
| |
| |
| SwiftUI modifiers / UIKit constraints |
| |
| Redux / Zustand | Combine / SwiftUI state / TCA |
| React Navigation | |
| React Query / SWR | Async/await patterns / Combine |
| Styled Components | View modifiers / custom ViewModifiers |
| Context Providers | |
To port a feature from React to iOS, I need:
1. PATH TO REACT CODEBASE (source of truth)
Where is the React/React Native project located?
Example: /path/to/react-app or ../react-native-app
2. FEATURE TO IMPLEMENT
What feature or component should I port?
Example: "UserProfile component" or "the checkout flow" or "src/components/Dashboard".tsx.jsx.jsuse*.ts.ts.d.ts| Aspect | What to Extract |
|---|---|
| Feature Behavior | What does this feature do? User-facing functionality |
| Component Structure | Component hierarchy, props, composition patterns |
| State Management | useState, useReducer, Redux, Context usage |
| Side Effects | useEffect patterns, data fetching, subscriptions |
| Business Logic | Validations, transformations, calculations |
| API Contracts | Network calls, request/response shapes |
| UI Flow | Screens, navigation, user interactions |
| Edge Cases | Error handling, loading states, empty states |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REACT FEATURE ANALYSIS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## Feature: [Name]
### What It Does
[User-facing description]
### Component Structure
[Component hierarchy and relationships]
### Props & State
[Key props, state variables, their purposes]
### Side Effects
[What useEffect/data fetching does]
### Business Logic
[Core logic summary]
### API Calls
[Endpoints, request/response shapes]
### UI Flow
[Screens, navigation, interactions]
### Edge Cases Handled
- [Case 1]
- [Case 2]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.claude/codebase-style.md━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
iOS CODEBASE PATTERNS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Style Guide: [Found / Not found]
Patterns observed from existing code:
- Architecture: [MVVM / MVC / TCA / VIPER / etc.]
- UI Framework: [SwiftUI / UIKit / Mixed]
- State: [how state is managed]
- Networking: [how API calls are made]
- DI: [how dependencies are injected]
- Navigation: [how navigation works]
Similar features to reference:
- [Feature 1]: [path]
- [Feature 2]: [path]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
IMPLEMENTATION PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## Files to Create
| # | File | Purpose | React Equivalent |
|---|------|---------|------------------|
| 1 | [path matching codebase conventions] | [purpose] | [React file] |
| 2 | ... | ... | ... |
## Key Mappings
| React Concept | iOS Equivalent (matching codebase patterns) |
|---------------|---------------------------------------------|
| [React thing] | [iOS equivalent as done in this codebase] |
| ... | ... |
## State Migration
| React State | iOS State Management |
|-------------|---------------------|
| [useState/Redux/etc.] | [How it maps to iOS patterns] |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━| React Pattern | iOS Implementation |
|---|---|
| Component with props | |
| useState + setState | |
| useEffect on mount | |
| useEffect with deps | |
| useEffect cleanup | |
| Conditional rendering | |
| List mapping | |
| Event handlers | Action closures or Bindings |
| CSS/StyleSheet | SwiftUI modifiers or custom |
.swiftruby ${CLAUDE_PLUGIN_ROOT}/skills/add-to-xcode/scripts/add_to_xcode.rb <filepath>add-to-xcode━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
REACT → iOS COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## Feature: [Name]
### Files Created
| File | Purpose |
|------|---------|
| [path] | [description] |
### Feature Parity Checklist
- [x] Core functionality matches React
- [x] Data structures equivalent
- [x] State management properly translated
- [x] Side effects handled
- [x] Error handling preserved
- [x] Loading states preserved
- [x] Edge cases handled
- [x] Matches iOS codebase patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"react to ios"
"react native to ios"
"convert from react"
"port this react component to swift"
"implement this react feature for ios"
"ios version of this react code"
"native ios from react native"
"migrate react native to swift"style-guidestyle guide ← Run this first on iOS codebase
react to ios ← Then run this.claude/codebase-style.mdstyle-guide