Skill
swiftui-uikit-interop-skill
SwiftyJourney/swiftui-uikit-interop-skill
50
InicialPluginScore · de 0 a 100Bridge SwiftUI and UIKit: UIHostingController, representables + coordinators, cells, widgets, and lifecycle migration - Agent Skill
Instalação
$
npx convez-ai SwiftyJourney/swiftui-uikit-interop-skill1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Estrelas
1Forks
0Acompanhando
0Saúde
50%Último commit
há 3 mesesVersão
—Issues abertas
0Contribuidores
1README
A tradução para o português deste README ainda está na fila.
SwiftUI ⇄ UIKit Interop Agent Skill
A Claude Code skill for the boundary between SwiftUI and UIKit — embedding SwiftUI in a UIKit app, wrapping UIKit views/controllers for use in SwiftUI, passing data across the divide, and migrating a UIKit app to the SwiftUI lifecycle.
Who is this for?
iOS developers integrating the two frameworks in a real codebase:
- Showing or embedding a SwiftUI screen from UIKit (
UIHostingController) - Putting SwiftUI inside
UICollectionView/UITableViewcells (UIHostingConfiguration) - Wrapping a UIKit view or view controller for SwiftUI (
UIViewRepresentable/UIViewControllerRepresentable+Coordinator) - Passing data and events across the boundary (init params,
@Binding, closures, environment/trait forwarding) - Fixing hosting-controller sizing and Auto Layout conflicts
- Migrating a UIKit
AppDelegate/SceneDelegateapp incrementally to the SwiftUIApplifecycle - Building SwiftUI widgets and Live Activities
Installation
Install via skills.sh:
npx skills add SwiftyJourney/swiftui-uikit-interop-skill
Compatible Agents
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Any agent supporting the
skills/convention
What the Skill Covers
| Direction | Tools |
|---|---|
| SwiftUI in UIKit | UIHostingController (present, child-embed, subclass, sizing), UIHostingConfiguration cells |
| UIKit in SwiftUI | UIViewRepresentable, UIViewControllerRepresentable, the Coordinator pattern |
| Across the boundary | init params, @Binding, closures, environment/trait forwarding, observation |
| Extensions | SwiftUI in WidgetKit widgets and Live Activities |
| Migration | UIKit lifecycle → SwiftUI App lifecycle, incrementally |
Skill File Structure
SKILL.md # Hub: behavior contract, diagnostic table, reference router
references/
├── hosting-controller.md # UIHostingController: present, child-embed, subclass, sizing
├── hosting-configuration.md # UIHostingConfiguration for collection/table cells (iOS 16+)
├── representables.md # UIViewRepresentable, UIViewControllerRepresentable, Coordinator
├── passing-data-across-the-boundary.md # init params, @Binding, closures, environment/trait forwarding
├── widgets-and-live-activities.md # SwiftUI in WidgetKit widgets and Live Activities
└── lifecycle-migration.md # UIKit AppDelegate/SceneDelegate → SwiftUI App lifecycle
Related Skills
- SwiftUI Expert — SwiftUI view code: state, composition, performance, animations, accessibility
- iOS Architecture Expert — Clean modular architecture: composition root, protocol boundaries, generic presenters, Swift 6 concurrency
- Requirements Engineering — Turn vague requirements into testable specs: BDD, use cases, contracts, diagrams
- Swift Language Expert — Non-obvious Swift language & standard-library techniques
Credits
- Natalia Panferova (Nil Coalescing) — "Integrating SwiftUI into UIKit Apps", which informed the interop patterns distilled here
- Apple — SwiftUI / UIKit documentation, WWDC sessions, and Human Interface Guidelines
License
MIT — see LICENSE.