/cometchat-skills:cometchat-react-v7-patternsfrom cometchat-skills
Wires CometChat React v7 UI Kit into Vite, CRA, Next.js, React Router/Remix, and Astro — provider placement, env vars, SSR/islands, and build pitfalls.
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@7. Framework mechanics (env prefixes, SSR) are baked framework knowledge; kit symbols come fromcometchat-react-v7-core. Status: catalog-verified vs installed 7.1.0 (exports-only web-v7.json).
cometchat-react-v7-core — install, provider, init→login→render. This skill ASSUMES it.Wiring the UI Kit into a specific React toolchain, or debugging env/routing/SSR issues.
Covered by core. No new package.
.env with VITE_ prefix; read via import.meta.env.VITE_COMETCHAT_*. init/login in an app-startup effect; mount CometChatProvider above the chat routes. Brownfield gotcha (AUDIT-037/066): if the vite/client types aren't wired, import.meta.env is untyped → strict-TS build fails TS2339: Property 'env' does not exist on ImportMeta. Scaffolds wire vite/client differently by Vite version — older ones ship src/vite-env.d.ts (/// <reference types="vite/client" />), newer ones (Vite 8+) put "vite/client" in the types array of tsconfig.app.json. Don't assume either is present — CHECK, then ensure vite/client is referenced: add /// <reference types="vite/client" /> at the top of the env-reading file (self-contained, works regardless of Vite version), or add "vite/client" to tsconfig.app.json compilerOptions.types, or create src/vite-env.d.ts.REACT_APP_ prefix; read via process.env.REACT_APP_*.CometChatProvider in a Client Component ("use client"); env in .env.local with NEXT_PUBLIC_*. Guard browser-only code so it never runs during SSR (App Router AND Pages Router).VITE_ env) wires like Vite; v7 framework mode (SSR, the Remix successor — a legacy @remix-run/react app maps here) has Next-like SSR concerns → render the chat client-only (client guard / clientLoader / a <ClientOnly>), VITE_ env. Provider above the routed outlet.client:only="react" (never SSR it); env with PUBLIC_ prefix (import.meta.env.PUBLIC_COMETCHAT_*). One island owns init/login + provider + chat.CometChatProvider at a stable ancestor so init/login survive navigation (see -placement).Full per-framework recipe: fetch the docs integration page via
cometchat-react-v7-core/references/docs-map.md—integration-react·integration-nextjs·integration-react-router·integration-astro(+ thenext-*/react-router-*/astro-*layout recipes). Bake only the deltas above; fetch the rest.
window is not defined / hydration errors when the kit renders on the server → render the chat client-only ("use client" in Next; client:only="react" in Astro; a client guard / clientLoader in React Router v7) and defer init to useEffect/the browser.client:load/client:visible (they SSR the component first) instead of client:only="react" → server-render crash.VITE_ · CRA REACT_APP_ · Next NEXT_PUBLIC_ · Astro PUBLIC_) → values are undefined at runtime.RULES.md).See above; also version_conflict STOP (v6 installed) per core.
The app builds and chat renders on your framework (Vite / Next / React Router / Astro) with the correct env prefix and SSR guards ("use client" / ssr:false where needed).
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'.Other plugins' skills for the same job