Monitor chat usage, message metrics, and real-time events using REST APIs, webhooks, and client-side error monitoring.
- GitHub stars
- 171
- Files
- 1
- Last commit
- Oct 15, 2026
- License
- MIT
- Allowed tools
- —
What does the cometchat-analytics skill do?
cometchat-analytics monitors chat usage, message metrics, and real-time events using REST APIs, webhooks, and client-side error monitoring.
Summary generated from the skill's SKILL.md.
About the cometchat-analytics skill
Monitoring chat engagement and system health is what developers achieve using this skill. It provides visibility into product analytics like daily active users and message volume through the Metrics REST API. It also enables real-time data streaming by sending message, user, group, and call events to external data warehouses or observability platforms via webhooks.
An agent should load this skill when a user needs to build dashboards, track delivery success, or feed chat events into stacks like Datadog, BigQuery, or Segment. The skill relies on server-side REST API keys for aggregate metrics and HTTPS endpoints for webhook processing. For on-premise deployments, it integrates with Prometheus, Grafana, and Loki to provide centralized logging and service metrics.
Beyond server-side data, the skill addresses client-side health by monitoring the initialization and login paths. It helps identify render errors and connection drops through SDK listeners and error boundaries. This multi-layered approach ensures that developers can distinguish between high-level usage trends and specific technical failures in the chat experience.
What an agent can do with it
- 1Stream real-time events to a warehouseDevelopers can send every chat event to a data lake or observability sink using webhooks.
- 2Monitor client-side connection healthAn agent can help identify when users experience login failures or websocket connection drops.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the cometchat-analytics skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the cometchat-analytics skill in Plugin
/plugin marketplace add cometchat/cometchat-skills /plugin install cometchat-skills@cometchat
Install the cometchat-analytics skill in Claude Code
~/.claude/skills/cometchat-analytics/SKILL.md
$ npx degit cometchat/cometchat-skills/skills/cometchat-analytics ~/.claude/skills/cometchat-analyticsInstall the cometchat-analytics skill in Claude Code (project)
.claude/skills/cometchat-analytics/SKILL.md
$ npx degit cometchat/cometchat-skills/skills/cometchat-analytics .claude/skills/cometchat-analyticsInstall the cometchat-analytics skill in Codex
~/.agents/skills/cometchat-analytics/SKILL.md
$ npx degit cometchat/cometchat-skills/skills/cometchat-analytics ~/.agents/skills/cometchat-analyticsInstall the cometchat-analytics skill in Gemini CLI
~/.gemini/skills/cometchat-analytics/SKILL.md
$ npx degit cometchat/cometchat-skills/skills/cometchat-analytics ~/.gemini/skills/cometchat-analyticsInstall the cometchat-analytics skill in Claude.ai
npx degit cometchat/cometchat-skills/skills/cometchat-analytics cometchat-analytics && zip -r cometchat-analytics.zip cometchat-analytics # claude.ai → Customize → Skills → + → Create skill → Upload a skill → cometchat-analytics.zip
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work · What to fix for more points
- Source repository linked and reachablecometchat/cometchat-skills/skills/cometchat-analytics is public and reachablegithub.com/cometchat/cometchat-skills/tree/HEAD/skills/comet ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-10-15github.com/cometchat/cometchat-skills/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/cometchat/cometchat-skills/blob/HEAD/skills/comet ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/cometchat/cometchat-skills/blob/HEAD/skills/comet ↗Pass
- SKILL.md follows the Agent Skills formatthe description does not say when to use the skillgithub.com/cometchat/cometchat-skills/blob/HEAD/skills/comet ↗Finding
SKILL.md
View on GitHubGround truth: shapes are FETCHED from the live docs —
{DOCS_BASE}/rest-api/metrics/usage-metrics,/rest-api/metrics/message-metrics,/fundamentals/webhooks(+/rest-api/management-apis/webhooks/overview),/notifications/logs,/rest-api/calls-apis/get-call, and on-prem/on-premise-deployment/docker/monitoring.DOCS_BASE = https://www.cometchat.com/docs; append.md. Verify each metric field / event name against the docs before charting it; don't invent a metric.
Use this skill when
You need visibility into chat: product analytics (DAU, messages, retention), an ops/observability signal (delivery, errors, latency), or feeding chat events into an existing warehouse/monitoring stack.
Three layers of visibility
| Layer | Source | Use it for |
|---|---|---|
| Aggregate metrics | Metrics REST API (usage + message) | dashboards, MAU/DAU, message volume, growth |
| Real-time events | Webhooks | stream every message/user/group/call event to your pipeline |
| Client health | your error monitor + the kit's error boundary/listeners | init/login failures, render errors, UX latency |
1. Aggregate metrics (REST, server-side)
- Usage metrics (
{DOCS_BASE}/rest-api/metrics/usage-metrics) — active users and usage over time. - Message metrics (
{DOCS_BASE}/rest-api/metrics/message-metrics) — message volume/counts. - Call metrics — per-call detail incl. participant metrics via
{DOCS_BASE}/rest-api/calls-apis/get-call. Call these from a server job with the REST API Key (never client-side), on a schedule, into your BI tool. Fetch the exact query params + response fields from each page before building the report.
2. Real-time events → your stack (webhooks)
Webhooks POST an HTTPS notification to your server on message / user / group / call events ({DOCS_BASE}/fundamentals/webhooks; configure via /rest-api/management-apis/webhooks/overview). This is how you get chat into Segment / BigQuery / Snowflake / Datadog / a data lake in real time:
- Stand up an HTTPS endpoint (returns 200 to ack). Secure it with the Basic Auth credentials CometChat sends on every webhook request (
{DOCS_BASE}/fundamentals/webhooks— the docs describe Basic Auth only, with no payload-signature scheme, so validate theAuthorizationheader rather than looking for an HMAC signature). - Subscribe to the events you need (don't fan out everything if you only need message.sent).
- Transform + forward to your warehouse/observability sink; make the handler idempotent and fast (queue heavy work).
The same webhook stream doubles as a tamper-evident audit log for
cometchat-compliance.
3. Client-side error & performance monitoring (per family)
The metrics API won't tell you a user's chat failed to load — instrument the client:
- Capture kit render errors — on the React families via the error boundary's hook (React v7:
CometChatErrorBoundaryonError; Angular/RN have the equivalent); on iOS/Android/Flutter (no error-boundary construct) via the SDK error listeners / the kit's error-state views. Forward to Sentry/Datadog with context. - Instrument the critical path — wrap init, the token fetch, and login in spans/breadcrumbs; a spike in login failures is your earliest incident signal (often Region or token issues).
- Listen for connection state — the SDK's connection/websocket listeners tell you when clients drop; count reconnects.
- Don't log secrets or message bodies to your monitor — log UIDs/event types/latencies, not content (privacy +
cometchat-compliance). Wire these through the resolved family's-core/-production/-troubleshootingskills.
4. Delivery & call logs
- Push delivery logs (
{DOCS_BASE}/notifications/logs) — FCM/APNs/email/SMS delivery, ~14-day retention; enable when diagnosing "notifications not arriving" and export before they age out. - Call logs — the Calls REST APIs for per-call quality/participant metrics.
5. Self-host observability
On-prem ships Prometheus + Grafana + Loki + Promtail ({DOCS_BASE}/on-premise-deployment/docker/monitoring): service metrics, dashboards, alerts, and centralized logs — wire alerts (P95 latency, error rate, WS capacity) to your on-call. SaaS customers use the Metrics API + webhooks instead.
Common pitfalls
- Metrics API called client-side — it needs the REST API Key; server only.
- Webhook handler slow or non-idempotent — retries pile up; ack fast, queue the work, dedupe.
- Charting an invented metric — fetch the real fields from the metrics pages.
- Logging message content to your monitor — privacy/compliance risk; log metadata, not bodies.
- No client error monitoring — you'll hear about outages from users, not dashboards; wire the error boundary + login-path spans.
- Relying on push logs after they age out — export within the retention window.
Verify it works
Usage/message metrics return real numbers into your dashboard · a test message triggers your webhook and lands in your warehouse/monitor · a forced init/login failure shows up in your error monitor with context · push/call logs are readable when needed · (on-prem) Grafana shows the services and alerts fire.
Files in this skill
1cometchat-analytics skill questions
How do I install the cometchat-analytics skill in Claude Code?
Run npx degit cometchat/cometchat-skills/skills/cometchat-analytics ~/.claude/skills/cometchat-analytics. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the cometchat-analytics skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How can I stream chat events to my data warehouse in real time?
You can use webhooks to POST HTTPS notifications for message, user, group, or call events directly to your pipeline, such as BigQuery, Snowflake, or Datadog.
Where should I call the Metrics REST API from?
The Metrics REST API must be called from a server-side job using your REST API Key; it should never be called from the client-side.