cometchat-audit
Ground truth: the authority for "correct" is
RULES.md+ the resolved family's skills (cometchat-<family>-core/-production/-troubleshooting) and the offline probenpx @cometchat/skills detect --json. Verify every symbol/prop you flag against the family catalog + docs (via-core/references/docs-map.md); never flag from memory. This is a read-only review — produce the report first; only change code if the user says so (then hand each fix to the owning skill).
Use this skill when
Someone wants an existing CometChat integration checked — before a launch, a security review, an upgrade, or a "why is this flaky / is this safe" question. It is the proactive complement to the per-family troubleshooting skills (cometchat-<family>-troubleshooting, which react to a specific symptom).
How to run the audit
- Detect —
npx @cometchat/skills detect --json: framework, installed UI Kit,version_conflict,existing_cometchat. Resolve<family>frompeers.yaml. If nothing is detected, say so and stop (nothing to audit). - Read the integration — the init/login/lifecycle file, where the surface renders, the env/secret files, the server token endpoint (if any), and any custom message/theme/feature code. Do NOT read
node_modules/.d.ts. - Score each check below, gather evidence (
file:line), and write a ranked report — most severe first — with, per finding, the fix and the skill that owns it. Then offer to apply fixes; don't auto-edit.
The checklist
Security (highest severity)
- Auth Key present in client code / bundle / binary? → critical; must move to server-minted tokens (
cometchat-security,cometchat-<family>-production). - Token endpoint deriving the UID from a client parameter (
?uid=)? → impersonation. - REST API Key anywhere client-side or in the repo? → critical.
- Sessions revocable on offboarding (flush tokens)? RBAC roles configured, or everyone on
default? (cometchat-security.)