/cometchat-skills:cometchat-react-v7-placementfrom cometchat-skills
Wires CometChat chat into a React app shell with four layout patterns: full-screen, sidebar/split, popup/widget, or embedded panel. Composes core CometChat UIKit components for each placement.
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.
Read when SKILL.md points to them.
Ground truth:
@cometchat/chat-uikit-react@7. Uses only components defined incometchat-react-v7-core/-components(from live v7 docs). Status: catalog-verified vs installed 7.1.0 (exports-only web-v7.json). Fetch layout-specific props from the component's.mdtwin (../cometchat-react-v7-core/references/docs-map.md).
cometchat-react-v7-core — install, init→login→render, provider. This skill ASSUMES it.cometchat-react-v7-components — the component catalog this composes.Deciding/wiring WHERE chat lives — and either (a) growing the core surface into the whole combined chat app (selector tabs ↔ messages ↔ details/thread/search side panel + incoming call) when the user asks for the full app, or (b) a scoped-down sidebar/split, popup/floating widget, or embedded panel. Triggers: "build a full chat app", "add users/groups/calls tabs and a side panel", "add chat as a sidebar", "full screen chat page", "chat popup widget", "embed chat in my dashboard". Note: a plain unscoped "add chat" defaults to the production-ready CORE surface (list ↔ message pane) in cometchat-react-v7-core — grow to the combined app below only on request.
Covered by core. No new package.
CometChatErrorBoundary → ONE CometChatProvider, a two-column layout: a CometChatConversations LIST ↔ a MESSAGE pane (CometChatMessageHeader + CometChatMessageList + CometChatMessageComposer), sized per ../cometchat-react-v7-core/references/layout.md, with the thread-replies panel and the in-chat scoped message search wired by DEFAULT (opt-out only) and the global conversation search bar wired-or-hidden, collapsing to one pane on mobile. One small host state object coordinates {selected conversation, which side view (thread | in-chat-search | none)}. Complete and wired — NOT a bare demo — but NOT the whole app. See the "Core-surface recipe" below.CometChatErrorBoundary → ONE CometChatProvider: a SELECTOR column (the list for the active tab — CometChatConversations / CometChatUsers / CometChatGroups / CometChatCallLogs — + a tab bar), a MESSAGE pane, and a mutually-exclusive SIDE panel (user/group details, a thread CometChatThreadHeader + list/composer, or a scoped CometChatSearch), plus CometChatIncomingCall mounted at root. One host state object coordinates {active tab, selected user/group, thread parent, which side panel}. It is the UNION of the core surface + these growths — see the "Combined-app recipe (grow target)" below. Least-code = reach for these drop-ins (HOW).CometChatProvider mounted at app root so init/login persist across open/close. (Scoped-down variant.)Default to the CORE surface for a plain "add chat"; grow to the full combined app when the user asks for the whole app; honor an explicit smaller scope (the narrower three).
references/recipes.md)The two production recipes — full TSX + the 3-column CSS — live in references/recipes.md (progressive disclosure; load it when you build):
CometChatErrorBoundary → one CometChatProvider → two-column list ↔ message pane, thread panel + in-chat scoped search wired by default, mobile one-pane collapse.CometChatIncomingCall.Both encode the same invariants — keep them when you emit the code:
Selection has THREE obligations (AUDIT-079) — a selection that only opens a pane is a dead-end: (1) render the pane; (2) REFLECT it in the list (pass
activeConversation/activeUser/activeGroupso the row highlights); (3) every opened side panel is CLOSEABLE (wireonBack/onClose). A list-header action ("New chat"/"Create group") goes in the list'sheaderView— which REPLACES the default header, so render the title AND the button together inside it — NOT a sibling above the list (AUDIT-083; pattern in../cometchat-react-v7-core/references/component-props.md).
Both satisfy the reflow-free-surface standard (../cometchat-react-v7-core/references/layout.md) and collapse to one pane on mobile (below). The recipes use the useIsMobile hook defined in the Responsive / mobile section below.
Every pattern above that shows more than one pane (full-screen two-pane, sidebar/split, list+thread/detail) MUST collapse to a SINGLE screen at a time on small viewports — a fixed side-by-side layout that squashes on a phone is a defect (RULES.md §14), not a style choice. The kit has no responsive shell (no WithMessages/CometChatUI); you compose it from the same selection state, gated by a breakpoint.
CometChatMessageHeader ships hideBackButton (default false) + onBack(). On mobile wire onBack to clear the selection (pop to the list) and keep the button visible; on wide set hideBackButton (the list is always there).// SSR-guarded breakpoint hook
function useIsMobile(query = "(max-width: 768px)") {
const read = () => typeof window !== "undefined" && window.matchMedia(query).matches;
const [m, setM] = useState(read);
useEffect(() => {
const mq = window.matchMedia(query);
const on = () => setM(mq.matches);
mq.addEventListener("change", on);
return () => mq.removeEventListener("change", on);
}, [query]);
return m;
}
// Mobile: render exactly ONE pane based on state; wide: render them side-by-side.
const isMobile = useIsMobile();
if (isMobile) {
if (detail && selected) return <DetailOrThread onClose={() => setDetail(null)} />;
if (selected) return (
<MessagePane>
<CometChatMessageHeader {...target} hideBackButton={false} onBack={() => setSelected(null)} />
{/* list + composer */}
</MessagePane>
);
return <CometChatConversations onItemClick={pick} />; // list only
}
// wide → the two/three-pane layout, header with hideBackButton
Native (RN/Flutter): use the platform navigator (stack navigation) — one screen per route — not a web split view.
../cometchat-react-v7-core/references/layout.md) — pin a content-INDEPENDENT height (full-screen → 100dvh; sidebar/split → the panes take a viewport or flex/grid-supplied height; popup/embedded → a fixed height e.g. 600px or a sized grid/flex cell — never min-height/auto), prepare the ancestor chain, and size the columns with min-height:0/overflow:hidden. The kit fills its parent, so a content-driven container both collapses the chat to ~0px AND grows-into-place as content loads (the two named failure modes).CometChatProvider at a stable ancestor (not remounted per route/toggle) so init+login survive navigation..md twin (../cometchat-react-v7-core/references/docs-map.md).RULES.md).CometChatConversations search bar (onSearchBarClicked → CometChatSearch) renders in the conversations list column, over the list — the message pane stays visible; onBack/result-click returns to the list. Do NOT take over the whole screen (it hides the conversation the user was reading). Header search (onSearchOptionClicked, scoped by uid/guid) opens the same way. A full-screen replacement is correct ONLY on a mobile single-pane (§ responsive), where the search IS the list-level screen. Same principle for any pane-rooted affordance (thread/profile open in the side panel, not full-screen on desktop).// Wide: the LEFT column shows search when open, else the list — message pane stays.
const listColumn = searchOpen
? <CometChatSearch onBack={() => setSearchOpen(false)} onConversationClicked={pick} onMessageClicked={jump} />
: <CometChatConversations showSearchBar onSearchBarClicked={() => setSearchOpen(true)} onItemClick={pick} />;
// <aside className="list-column">{listColumn}</aside> <main>{messagePane}</main>
// Mobile (single-pane): if (searchOpen) render <CometChatSearch/> full-screen (it's the list screen).
CometChatProvider on every route/toggle (re-triggers init/login). Rendering the message pane before a conversation is selected. Nesting multiple providers.onBack (AUDIT-011).CometChatErrorBoundary — a render error in any kit component then blanks the whole page (white screen) instead of showing a localized fallback + retry. Both recipes above wrap the surface; keep it.layout.md (pinned 100dvh, prepared ancestor chain, min-height:0 columns) and let the kit's own loadingView/emptyView fill the pinned box — don't gate the surface behind your own placeholder→chat swap (AUDIT-023).Chat renders in the chosen layout inside a CometChatErrorBoundary, and on a narrow viewport it collapses to ONE pane at a time (list → message → back) — no squashed side-by-side panes on a phone. Default "add chat" ⇒ the Core-surface recipe (list ↔ message pane, sized, affordances wired-or-hidden); the whole combined app (tabs + side panel + incoming call) is the grow target for an explicit full-app ask.
Close (after it builds): end with the shared 3-option selectable menu and WAIT for the pick — (1) add another feature (suggest a few not-yet-wired) · (2) customize theming · (3) test it manually (stop; let the user check). Same contract as the cometchat-react-v7-core close (RULES.md §19).
What SKILL.md sets; muted values are Claude Code's defaults
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'./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'.Other plugins' skills for the same job