@cometchat/skills-cli
CLI for the CometChat Skills v2 architecture. Detect, view, apply, verify, and manage CometChat React UI Kit integrations from the command line.
npx @cometchat/skills-cli@latest detect
Why this exists
CometChat Skills v1 was 5500+ lines of agent-readable Markdown that walked AI assistants through React UI Kit integrations. v2 moves the logic into this CLI, leaving the skill files as ~30-line glue that just calls these commands. Result: 92% smaller skills, deterministic behavior, idempotent re-runs, transactional file writes, and shared logic across every supported AI agent.
Commands
cometchat detect [path] | Fingerprint a project: framework, version, router, env prefix, credentials, existing integration |
cometchat experiences | List the 3 chat experiences and their metadata |
cometchat view --experience N --framework F | Pure dry-run preview of apply |
cometchat apply --experience N --framework F | Perform the integration. Transactional. Idempotent. |
cometchat install | Install the deps the integration needs (auto-detects pnpm/npm/yarn/bun) |
cometchat verify | Run AST checks: css imports, init order, no auth key in source, error UI |
cometchat info | Drift detection via SHA-256 checksums |
cometchat uninstall [--force] | Remove only the files this integration owns |
All commands accept --json for machine-readable output.
Quick start
npx @cometchat/skills-cli@latest detect --json
npx @cometchat/skills-cli@latest view --experience 1 --framework reactjs
npx @cometchat/skills-cli@latest apply --experience 1 --framework reactjs --auto-install
npx @cometchat/skills-cli@latest verify
npx @cometchat/skills-cli@latest info
Frameworks supported
- React.js (Vite or CRA)
- Next.js (App Router or Pages Router, 13/14/15/16)
- React Router (v6 library mode + v7 framework mode)
- Astro (React islands with
client:only="react")
Each framework × experience (1-3) ships with a registry template at @cometchat/skills-registry.
Safety guarantees
- Transactional writes — apply either succeeds completely or rolls back. No partial integrations.
- Refuse-to-overwrite — apply will not silently replace files that contain user code. Pass
--force-overwrite to override.
- Idempotency — re-running apply with the same arguments is a safe no-op.
- Drift detection —
info re-checksums every owned file and reports user edits.
- Clean uninstall —
uninstall only removes files in .cometchat/state.json's files_owned list.
License
MIT — © CometChat
Repository
Source + tests + roadmap live at https://github.com/cometchat-team/cometchat-skills