Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

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.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill expo-ui-swift-ui -a codex
Open on GitHub

What 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 VStack with three Text elements and a .padding(16) modifier
  • Wrap <Pressable /> in RNHostView inside Host
  • Check the ScrollView component 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 codex

2Manually: put the files in place

.agents/skills/expo-ui-swift-ui/SKILL.md

For all projects use ~/.agents/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

Similar skills

Everything for Frontend and UI →

From the same set422

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor