/cometchat-skills:cometchat-angular-v5-productionfrom cometchat-skills
Hardens a CometChat Angular v5 integration for production by replacing Auth Key with server-minted auth tokens, securing environment files, and providing a pre-launch checklist.
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-angular@5(5.1.0–5.2.2 verified). The auth-token API is FETCHED from{DOCS_BASE}/ui-kit/angular/methods.mdand/integration.md(base + paths incometchat-angular-v5-core/references/docs-map.md). The Angular UI Kit docs have no dedicated production-hardening page — the checklist below is the pack's own guidance, derived from the credential rules inRULES.md§4 and what the kit ships; it is labelled as such rather than presented as documented. Treat that as a tracked DOCS GAP.
cometchat-angular-v5-core — references/setup-credentials.md covers the dev credential flow this replaces.cometchat-security — the enterprise auth model this client-side hardening plugs into: wiring your IdP / SSO into the token flow (your IdP → your server → mint the CometChat auth token; CometChat is not an IdP), token expiry/refresh + re-login, RBAC roles + group (SBAC) scopes, and Auth Key vs auth token vs REST API Key. Load it for a security review or any SSO question.Moving off the development setup: going live, a security review, or "is this safe to ship".
Never ship the Auth Key in the browser bundle.
The Auth Key can mint a session for any user in your app. Anything in environment.ts is compiled into JavaScript your users download, so an Auth Key there is public. Anyone can read it, log in as any UID, and read every conversation.
| Development | Production | |
|---|---|---|
| Login | CometChatUIKit.login(uid) | CometChatUIKit.loginWithAuthToken(token) |
| Auth Key | in environment.ts | absent from the bundle |
| Token source | n/a | your backend, per authenticated user |
| REST API Key | never client-side | server only |
loginWithAuthToken(token).import { inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { firstValueFrom } from 'rxjs';
import { CometChatUIKit } from '@cometchat/chat-uikit-angular';
const http = inject(HttpClient);
async function loginForCurrentUser() {
// your endpoint, protected by your own session
const { authToken } = await firstValueFrom(
http.get<{ authToken: string }>('/api/cometchat-token', { withCredentials: true }),
);
return CometChatUIKit.loginWithAuthToken(authToken);
}
The endpoint must derive the UID from the server-side session, never from a request parameter. Accepting ?uid= lets any caller impersonate anyone.
// src/environments/environment.prod.ts
export const environment = {
production: true,
cometchat: { appId: 'APP_ID', region: 'REGION', authKey: '' }, // empty on purpose
};
App ID and Region are not secrets — they identify the app. The Auth Key is the secret, and it is empty here. Confirm fileReplacements is wired in the production configuration, then grep the built bundle for the key to be certain:
ng build --configuration production && grep -r "YOUR_AUTH_KEY" dist/ || echo "clean"
Run that in CI. A misconfigured fileReplacements fails silently and ships the dev file.
await CometChatUIKit.logout(), then clear derived state and unregister push tokens (cometchat-angular-v5-push).getUserMedia) and push.~ range so a minor cannot change component behaviour under you.CometChatUIKit.setLogLevel(...) — quieter in production.<cometchat-call-logs> has an (error) output — verified vs 5.1.0, its only outputs are itemClick and callButtonClicked; it takes an onError INPUT callback instead, so (error) there binds a DOM listener that never fires. Conversations / Users / Groups / GroupMembers / MessageList all do have (error); wrap the surface in <cometchat-error-boundary>.ngOnDestroy on every subscription and listener; leaks are worse in a long-lived SPA.loginWithAuthToken in production; UID from the server sessionfileReplacements verified by building, not by reading config — note the production build FAILS on the default 1 MB budget until you raise it (cometchat-angular-v5-core Install); the grep below never runs otherwisefileReplacements assumed rather than verified — dev config ships.Production build contains no Auth Key · login works via token · a tampered UID is rejected by the server · logout fully clears · calls and push work over HTTPS · features enabled on the production app.
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