/cometchat-skills:cometchat-react-native-placementfrom cometchat-skills
Guides placement of CometChat React Native UI Kit v5 surfaces in a real app: one screen per route on a stack navigator, tab-based layouts, embedding chat in existing screens. Covers react-navigation setup, provider chain order, and avoiding common version conflicts.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ground truth:
@cometchat/chat-uikit-react-native@5+ catalogrn-v5.json. Docs:/ui-kit/react-native/react-native-conversation·react-native-tab-based-chat·expo-tab-based-chat. Fetch props viacore/references/docs-map.md.
cometchat-react-native-core — install, provider chain, init→login→render. Assumed, not repeated here.Navigation is not bundled. The documented stack:
npm install @react-navigation/native @react-navigation/native-stack @react-navigation/bottom-tabs
npm install react-native-screens react-native-safe-area-context
⚠️ Align these to YOUR React Native version — do not take the latest. The UI Kit declares its peers
as "*", so nothing constrains them for you. react-native-screens 4.x / safe-area-context 5.x use
Fabric codegen that RN 0.77's @react-native/codegen cannot parse; Metro then fails with
Unknown prop type for "moduleId" / "onFinishTransitioning" — an error naming a native codegen file,
never CometChat. Run npx react-native doctor, or match a known-good set for your RN
(on 0.77: [email protected] + [email protected] + [email protected]).
This is the single biggest difference from the web UI Kit. React places a list and a message pane side by side and toggles side panels with state. On a phone that is wrong:
navigation.navigate(...), not conditional renderingConditional rendering ({selected ? <Chat/> : <List/>}) appears in the simplest docs recipe and is
fine for a single-screen demo, but it breaks the Android back button and loses navigation state.
Anything beyond a demo uses the navigator.
Providers wrap the navigator, not the other way round. GestureHandlerRootView stays outermost:
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { NavigationContainer } from "@react-navigation/native";
import {
CometChatI18nProvider, CometChatThemeProvider,
} from "@cometchat/chat-uikit-react-native";
export const Root = ({ children }: { children: React.ReactNode }) => (
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<CometChatI18nProvider>
<CometChatThemeProvider>
<NavigationContainer>{children}</NavigationContainer>
</CometChatThemeProvider>
</CometChatI18nProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
);
Putting NavigationContainer outside the providers means screens mount without a theme and the kit
falls back to defaults.
Two routes: the list, and the message pane. This is what an unscoped "add chat" should produce.
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { CometChatConversations } from "@cometchat/chat-uikit-react-native";
const Stack = createNativeStackNavigator();
const ConversationsScreen = () => <CometChatConversations />;
const MessagesScreen = () => null; // header + list + composer — see `core`
export const ChatStack = () => (
<Stack.Navigator>
<Stack.Screen name="Conversations" component={ConversationsScreen} />
<Stack.Screen name="Messages" component={MessagesScreen} options={{ headerShown: false }} />
</Stack.Navigator>
);
headerShown: false on the message screen because CometChatMessageHeader is the header —
leaving the native header on gives you two stacked headers.
The list screen navigates on onItemPress; the message screen reads user/group from route params,
sets showBackButton (it defaults to false on RN) and wires onBack to navigation.goBack().
Chat becomes one tab beside your own screens. The bottom-tab navigator holds the tabs; a stack sits above it so the message screen covers the tab bar when a conversation opens.
<Stack.Navigator>
<Stack.Screen name="Tabs" component={TabNavigator} options={{ headerShown: false }} />
<Stack.Screen name="Messages" component={MessagesScreen} options={{ headerShown: false }} />
</Stack.Navigator>;
If Messages lives inside the tab navigator instead, the tab bar stays visible over the composer —
the classic "keyboard and tab bar fighting" bug.
Add tabs for the other directories as they are asked for, each its own screen:
CometChatConversations (Chats) · CometChatUsers (Users) · CometChatGroups (Groups) ·
CometChatCallLogs (Calls). Push, don't panel:
| Surface | How it appears |
|---|---|
| thread replies | push a screen with CometChatThreadHeader |
| search | push a screen with CometChatSearch, wire onBack |
| group members | push a screen with CometChatGroupMembers |
| user/group details | you build this — kit v5 ships no details component (SDK fallback, see core/references/docs-map.md) |
CometChatIncomingCall is the exception: mount it once above the navigator so a call can arrive
on any screen.
Chat as part of a screen rather than the whole of it. The container must still be flex: 1 with
minHeight: 0; a fixed height breaks when the keyboard opens.
Every ancestor of a kit component is flex: 1. A scrolling column also needs minHeight: 0. Verify
with the keyboard open — the composer must stay visible, which a simulator can mislead you about.
headerShown: false on any screen using CometChatMessageHeader.NavigationContainer outside the providers — screens mount unthemed.onBack to navigation.goBack().CometChatIncomingCall inside one screen — calls then only arrive on that screen.catalogs/rn-v5.json.npm run verify:fences:rn-v5 is green.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'./cometchat-analyticsSee what your chat is doing — pull usage & message metrics via REST, stream real-time events to your data/observability stack via webhooks, monitor client-side errors & the init/login path, and read push/call logs. Cross-family: metrics/webhooks are server-side; client error monitoring wires per family. Triggers: 'chat analytics', 'usage metrics', 'message volume', 'monitor cometchat', 'observability', 'send chat events to datadog/segment/bigquery', 'track delivery', 'error monitoring for chat', 'dashboards for chat'./cometchat-android-v5-calls-sdkAdd voice & video calling to any Android app FROM SCRATCH with the headless CometChat Calls SDK v5 (`com.cometchat:calls-sdk-android:5.0.4`) — no UI Kit. Kotlin: initFromSettings→login→generateToken→joinSession into a RelativeLayout, lifecycle-bound listeners, meet-style session rooms AND 1:1 ringing (Chat SDK v5 signaling + Calls SDK media), call logs, layouts, audio modes, recording, PiP, background service. Triggers: 'add calling from scratch android', 'standalone video call kotlin', 'headless calls sdk android', 'build my own call UI android', 'meeting room join by session id android', 'one-on-one ringing call without uikit android'./cometchat-android-v5-sdkBuild chat on Android with the headless CometChat Chat SDK v5 and your OWN UI — init/login ordering, the method map, request-builder pagination, listener lifecycle, and a production-ready app surface (optimistic updates, error states, sized shell). Use when the app needs custom UI instead of the drop-in UI Kit. Triggers: 'cometchat android sdk', 'chat with my own ui android', 'headless cometchat android', 'send message with chat-sdk-android', 'cometchat message listener kotlin'./cometchat-android-v6-builder-settingsThe CometChat Android v6 settings and session API reference — the assets/cometchat-settings.json file that initFromSettings reads (appId, region, credentials, uiKit toggles), the legacy UIKitSettings builder, and the CometChatUIKit session methods (login, loginWithAuthToken, logout, getLoggedInUser, createUser). Use when configuring init options or wiring auth beyond the core golden path. Triggers: 'cometchat settings json android', 'uikitsettings builder options', 'login with auth token android', 'create a cometchat user from the app', 'enable calling in settings'.npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skillsOther plugins' skills for the same job