Cometchat Angular V5 Patterns logo

Cometchat Angular V5 Patterns

Organization
cometchat
cometchat-angular-v5-patterns

Angular project-shape glue for CometChat — Angular CLI vs Nx, standalone vs NgModule, environment file wiring, SSR/Angular Universal, lazy routes, and RxJS/signals state patterns. Triggers: 'add cometchat to my nx workspace', 'ngmodule not standalone', 'angular universal ssr', 'lazy load the chat route', 'window is not defined'.

Overview

Publishercometchat
Repositorycometchat-skills
Skill namecometchat-angular-v5-patterns
Stars
109
Forks
2
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by cometchat on GitHub. Read the source before you install it.

Installation

Install the Cometchat Angular V5 Patterns AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-angular-v5-patterns .claude/skills/cometchat-angular-v5-patterns
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cometchat Angular V5 Patterns in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cometchat Angular V5 Patterns on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cometchat Angular V5 Patterns is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ground truth: this skill is Angular PROJECT-SHAPE glue — CLI vs Nx, standalone vs NgModule, environment.ts, SSR, lazy routes. CometChat API surface belongs to cometchat-angular-v5-core; fetch any symbol via cometchat-angular-v5-core/references/docs-map.md. Where the Angular UI Kit docs genuinely do not cover a shape (SSR / Angular Universal), this file says so explicitly and marks the guidance as the pack's own — absence from the guide is never silently presented as documented.

Companion skills (read first)

  • cometchat-angular-v5-core — install, credentials, init→login→render. Assumed.
  • cometchat-angular-v5-placement — routing a chat page.

Use this skill when

The blocker is the project shape, not CometChat: a monorepo, NgModules, SSR, or where config lives.

Detect the shape first

SignalShapeDeltas
nx.json presentNx workspaceenv files, project-level styles, path aliases
angular.json + src/main.tsAngular CLIthe default; core's recipe applies as-is
app.module.ts presentNgModule appcomponents go in imports: of the module
server.ts / @angular/ssrSSR / Universalbrowser-only guards, see below

NgModule instead of standalone

The kit's components are standalone, which means an NgModule app imports them into the module's imports array — the same array, a different file:

ts
// app.module.ts
import { NgModule } from '@angular/core';
import { CometChatConversationsComponent, CometChatMessageListComponent } from '@cometchat/chat-uikit-angular';
import { ChatComponent } from './chat/chat.component';   // YOUR (non-standalone) component

@NgModule({
  declarations: [ChatComponent],
  imports: [CometChatConversationsComponent, CometChatMessageListComponent],
})
export class AppModule {}

Do not add them to declarations — they are not yours to declare, and Angular will error. Init moves from main.ts into an APP_INITIALIZER provider on the module.

Nx workspaces

Three things move:

  • Environment files live under the app project, e.g. apps/<app>/src/environments/environment.ts. fileReplacements go in that project's project.json, not a root angular.json.
  • The kit stylesheet is registered in the app project's build styles array with a workspace-root-relative path: node_modules/@cometchat/chat-uikit-angular/styles/css-variables.css.
  • Shared wrapper libs may re-export the kit's components; a lib that re-exports must also list them in its own imports, or consumers get the silent no-render.

Nx does not change the CometChat API at all — only where config lives.

SSR / Angular Universal

The kit is a browser client. The SDK touches window, localStorage and WebSockets, none of which exist on the server.

ts
import { Component, inject, PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { CometChatUIKit } from '@cometchat/chat-uikit-angular';
import { environment } from '../environments/environment';

@Component({ selector: 'app-root', standalone: true, template: '<router-outlet />' })
export class AppComponent {
  constructor() {
    if (isPlatformBrowser(inject(PLATFORM_ID))) {
      const { appId, region, authKey } = environment.cometchat;
      // init only in the browser — on the server this throws "window is not defined"
      CometChatUIKit.initFromSettings({
        appId, region,
        credentials: { authKey },
        chatSDK: { presenceSubscription: { type: 'ALL_USERS' } },
      });
    }
  }
}

Rules:

  • Guard every init/login call with isPlatformBrowser.
  • Render chat components client-side only (@defer on hydration, or an *ngIf on a browser flag). Server-rendering them produces markup that immediately mismatches.
  • ThemeService is already SSR-safe — it writes data-theme through the DOCUMENT token rather than touching document directly.
  • Do not attempt to prerender a chat route; there is nothing meaningful to prerender.

Not in the docs. The Angular UI Kit docs do not cover SSR / Angular Universal. The guards above are derived from what the SDK touches (window, localStorage, WebSockets) and are the pack's own guidance — absence from the guide is not a signal that they are unnecessary.

Lazy-loading the chat route

ts
{ path: 'chat', loadComponent: () => import('./chat/chat.component').then(m => m.ChatComponent) }

Lazy loading the route is fine and recommended — the kit is large. Init still happens once at bootstrap, not in the lazy chunk, or the first navigation pays for it and a second navigation re-runs it.

State — signals or RxJS, one of them

ChatStateService exposes both (activeUser signal, activeUser$ observable). Pick one style per component and stay in it; mixing produces two update paths for the same value.

  • Signals in templates: no subscription, no teardown, no async pipe.
  • Observables when composing with other streams: always takeUntil(destroy$) in ngOnDestroy.

Never mirror either into your own field — see placement's "two sources of truth" pitfall.

Common pitfalls

  1. Kit components in declarations → Angular error; they belong in imports.
  2. Unguarded init under SSRwindow is not defined at build or first request.
  3. Init inside a lazy chunk → runs late, or twice.
  4. Nx: env/styles edited at the workspace root → silently no effect; they belong to the app project.
  5. Signals and observables for the same value → two update paths, drifting UI.

Verify it works

ng build (and ng build --ssr where applicable) passes · chat renders in the browser · no window is not defined on the server · navigating to the lazy route once initialises once · config resolves in every configuration you build.

Frequently asked questions

What does the Cometchat Angular V5 Patterns AI skill do?

Angular project-shape glue for CometChat — Angular CLI vs Nx, standalone vs NgModule, environment file wiring, SSR/Angular Universal, lazy routes, and RxJS/signals state patterns. Triggers: 'add cometchat to my nx workspace', 'ngmodule not standalone', 'angular universal ssr', 'lazy load the chat route', 'window is not defined'.

Why use Cometchat Angular V5 Patterns on TypingMind?

Because you install it once and use it with any model. Cometchat Angular V5 Patterns is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cometchat Angular V5 Patterns in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-angular-v5-patterns. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cometchat Angular V5 Patterns?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cometchat Angular V5 Patterns?

As many as you like. As long as a model supports skills, you can use Cometchat Angular V5 Patterns with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cometchat Angular V5 Patterns AI skill free?

Yes. It is published on GitHub by cometchat under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇