[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MFM0X98ZM3B2W593FMMGFC":3,"skill-same:01M6MFM0X98ZM3B2W593FMMGFC":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M6MFM0X98ZM3B2W593FMMGFC","cometchat-react-v7-push",null,"Add web push notifications to a React app with the CometChat v7 SDK — FCM via Firebase, registered through CometChatNotifications, with the Dashboard FCM provider as the sender. THIN + docs-first: the full setup is FETCHED from CometChat's notifications docs; this skill bakes only the hardening deltas + the token lifecycle. Triggers: 'add push notifications', 'web push', 'FCM push', 'notify on new message when app closed', 'cometchat push react'.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-push\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"cometchat react v7 push","push","react","cometchat","when","new","push notifications","uikit","triggers","firebase","lifecycle","provider","as","add","full","token","message","dashboard","notifications","only","notify","deltas","app","2026-11-10 10:12:30",false,"---\nname: cometchat-react-v7-push\ndescription: \"Add web push notifications to a React app with the CometChat v7 SDK — FCM via Firebase, registered through CometChatNotifications, with the Dashboard FCM provider as the sender. THIN + docs-first: the full setup is FETCHED from CometChat's notifications docs; this skill bakes only the hardening deltas + the token lifecycle. Triggers: 'add push notifications', 'web push', 'FCM push', 'notify on new message when app closed', 'cometchat push react'.\"\nlicense: \"MIT\"\ncompatibility: \"React >=18; @cometchat\u002Fchat-uikit-react ^7 (7.2.x); @cometchat\u002Fchat-sdk-javascript ^4.1.9 (ships CometChatNotifications); firebase ^10.3.1 (FCM web SDK)\"\nmetadata:\n  author: \"CometChat\"\n  version: \"1.0.0\"\n  tags: \"cometchat react push notifications fcm firebase web v7\"\n---\n\n> **Ground truth — DOCS-FIRST.** Push is an EXTERNAL integration (Firebase\u002FFCM + a service worker + a Dashboard FCM provider), not a UI Kit component. The full, current setup lives in **CometChat's notifications docs — FETCH them, don't bake a recipe here**: via `cometchat-react-v7-core\u002Freferences\u002Fdocs-map.md` → `\u002Fnotifications\u002Fpush-overview` · `\u002Fnotifications\u002Fweb-push-notifications` · `\u002Fnotifications\u002Fpreferences`. This skill is THIN: it points you at those docs as the SOURCE and bakes ONLY the hardening deltas + the exact SDK symbols (verified vs installed `@cometchat\u002Fchat-sdk-javascript`). **Symbols are baked; the step-by-step is fetched.**\n\n## Companion skills (read first)\n- `cometchat-react-v7-core` — install, credentials, `init→login→render`. This skill ASSUMES it (push registers AFTER login, on the SAME SDK).\n\n## Use this skill when\n\"add push notifications\", \"web push\", \"notify me on a new message when the app is closed\", \"FCM push\". For a NON-web platform (Android\u002FiOS\u002FRN\u002FFlutter) push differs — that's not this skill.\n\n## Build it — FETCH the docs, then apply the deltas\n1. **FETCH the setup from the docs** (source of truth): `{DOCS_BASE}\u002Fnotifications\u002Fweb-push-notifications.md` (+ `push-overview.md`) via `docs-map.md`. Follow its Firebase project + FCM setup, the `firebase-messaging-sw.js` service worker, and the client registration flow. **Build FROM the docs; if the docs are wrong\u002Fmissing a detail, that's a DOCS gap — flag it (RULES §20), don't bake a permanent workaround.**\n2. **Dashboard prerequisite:** set up the **FCM provider in the CometChat Dashboard** (it is the SENDER). Self-hosted VAPID \u002F a custom webhook is NOT the v7 web path. Confirm this is done or push delivers nothing.\n3. **Install:** `npm i firebase@^10.3.1` (the FCM web SDK). `CometChatNotifications` ships with the already-installed `@cometchat\u002Fchat-sdk-javascript` — no extra CometChat package.\n\n## Baked SDK symbols (verified vs installed SDK 4.2.1 — do NOT guess these)\n```ts\nimport { CometChat, CometChatNotifications } from \"@cometchat\u002Fchat-sdk-javascript\";\n\u002F\u002F Register AFTER login, with the FCM token you got from firebase getToken():\nawait CometChatNotifications.registerPushToken(\n  fcmToken,                                    \u002F\u002F string — from firebase messaging getToken({ vapidKey })\n  CometChatNotifications.PushPlatforms.FCM_WEB,   \u002F\u002F enum member\n  providerId                                   \u002F\u002F optional — your Dashboard FCM provider id\n);\n\u002F\u002F On logout (before CometChatUIKit.logout()):\nawait CometChatNotifications.unregisterPushToken();\n```\n> Signature (installed source): `registerPushToken(pushToken: string, platform: PushPlatforms, providerId?: string)` · `unregisterPushToken()`. Fetch anything beyond these from the notifications docs.\n\n## Hardening deltas (BAKED — the things the docs tend to under-emphasize)\n- **Service-worker placement is per-bundler.** `firebase-messaging-sw.js` must be served from the ORIGIN ROOT: **Vite \u002F CRA → `public\u002Ffirebase-messaging-sw.js`** (copied to the web root); **Next.js → `public\u002Ffirebase-messaging-sw.js`** (App or Pages router); **Astro → `public\u002Ffirebase-messaging-sw.js`**. A SW under `src\u002F` or a hashed asset path will NOT register. HTTPS (or `localhost`) is required.\n- **Request permission ON A USER GESTURE, not on load.** Call `Notification.requestPermission()` from a click\u002Ftap (a browser blocks\u002Fannoys otherwise). Only call `getToken()` after permission is `granted`.\n- **Token lifecycle = tie it to login\u002Flogout.** `registerPushToken(...)` AFTER `CometChatUIKit.login()` resolves; `unregisterPushToken()` BEFORE `CometChatUIKit.logout()`. Re-register on token refresh (`onTokenRefresh`\u002F`getToken` again). Skipping unregister on logout leaks notifications to the wrong user.\n- **iOS web push is PWA-only.** On iOS\u002FiPadOS, web push works ONLY in an **installed PWA** (Add to Home Screen) on **iOS 16.4+** — not in a normal Safari tab. Tell the user; don't promise Safari-tab push on iOS.\n- **The Dashboard FCM provider is the sender.** No self-hosted VAPID server \u002F webhook for v7 web — configure the provider in the Dashboard (step 2).\n\n## Common pitfalls (BAKED)\n- SW not at the origin root → registration silently fails, no push. · Requesting permission on load → blocked\u002Fdenied. · Forgetting `unregisterPushToken()` on logout → cross-user leakage. · Expecting Safari-tab push on iOS. · No Dashboard FCM provider → nothing delivers even with correct client code.\n\n## Verify it works (honest — push can't be auto-smoked)\nStatic verification only: the SDK symbols resolve + the app compiles + the SW registers (check the browser Application → Service Workers). **Live delivery is a manual, device-dependent check** (real HTTPS origin + a registered SW + the Dashboard FCM provider + `granted` permission → send a message with the app backgrounded). This is the one skill whose live gate is inherently **blocked-external** — do NOT claim delivery works from a build alone.\n\n## Close (after it builds)\nEnd with the shared 3-option selectable menu and WAIT for the pick — **(1) add another feature** (suggest a few not-yet-wired) · **(2) customize theming** · **(3) test it manually** (stop; let the user check). Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).\n","> **Ground truth — DOCS-FIRST.** Push is an EXTERNAL integration (Firebase\u002FFCM + a service worker + a Dashboard FCM provider), not a UI Kit component. The full, current setup lives in **CometChat's notifications docs — FETCH them, don't bake a recipe here**: via `cometchat-react-v7-core\u002Freferences\u002Fdocs-map.md` → `\u002Fnotifications\u002Fpush-overview` · `\u002Fnotifications\u002Fweb-push-notifications` · `\u002Fnotifications\u002Fpreferences`. This skill is THIN: it points you at those docs as the SOURCE and bakes ONLY the hardening deltas + the exact SDK symbols (verified vs installed `@cometchat\u002Fchat-sdk-javascript`). **Symbols are baked; the step-by-step is fetched.**\n\n## Companion skills (read first)\n- `cometchat-react-v7-core` — install, credentials, `init→login→render`. This skill ASSUMES it (push registers AFTER login, on the SAME SDK).\n\n## Use this skill when\n\"add push notifications\", \"web push\", \"notify me on a new message when the app is closed\", \"FCM push\". For a NON-web platform (Android\u002FiOS\u002FRN\u002FFlutter) push differs — that's not this skill.\n\n## Build it — FETCH the docs, then apply the deltas\n1. **FETCH the setup from the docs** (source of truth): `{DOCS_BASE}\u002Fnotifications\u002Fweb-push-notifications.md` (+ `push-overview.md`) via `docs-map.md`. Follow its Firebase project + FCM setup, the `firebase-messaging-sw.js` service worker, and the client registration flow. **Build FROM the docs; if the docs are wrong\u002Fmissing a detail, that's a DOCS gap — flag it (RULES §20), don't bake a permanent workaround.**\n2. **Dashboard prerequisite:** set up the **FCM provider in the CometChat Dashboard** (it is the SENDER). Self-hosted VAPID \u002F a custom webhook is NOT the v7 web path. Confirm this is done or push delivers nothing.\n3. **Install:** `npm i firebase@^10.3.1` (the FCM web SDK). `CometChatNotifications` ships with the already-installed `@cometchat\u002Fchat-sdk-javascript` — no extra CometChat package.\n\n## Baked SDK symbols (verified vs installed SDK 4.2.1 — do NOT guess these)\n```ts\nimport { CometChat, CometChatNotifications } from \"@cometchat\u002Fchat-sdk-javascript\";\n\u002F\u002F Register AFTER login, with the FCM token you got from firebase getToken():\nawait CometChatNotifications.registerPushToken(\n  fcmToken,                                    \u002F\u002F string — from firebase messaging getToken({ vapidKey })\n  CometChatNotifications.PushPlatforms.FCM_WEB,   \u002F\u002F enum member\n  providerId                                   \u002F\u002F optional — your Dashboard FCM provider id\n);\n\u002F\u002F On logout (before CometChatUIKit.logout()):\nawait CometChatNotifications.unregisterPushToken();\n```\n> Signature (installed source): `registerPushToken(pushToken: string, platform: PushPlatforms, providerId?: string)` · `unregisterPushToken()`. Fetch anything beyond these from the notifications docs.\n\n## Hardening deltas (BAKED — the things the docs tend to under-emphasize)\n- **Service-worker placement is per-bundler.** `firebase-messaging-sw.js` must be served from the ORIGIN ROOT: **Vite \u002F CRA → `public\u002Ffirebase-messaging-sw.js`** (copied to the web root); **Next.js → `public\u002Ffirebase-messaging-sw.js`** (App or Pages router); **Astro → `public\u002Ffirebase-messaging-sw.js`**. A SW under `src\u002F` or a hashed asset path will NOT register. HTTPS (or `localhost`) is required.\n- **Request permission ON A USER GESTURE, not on load.** Call `Notification.requestPermission()` from a click\u002Ftap (a browser blocks\u002Fannoys otherwise). Only call `getToken()` after permission is `granted`.\n- **Token lifecycle = tie it to login\u002Flogout.** `registerPushToken(...)` AFTER `CometChatUIKit.login()` resolves; `unregisterPushToken()` BEFORE `CometChatUIKit.logout()`. Re-register on token refresh (`onTokenRefresh`\u002F`getToken` again). Skipping unregister on logout leaks notifications to the wrong user.\n- **iOS web push is PWA-only.** On iOS\u002FiPadOS, web push works ONLY in an **installed PWA** (Add to Home Screen) on **iOS 16.4+** — not in a normal Safari tab. Tell the user; don't promise Safari-tab push on iOS.\n- **The Dashboard FCM provider is the sender.** No self-hosted VAPID server \u002F webhook for v7 web — configure the provider in the Dashboard (step 2).\n\n## Common pitfalls (BAKED)\n- SW not at the origin root → registration silently fails, no push. · Requesting permission on load → blocked\u002Fdenied. · Forgetting `unregisterPushToken()` on logout → cross-user leakage. · Expecting Safari-tab push on iOS. · No Dashboard FCM provider → nothing delivers even with correct client code.\n\n## Verify it works (honest — push can't be auto-smoked)\nStatic verification only: the SDK symbols resolve + the app compiles + the SW registers (check the browser Application → Service Workers). **Live delivery is a manual, device-dependent check** (real HTTPS origin + a registered SW + the Dashboard FCM provider + `granted` permission → send a message with the app backgrounded). This is the one skill whose live gate is inherently **blocked-external** — do NOT claim delivery works from a build alone.\n\n## Close (after it builds)\nEnd with the shared 3-option selectable menu and WAIT for the pick — **(1) add another feature** (suggest a few not-yet-wired) · **(2) customize theming** · **(3) test it manually** (stop; let the user check). Same contract as the `cometchat-react-v7-core` close (`RULES.md` §19).\n",{"name":5,"license":15,"metadata":52,"description":7,"compatibility":56},{"tags":53,"author":54,"version":55},"cometchat react push notifications fcm firebase web v7","CometChat","1.0.0","React >=18; @cometchat\u002Fchat-uikit-react ^7 (7.2.x); @cometchat\u002Fchat-sdk-javascript ^4.1.9 (ships CometChatNotifications); firebase ^10.3.1 (FCM web SDK)","main","cebc3dce495d7eb80d3b1d5841f877a4a92e162d","plugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-push",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-push",{"tool":73,"command":74},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-push",{"tool":76,"command":77},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill cometchat-react-v7-push","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fcometchat\u002Fcometchat-skills\u002Fskills\u002Fcometchat-react-v7-push\u002FSKILL.md",true,[],[82,91,99,107,115,123],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":90},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":90},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":90},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":90},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":90},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":90},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]