@cometchat/skills-cli
v2.0.4
Published
CLI for the CometChat skills v2 architecture — detect, view, apply, verify CometChat integrations in React projects.
Readme
@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 detectWhy 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
| Command | Purpose |
|---|---|
| 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
# 1. Auto-detect your project
npx @cometchat/skills-cli@latest detect --json
# 2. Preview the integration without writing anything
npx @cometchat/skills-cli@latest view --experience 1 --framework reactjs
# 3. Apply + auto-install in one command
npx @cometchat/skills-cli@latest apply --experience 1 --framework reactjs --auto-install
# 4. Verify the integration
npx @cometchat/skills-cli@latest verify
# 5. Check status anytime
npx @cometchat/skills-cli@latest infoFrameworks 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-overwriteto override. - Idempotency — re-running apply with the same arguments is a safe no-op.
- Drift detection —
infore-checksums every owned file and reports user edits. - Clean uninstall —
uninstallonly removes files in.cometchat/state.json'sfiles_ownedlist.
License
MIT — © CometChat
Repository
Source + tests + roadmap live at https://github.com/cometchat-team/cometchat-skills
