Agent skill · assistant-ui

react-native

Build assistant-ui chat experiences for Expo and bare React Native with `@assistant-ui/react-native` and `@assistant-ui/ai-sdk`. Use when setting up an absolute mobile chat endpoint, `AssistantRuntimeProvider`, `useChatRuntime`, `AssistantChatTransport`, native `ThreadPrimitive`, `ComposerPrimitive`, `MessagePrimitive`, thread lists, attachments, React Native styles, `Metro` `withAui` for a `\"use generative\"` toolkit, local or remote thread adapters, or migrating a web chat surface to iOS and Android. Route here when a relative API URL fails on device, a native primitive lacks runtime state, `Metro` does not compile a toolkit, or web Elements are being used in a native app. Route web setup and DOM primitive work to `../setup/SKILL.md` and `../primitives/SKILL.md`.

What it needs

About 5k tokens when loaded.

What this skill does

assistant-ui React Native Always consult assistant-ui.com/llms.txt for the latest API. @assistant-ui/react-native supplies runtime-connected, unstyled React Native primitives. Use them with View, Text, Pressable, TextInput, FlatList, and native styles to build the chat surface. @assistant-ui/ai-sdk supplies the AI SDK v7 runtime and transport. The model route runs in a separate backend project, never inside the Expo bundle. Contents References Quick start Manual setup Native chat composition Generative toolkits Common Gotchas Related Skills References ./references/primitives.md -- native primitive namespaces and their parts ./references/hooks.md -- state, runtime, tool, and scoped-provider hooks ./references/adapters.md -- local persistence, attachments, and remote thread lists ./references/custom-backend.md -- a streaming model adapter and a backend-owned thread list ./references/migration.md -- moving a web runtime to a native UI layer Quick start Start from the maintained Expo example: Set an endpoint that the app can reach. It must be an absolute URL. A physical device cannot resolve its own localhost to your development server. Start Expo: Manual setup Install the native runtime and its AI SDK v7 peer packages in an existing Expo app: Host the model route separately. The native app posts UI messages to that route through AssistantChatTransport; the route converts them asynchronously for AI SDK v7 and returns a UI message stream. Create the runtime in a hook. Keep the endpoint in the public Expo environment so the compiled app can reach it. AssistantChatTransport forwards frontend tool schemas and system messages. When the backend enables frontend tools, consume the request tools with frontendTools from @assistant-ui/ai-sdk; see tools for the shared backend contract. Native chat composition Put the runtime under the native AssistantRuntimeProvider, then compose the thread and composer from primitives. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills assistant-ui/react-native

View the source on GitHub

Browse the @skills marketplace