expo-ui-swift-ui — Codex skill: SwiftUI in React Native
The skill teaches the agent to work with the @expo/ui/swift-ui package, which brings SwiftUI Views and modifiers into React Native apps on Expo SDK 55.
npx skills add openai/plugins --skill expo-ui-swift-ui -a codexWhat expo-ui-swift-ui does
The skill wires in knowledge of @expo/ui/swift-ui, a package that mirrors SwiftUI's API in React Native. The agent imports components from @expo/ui/swift-ui, modifiers from @expo/ui/swift-ui/modifiers, and wraps each SwiftUI tree in Host. To embed standard RN components inside a SwiftUI tree, it uses RNHostView.
Before using a component or modifier, the agent fetches the Expo UI SDK 55 docs to confirm the API. If a needed View or modifier is missing, the skill suggests extending the package via a local Expo module — but only after user confirmation. After installing @expo/ui, a native rebuild is required with npx expo run:ios.
What it helps with
- use SwiftUI components in a React Native app
- embed an RN element in a SwiftUI tree with RNHostView
- apply SwiftUI modifiers to React components
- extend Expo UI with a missing View via a local module
Example prompts for the agent
- Add a
VStackwith threeTextelements and a.padding(16)modifier - Wrap
<Pressable />inRNHostViewinsideHost - Check the
ScrollViewcomponent API in Expo UI SDK 55 docs
How to install expo-ui-swift-ui
1Skills CLI (Vercel)
npx skills add openai/plugins --skill expo-ui-swift-ui -a codex2Manually: put the files in place
.agents/skills/expo-ui-swift-ui/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill expo-ui-swift-ui -a claude-code2Manually: put the files in place
~/.claude/skills/expo-ui-swift-ui/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/expo-ui-swift-ui/
Manually: put the files in place
.cursor/skills/expo-ui-swift-ui/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins expo-ui-swift-ui2Manually: put the files in place
.github/skills/expo-ui-swift-ui/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/expo/skills/expo-ui-swift-uiManually: put the files in place
.devin/skills/expo-ui-swift-ui/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them
Questions about expo-ui-swift-ui
How to install expo-ui-swift-ui in Codex?
Run npx skills add openai/plugins --skill expo-ui-swift-ui or npx skills add openai/plugins --skill expo-ui-swift-ui -a codex. The skill will be available at .agents/skills/expo-ui-swift-ui/SKILL.md.
What does expo-ui-swift-ui do?
The skill teaches the agent to work with the @expo/ui/swift-ui package, which brings SwiftUI Views and modifiers into React Native apps on Expo SDK 55. The agent imports components, wraps them in Host, and fetches docs before using them.
Is a native rebuild required after installing @expo/ui?
Yes, after installing the @expo/ui package you need to rebuild the native part with npx expo run:ios.
Source text
SKILL.md · MIT
---
name: expo-ui-swift-ui
description: "`@expo/ui/swift-ui` package lets you use SwiftUI Views and modifiers in your app."
---
> The instructions in this skill apply to SDK 55 only. For other SDK versions, refer to the Expo UI SwiftUI docs for that version for the most accurate information.
## Installation
```bash
npx expo install @expo/ui
```
A native rebuild is required after installation (`npx expo run:ios`).
## Instructions
- Expo UI's API mirrors SwiftUI's API. Use SwiftUI knowledge to decide which components or modifiers to use.
- Components are imported from `@expo/ui/swift-ui`, modifiers from `@expo/ui/swift-ui/modifiers`.
- When about to use a component, fetch its docs to confirm the API - https://docs.expo.dev/versions/v55.0.0/sdk/ui/swift-ui/{component-name}/index.md
- When unsure about a modifier's API, refer to the docs - https://docs.expo.dev/versions/v55.0.0/sdk/ui/swift-ui/modifiers/index.md
- Every SwiftUI tree must be wrapped in `Host`.
- `RNHostView` is specifically for embedding RN components inside a SwiftUI tree. Example:
```jsx
import { Host, VStack, RNHostView } from "@expo-ui/swift-ui";
import { Pressable } from "react-native";
<Host matchContents>
<VStack>
<RNHostView matchContents>
// Here, `Pressable` is an RN component so it is wrapped in `RNHostView`.
<Pressable />
</RNHostView>
</VStack>
</Host>;
```
- If a required modifier or View is missing in Expo UI, it can be extended via a local Expo module. See: https://docs.expo.dev/guides/expo-ui-swift-ui/extending/index.md. Confirm with the user before extending.
© Expo Team · MIT · openai/plugins