/cometchat-skills:cometchat-angular-v5-customizationfrom cometchat-skills
Brands and customizes the CometChat Angular UI Kit — CSS variable tokens, ThemeService for dark mode, localization, date/time formats, and ng-template slot swapping.
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). Theme tokens,ThemeServiceand the global config are FETCHED from{DOCS_BASE}/ui-kit/angular/customization/theming.md,/customization/global-config.md,/customization/localization.md,/customization/date-time-formatting.mdand/message-bubble-styling.md— base + paths incometchat-angular-v5-core/references/docs-map.md. CSS variable names are version-pinned; never invent a token.
cometchat-angular-v5-core — install and references/theming.md for the token basics. Assumed.cometchat-angular-v5-components — view slots, when the change is structural rather than visual.Changing how the kit looks or reads: colours, fonts, dark mode, language, date formats, or replacing a region's markup.
Cloning a named app, or mixing kit components with your own UI? Measure the target's colors, type, spacing and radii into ONE token source, theme the kit from it, and style every custom component from the same tokens so kit and custom parts look like one design; host a kit component in your own dialog/panel when only its placement differs. Flow: cometchat-onboarding → references/clone-mode.md (Design sync, build levels L0–L6).
| Want | Use | Cost |
|---|---|---|
| Different colours / spacing | CSS variables | one stylesheet |
| Light ↔ dark | ThemeService | one line |
| Different language | CometChatLocalize | config |
| Different date format | per-component *DateTimeFormat inputs | one input |
| Different markup in a region | *View slot + ng-template | a template |
| Different behaviour | not customization — see features or components | — |
Reach for the first that works. Replacing a whole region to change a colour throws away selection, presence and receipts.
Every visual is a --cometchat-* custom property. Override wherever it cascades — usually styles.css.
:root {
--cometchat-primary-color: #6851D6;
--cometchat-border-color-default: #DCDCDC;
--cometchat-text-color-primary: #141414;
}
Scope to part of the app by setting them on a wrapper instead of :root. Full token list: {DOCS_BASE}/ui-kit/angular/customization/theming.md.
Never target generated class names with descendant selectors — they change between releases. Never use !important; if a token is not applying, the kit stylesheet is not registered (angular.json → styles) or your rule is not in the cascade path.
import { Component, inject } from '@angular/core';
import { ThemeService } from '@cometchat/chat-uikit-angular';
@Component({ selector: 'app-root', standalone: true, template: '<router-outlet />' })
export class AppComponent {
constructor() { inject(ThemeService).initFromPreference(); }
}
That single call respects the OS prefers-color-scheme, applies data-theme to <html> via the DOCUMENT token (SSR-safe), and keeps its own matchMedia listener so the UI follows the OS live.
⚠️ It does NOT persist, despite its docstrings. Verified against shipped 5.1.0:
initFromPreference()claims to readlocalStoragefirst andsetTheme()/toggleTheme()claim to persist, but the class never toucheslocalStorage— a manual toggle is lost on reload. If the user needs a toggle that survives reload, add persistence around the service (cometchat-angular-v5-core/references/theming.md) rather than replacing it; a secondmatchMedialistener will drift fromcurrentTheme().
Toggle: themeService.toggleTheme() — do not compute the next value yourself. Set a specific mode: themeService.setTheme('dark'). Read: themeService.currentTheme() — a signal, so it works directly in templates.
Divergence from the docs.
{DOCS_BASE}/ui-kit/angular/customization/theming.mddocumentssetTheme(),toggleTheme()and settingdata-themeby hand, but does not mentioninitFromPreference()or following the OSprefers-color-scheme.initFromPreference()is real and verified against the installed 5.1.0 kit — prefer it over a hand-writtenmatchMedialistener. Do not "correct" it away because the guide omits it; the omission is a docs gap, not evidence the method is wrong.
Do not hand-roll a
matchMedia('(prefers-color-scheme: dark)')listener. That is the React recipe; React's kit cannot read the OS. Angular's can, and duplicating it creates state that drifts fromcurrentTheme().
CometChatLocalize ships 19 languages. Set the language once at startup; the TranslatePipe and getLocalizedString() read from it. To override individual strings or add a language, fetch {DOCS_BASE}/ui-kit/angular/customization/localization.md — the override shape is version-specific and worth reading rather than guessing.
Per-component inputs, not global CSS: lastMessageDateTimeFormat (conversations), messageSentAtDateTimeFormat (search), callInitiatedDateTimeFormat (call logs), lastActiveAtDateTimeFormat (message header). Pipes CalendarDatePipe, MessageDatePipe and ConversationDatePipe are exported if you need the same formatting in your own markup.
COMETCHAT_GLOBAL_CONFIG is an injection token for app-wide kit defaults. Prefer it over repeating the same input on every component instance. Details: {DOCS_BASE}/ui-kit/angular/customization/global-config.md.
Replacing markup rather than styling it is a view slot — itemView, titleView, subtitleView, leadingView, trailingView, headerView, emptyView, errorView, loadingView. See cometchat-angular-v5-components. Override the smallest slot that does the job.
What to check and why: cometchat-onboarding/references/clone-mode.md → Message chrome. This is the Angular how-to.
Kit default: avatar and sender name on every LEFT-aligned (incoming) message, in 1:1 chats AND groups; your own messages sit on the right with neither. The bubble's rule is alignment === left with no group check (shouldShowLeadingView / shouldShowHeaderView in CometChatMessageBubbleComponent); call and action rows are centered and never get them.
When the target shows avatars and names (Slack, Discord, Teams), do BOTH steps yourself, without asking. Together they put your avatar and name on every message, own and others', in 1:1 chats and groups:
[messageAlignment]="align" with align = MessageListAlignment.left on <cometchat-message-list>. Everything moves left, so your own messages get the avatar and name too. The enum is numeric (left = 0, standard = 1); the docs' [messageAlignment]="'left'" is a strict-template error (TS2322) and would not match at runtime anyway.leadingView (avatar) and headerView (name) through MessageBubbleConfigService (root singleton; setGlobalViews covers every message type). A registered slot renders even on right-aligned bubbles, so this also works if the target keeps your own messages on the right, and it is where the target's own avatar size and name style go:import { Component, Input, OnDestroy, OnInit, TemplateRef, ViewChild, inject } from '@angular/core';
import type { BaseMessage, Group, User } from '@cometchat/chat-sdk-javascript';
import { CometChatAvatarComponent, CometChatMessageListComponent, MessageBubbleConfigService, MessageListAlignment } from '@cometchat/chat-uikit-angular';
@Component({
selector: 'app-channel-messages',
standalone: true,
imports: [CometChatMessageListComponent, CometChatAvatarComponent],
template: `
<cometchat-message-list [user]="user" [group]="group" [messageAlignment]="align" />
<ng-template #senderAvatar let-m>
<cometchat-avatar [image]="m.getSender()?.getAvatar() ?? ''" [name]="m.getSender()?.getName() ?? ''" />
</ng-template>
<ng-template #senderName let-m><span class="cc-sender-name">{{ m.getSender()?.getName() }}</span></ng-template>
`,
})
export class ChannelMessagesComponent implements OnInit, OnDestroy {
@Input() user?: User;
@Input() group?: Group;
readonly align = MessageListAlignment.left;
@ViewChild('senderAvatar', { static: true }) senderAvatar!: TemplateRef<{ $implicit: BaseMessage }>;
@ViewChild('senderName', { static: true }) senderName!: TemplateRef<{ $implicit: BaseMessage }>;
private readonly bubbles = inject(MessageBubbleConfigService);
// static: true -> the templates exist in ngOnInit, before the list renders its first bubble.
ngOnInit(): void { this.bubbles.setGlobalViews({ leadingView: this.senderAvatar, headerView: this.senderName }); }
// Root singleton: clear on destroy, or every other message list keeps a dead template.
ngOnDestroy(): void { this.bubbles.setGlobalViews({ leadingView: null, headerView: null }); }
}
The slot context is { $implicit: message }. Style .cc-sender-name from your token source (e.g. font: 600 15px var(--cometchat-font-family)). Multi-attachment batches show the avatar and name once by themselves (the list passes hideAvatar / hideSenderName to the follow-on bubbles, which also hides your slot). hideAvatar on the list, or hideAvatar in COMETCHAT_GLOBAL_CONFIG, still wins over the slot; check both are unset. Service API: {DOCS_BASE}/ui-kit/angular/components/cometchat-message-list.md (MessageBubbleConfigService section).
.d.ts (5.1.0 and 5.2.0 identical); snippet compiles with ng build strictTemplates + strict TS. Not yet run in a browser: open a 1:1 chat and a group and check your own and others' messages.ThemeService.initFromPreference() already does it.itemView for a colour change — loses selection, presence and receipts.!important wars — the stylesheet is not registered, or the rule is out of cascade.ThemeService plus your own data-theme writer; they drift.Brand colours apply in both themes · dark mode survives a reload ONLY if you persisted the choice yourself (the kit does not — see the warning above); without that, a reload falls back to the OS setting · the OS theme is respected on first load · localized strings render · overridden regions keep click, presence and receipts working.
Tell the developer what changed, naming the files: what you themed — which tokens changed and whether light/dark follows the OS. Flag anything dev-only as dev-only, and say what you did not touch — this is additive.
Then offer these THREE options as a SELECTABLE choice and WAIT for the pick — never auto-continue (RULES.md §19):
features.angular-v5.json, or deeper structural customization via view slots. Never offer an auto entry (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.cometchat-angular-v5-features.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'./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