/cometchat-skills:cometchat-angular-v5-placementfrom cometchat-skills
Guides placement of CometChat UI components in Angular apps — chat shell layout, thread/details panels, search, routing, and responsive mobile fallback. Activates on layout and routing requests.
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-angular@5(5.1.0–5.2.2 verified). Uses only components in theangular-v5catalog. The layouts here are built FROM the live task guides —{DOCS_BASE}/ui-kit/angular/guides/new-chat.md,/guides/group-chat.md,/guides/threaded-messages.md,/guides/search-messages.md, plus/angular-conversation,/angular-one-to-one-chat,/angular-tab-based-chatand/api-reference/chat-state-service.md; base + paths incometchat-angular-v5-core/references/docs-map.md. Fetch layout-specific inputs from the component's.mdtwin rather than reading the installed bundle. APPEND to the user's app — additive only (RULES.md).
cometchat-angular-v5-core — install, credentials, init→login→render, and references/layout.md for the sizing rules this skill assumes.cometchat-angular-v5-components — which component to use and its real inputs/outputs.Deciding where chat lives: a dedicated route, a panel inside an existing dashboard, a widget, or the full multi-pane app.
| Ask | Placement | Recipe |
|---|---|---|
| "add chat to my app" (unscoped) | Core surface — list + message pane, thread and search as panels | references/core-surface.md |
| "the whole chat app" — users, groups, calls, details | Combined app — tabbed selector + panels | references/combined-app.md |
| "chat inside my dashboard" | Embed the core surface in an existing layout slot | below |
| "a support widget" | Single conversation — header + list + composer, no list pane | below |
Default to the core surface for an unscoped request. Grow to the combined app only when asked.
Angular ships an injectable source of truth for the active chat. It exposes signals and observables; prefer signals in templates. This is what satisfies "the selected row is visually reflected" and makes panel-close round-trip correctly.
import { Component, computed, inject } from '@angular/core';
import { CometChat } from '@cometchat/chat-sdk-javascript';
import { ChatStateService, CometChatUIKitConstants } from '@cometchat/chat-uikit-angular';
@Component({ selector: 'app-chat-shell', standalone: true, template: '' })
export class ChatShellComponent {
readonly chatState = inject(ChatStateService);
// The service's signals are `T | null`, but the kit's inputs are optional
// (`T | undefined`) — bind the raw signal and Angular's strict template check
// rejects it. Normalise once, here.
readonly activeUser = computed(() => this.chatState.activeUser() ?? undefined);
readonly activeGroup = computed(() => this.chatState.activeGroup() ?? undefined);
// (itemClick) emits a Conversation — resolve the subject, then branch on its TYPE.
// A Conversation has no getGuid(), so duck-typing routes groups into the user slot
// and the message pane throws "getUid is not a function". See references/core-surface.md.
open(conversation: CometChat.Conversation) {
const subject = conversation.getConversationWith();
if (conversation.getConversationType() === CometChatUIKitConstants.MessageReceiverType.group) {
this.chatState.setActiveGroup(subject as CometChat.Group);
} else {
this.chatState.setActiveUser(subject as CometChat.User);
}
}
closeChat() { this.chatState.clearActiveChat(); }
}
Available: activeUser activeGroup activeConversation (signals) · activeUser$ activeGroup$ activeConversation$ (observables) · setActiveUser/Group/Conversation · getActiveChatEntity() · clearActiveChat().
Keeping a separate selected field alongside this is how the two drift and the list stops highlighting the open conversation.
Thread, user/group details and search are additional columns in the same flex shell. Opening one must not resize or remount the message list, and closing must return to the exact prior layout.
<div class="cc-shell">
<aside class="cc-side"><!-- list --></aside>
<main class="cc-main"><!-- header · list · composer --></main>
<aside class="cc-panel" *ngIf="threadParent()"><!-- thread --></aside>
</div>
.cc-shell { display: flex; height: 100dvh; width: 100%; min-height: 0; overflow: hidden; }
.cc-side { width: 320px; min-height: 0; overflow: hidden; }
.cc-main { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.cc-panel { width: 360px; min-height: 0; overflow: hidden; border-left: 1px solid var(--cometchat-border-color-default); }
min-height: 0 on every column is required — see core's references/layout.md.
// app.routes.ts
import { Routes } from '@angular/router';
export const routes: Routes = [
{ path: 'chat', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) },
{ path: 'chat/:uid', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) },
];
Two rules:
takeUntil(destroy$) in ngOnDestroy, or navigating away leaks listeners that keep firing.Reading :uid into the active chat belongs in the component's ngOnInit, resolved through ChatStateService.
Give the host slot a resolved height and let the shell fill it — do not put the kit inside a container sized by its content.
.dashboard-chat-slot { height: calc(100dvh - var(--app-header-height)); min-height: 0; display: flex; }
If the surrounding app uses transform or filter on an ancestor, the height chain breaks — core's layout.md covers why.
Below ~768px show the list or the conversation, never both.
<div class="cc-shell">
<aside class="cc-side" [hidden]="isMobile() && hasActiveChat()"><!-- list --></aside>
<main class="cc-main" [hidden]="isMobile() && !hasActiveChat()"><!-- message pane --></main>
</div>
Drive [hidden] from the same ChatStateService state as the message components, and give the mobile conversation view a back control that calls clearActiveChat(). A multi-pane layout squeezed onto a phone is a defect, not a style choice.
selected field plus ChatStateService. They drift; the list stops highlighting.Clicking a conversation opens it AND highlights the row · opening a thread does not resize the message list · closing returns to the exact prior layout · navigating away and back does not duplicate messages · at 375px only one pane is visible with a working back control · no console errors.
Tell the developer what changed, naming the files: the layout you built — which panes exist, and how the mobile one-pane fallback behaves. 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 growing the surface — users/groups tabs, a details panel, calling. Never offer an auto entry (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.cometchat-angular-v5-customization.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