/cometchat-skills:cometchat-react-native-expo-patternsfrom cometchat-skills
Wires CometChat React Native UI Kit v5 into Expo projects. Covers why Expo Go fails, setting up development builds, configuring app.json permissions, and installing the Expo-only punycode dependency.
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/expo-integration·expo-conversation·expo-tab-based-chat.
cometchat-react-native-core — install, provider chain, init→login→render. Assumed, not repeated here.cometchat-react-native-bare-patterns — the bare React Native CLI equivalent. Use that one, not this, for a non-Expo app.app.json/app.config.js with an expo key, or expo in package.jsonThe UI Kit ships custom native modules. Expo Go is a fixed prebuilt binary that cannot load them. There is no workaround, no config flag, and nothing to fix in code. You need a development build.
Symptom: the app runs in Expo Go but chat screens crash or render nothing, with a NativeModule error
that names gesture-handler / svg / video rather than CometChat — so it reads as unrelated.
npx expo run:ios # or: npx expo run:android
Both produce a development build. From then on use that build, not Expo Go.
Same list as bare RN, plus punycode, which is Expo-only:
npm install @cometchat/chat-uikit-react-native@5 @cometchat/chat-sdk-react-native@4
npm install @react-native-clipboard/clipboard \
react-native-svg react-native-video react-native-localize react-native-gesture-handler \
react-native-safe-area-context @react-native-async-storage/async-storage@^2.1.2 dayjs punycode
app.json — never in ios/ or android/This is the whole Expo/bare divergence: Expo generates the native projects, so hand-editing
Info.plist or AndroidManifest.xml is pointless — the next prebuild overwrites it. Declare
permissions in app.json and let Expo write them:
{
"expo": {
"ios": {
"infoPlist": {
"NSCameraUsageDescription": "Camera access for video calls",
"NSMicrophoneUsageDescription": "Microphone access for voice/video calls"
}
},
"android": {
"permissions": [
"android.permission.INTERNET",
"android.permission.CAMERA",
"android.permission.MODIFY_AUDIO_SETTINGS",
"android.permission.RECORD_AUDIO",
"android.permission.ACCESS_NETWORK_STATE",
"android.permission.BLUETOOTH_CONNECT",
"android.permission.VIBRATE"
]
}
}
}
BLUETOOTH_CONNECT (Android 12+) lets calls route audio to a Bluetooth headset — /calls/react-native/setup lists it; the calls SDK's own manifest only merges the legacy BLUETOOTH.READ_/WRITE_EXTERNAL_STORAGE, though the expo-integration page lists them: they are no-ops on modern Android (WRITE from 11, READ from 13), and the UI Kit's own manifest already merges them for older devices.After changing app.json, rebuild — a JS reload will not pick up a native permission change.
Calling adds native WebRTC, so it needs a fresh development build too:
npm install @cometchat/calls-sdk-react-native@5
# 6 REQUIRED peer deps — the calls SDK's declared peerDependencies. Pinned; do NOT float them.
npm install @react-native-async-storage/async-storage@^2.1.2 react-native-background-timer@^2.4.1 \
react-native-performance@^5.1.2 react-native-svg@^15.12.0 [email protected] \
[email protected]
npx expo run:ios
⚠️ react-native-url-polyfill + react-native-performance are bundle-critical (the UIKit
module-scope require()s the calls SDK, so Metro resolves its peers even in a chat-only build — a
missing one fails the bundle). Keep react-native-performance on 5.x (a floated ^6 breaks every
later npm install with ERESOLVE). @react-native-community/netinfo / react-native-callstats are
NOT declared peers — do not add them.
Simulators cannot capture camera or microphone — verify calls on a real device.
Everything above the native layer: the provider chain, init → login → render, every component,
theming, navigation. Only install and native config differ. Do not re-derive app code per toolchain.
ios/ or android/ directly — prebuild overwrites it. Use app.json.punycode — Expo-only, and its absence surfaces as an unrelated module error.app.json change — native config needs a rebuild.npm run verify:fences:rn-v5 is green.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 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'.Other plugins' skills for the same job