@cometchat/skills 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/README.md +42 -2
  2. package/bin/install.js +448 -57
  3. package/package.json +1 -1
  4. package/skills/cometchat/SKILL.md +337 -80
  5. package/skills/cometchat-a11y/SKILL.md +476 -0
  6. package/skills/cometchat-android-v5/SKILL.md +1 -1
  7. package/skills/cometchat-android-v5-calls/SKILL.md +413 -0
  8. package/skills/cometchat-android-v5-calls/references/README.md +53 -0
  9. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +195 -0
  10. package/skills/cometchat-android-v5-calls/references/audio-controls.md +91 -0
  11. package/skills/cometchat-android-v5-calls/references/background-handling.md +168 -0
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +123 -0
  13. package/skills/cometchat-android-v5-calls/references/call-logs.md +113 -0
  14. package/skills/cometchat-android-v5-calls/references/call-session.md +274 -0
  15. package/skills/cometchat-android-v5-calls/references/custom-ui.md +150 -0
  16. package/skills/cometchat-android-v5-calls/references/event-listeners.md +123 -0
  17. package/skills/cometchat-android-v5-calls/references/group-calls.md +205 -0
  18. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +111 -0
  19. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +134 -0
  20. package/skills/cometchat-android-v5-calls/references/join-session.md +120 -0
  21. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +206 -0
  22. package/skills/cometchat-android-v5-calls/references/participant-management.md +110 -0
  23. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +106 -0
  24. package/skills/cometchat-android-v5-calls/references/raise-hand.md +242 -0
  25. package/skills/cometchat-android-v5-calls/references/recording.md +101 -0
  26. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +152 -0
  27. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +82 -0
  28. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +215 -0
  29. package/skills/cometchat-android-v5-calls/references/session-settings.md +121 -0
  30. package/skills/cometchat-android-v5-calls/references/setup.md +137 -0
  31. package/skills/cometchat-android-v5-calls/references/share-invite.md +151 -0
  32. package/skills/cometchat-android-v5-calls/references/video-controls.md +87 -0
  33. package/skills/cometchat-android-v5-calls/references/voip-calling.md +526 -0
  34. package/skills/cometchat-android-v5-components/SKILL.md +1 -1
  35. package/skills/cometchat-android-v5-core/SKILL.md +1 -1
  36. package/skills/cometchat-android-v5-customization/SKILL.md +1 -1
  37. package/skills/cometchat-android-v5-extensions/SKILL.md +1 -1
  38. package/skills/cometchat-android-v5-features/SKILL.md +1 -1
  39. package/skills/cometchat-android-v5-placement/SKILL.md +1 -1
  40. package/skills/cometchat-android-v5-production/SKILL.md +1 -1
  41. package/skills/cometchat-android-v5-push/SKILL.md +1 -1
  42. package/skills/cometchat-android-v5-testing/SKILL.md +1 -1
  43. package/skills/cometchat-android-v5-theming/SKILL.md +1 -1
  44. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +1 -1
  45. package/skills/cometchat-android-v6/SKILL.md +1 -1
  46. package/skills/cometchat-android-v6-builder-settings/SKILL.md +1 -1
  47. package/skills/cometchat-android-v6-calls/SKILL.md +375 -0
  48. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +97 -0
  49. package/skills/cometchat-android-v6-calls/references/call-layouts.md +91 -0
  50. package/skills/cometchat-android-v6-calls/references/call-session.md +163 -0
  51. package/skills/cometchat-android-v6-calls/references/device-management.md +171 -0
  52. package/skills/cometchat-android-v6-calls/references/group-calls.md +191 -0
  53. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +107 -0
  54. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +136 -0
  55. package/skills/cometchat-android-v6-calls/references/raise-hand.md +186 -0
  56. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +176 -0
  57. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +127 -0
  58. package/skills/cometchat-android-v6-calls/references/share-invite.md +105 -0
  59. package/skills/cometchat-android-v6-compose-components/SKILL.md +2 -2
  60. package/skills/cometchat-android-v6-compose-customization/SKILL.md +1 -1
  61. package/skills/cometchat-android-v6-compose-placement/SKILL.md +1 -1
  62. package/skills/cometchat-android-v6-compose-theming/SKILL.md +1 -1
  63. package/skills/cometchat-android-v6-core/SKILL.md +1 -1
  64. package/skills/cometchat-android-v6-events/SKILL.md +1 -1
  65. package/skills/cometchat-android-v6-extensions/SKILL.md +1 -1
  66. package/skills/cometchat-android-v6-features/SKILL.md +1 -1
  67. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +1 -1
  68. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +1 -1
  69. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +1 -1
  70. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +1 -1
  71. package/skills/cometchat-android-v6-migration/SKILL.md +398 -0
  72. package/skills/cometchat-android-v6-production/SKILL.md +1 -1
  73. package/skills/cometchat-android-v6-push/SKILL.md +1 -1
  74. package/skills/cometchat-android-v6-testing/SKILL.md +1 -1
  75. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +1 -1
  76. package/skills/cometchat-angular-calls/SKILL.md +511 -0
  77. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +95 -0
  78. package/skills/cometchat-angular-calls/references/call-layouts.md +106 -0
  79. package/skills/cometchat-angular-calls/references/call-session.md +167 -0
  80. package/skills/cometchat-angular-calls/references/custom-ui.md +231 -0
  81. package/skills/cometchat-angular-calls/references/device-management.md +135 -0
  82. package/skills/cometchat-angular-calls/references/group-calls.md +412 -0
  83. package/skills/cometchat-angular-calls/references/idle-timeout.md +145 -0
  84. package/skills/cometchat-angular-calls/references/in-call-chat.md +148 -0
  85. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +205 -0
  86. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +53 -0
  87. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +183 -0
  88. package/skills/cometchat-angular-calls/references/picture-in-picture.md +285 -0
  89. package/skills/cometchat-angular-calls/references/raise-hand.md +167 -0
  90. package/skills/cometchat-angular-calls/references/recording-screen-share.md +267 -0
  91. package/skills/cometchat-angular-calls/references/ringing-integration.md +131 -0
  92. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +100 -0
  93. package/skills/cometchat-angular-calls/references/share-invite.md +116 -0
  94. package/skills/cometchat-angular-components/SKILL.md +1 -1
  95. package/skills/cometchat-angular-core/SKILL.md +1 -1
  96. package/skills/cometchat-angular-customization/SKILL.md +1 -1
  97. package/skills/cometchat-angular-features/SKILL.md +1 -1
  98. package/skills/cometchat-angular-patterns/SKILL.md +1 -1
  99. package/skills/cometchat-angular-placement/SKILL.md +1 -1
  100. package/skills/cometchat-angular-production/SKILL.md +1 -1
  101. package/skills/cometchat-angular-push/SKILL.md +403 -0
  102. package/skills/cometchat-angular-testing/SKILL.md +333 -0
  103. package/skills/cometchat-angular-theming/SKILL.md +1 -1
  104. package/skills/cometchat-angular-troubleshooting/SKILL.md +1 -1
  105. package/skills/cometchat-astro-patterns/SKILL.md +1 -1
  106. package/skills/cometchat-calls/SKILL.md +358 -0
  107. package/skills/cometchat-calls/references/use-case-broadcast.md +194 -0
  108. package/skills/cometchat-calls/references/use-case-marketplace.md +158 -0
  109. package/skills/cometchat-calls/references/use-case-support.md +190 -0
  110. package/skills/cometchat-calls/references/use-case-team.md +169 -0
  111. package/skills/cometchat-calls/references/use-case-telehealth.md +154 -0
  112. package/skills/cometchat-components/SKILL.md +1 -1
  113. package/skills/cometchat-core/SKILL.md +1 -1
  114. package/skills/cometchat-customization/SKILL.md +2 -2
  115. package/skills/cometchat-features/SKILL.md +2 -2
  116. package/skills/cometchat-flutter-v5/SKILL.md +1 -1
  117. package/skills/cometchat-flutter-v5-calls/SKILL.md +325 -94
  118. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +169 -0
  119. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +98 -0
  120. package/skills/cometchat-flutter-v5-calls/references/call-session.md +330 -0
  121. package/skills/cometchat-flutter-v5-calls/references/device-management.md +120 -0
  122. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +187 -0
  123. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +97 -0
  124. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +132 -0
  125. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +160 -0
  126. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +244 -0
  127. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +193 -0
  128. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +101 -0
  129. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +142 -0
  130. package/skills/cometchat-flutter-v5-conversations/SKILL.md +1 -1
  131. package/skills/cometchat-flutter-v5-core/SKILL.md +1 -1
  132. package/skills/cometchat-flutter-v5-customization/SKILL.md +1 -1
  133. package/skills/cometchat-flutter-v5-events/SKILL.md +1 -1
  134. package/skills/cometchat-flutter-v5-messages/SKILL.md +1 -1
  135. package/skills/cometchat-flutter-v5-production/SKILL.md +1 -1
  136. package/skills/cometchat-flutter-v5-push/SKILL.md +1 -1
  137. package/skills/cometchat-flutter-v5-testing/SKILL.md +390 -0
  138. package/skills/cometchat-flutter-v5-theming/SKILL.md +1 -1
  139. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +1 -1
  140. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +1 -1
  141. package/skills/cometchat-flutter-v6/SKILL.md +1 -1
  142. package/skills/cometchat-flutter-v6-calls/SKILL.md +308 -243
  143. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +134 -0
  144. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +102 -0
  145. package/skills/cometchat-flutter-v6-calls/references/call-session.md +229 -0
  146. package/skills/cometchat-flutter-v6-calls/references/device-management.md +99 -0
  147. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +190 -0
  148. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +80 -0
  149. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +122 -0
  150. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +268 -0
  151. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +171 -0
  152. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +93 -0
  153. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +102 -0
  154. package/skills/cometchat-flutter-v6-components/SKILL.md +1 -1
  155. package/skills/cometchat-flutter-v6-conversations/SKILL.md +1 -1
  156. package/skills/cometchat-flutter-v6-core/SKILL.md +1 -1
  157. package/skills/cometchat-flutter-v6-customization/SKILL.md +1 -1
  158. package/skills/cometchat-flutter-v6-events/SKILL.md +1 -1
  159. package/skills/cometchat-flutter-v6-features/SKILL.md +1 -1
  160. package/skills/cometchat-flutter-v6-messages/SKILL.md +1 -1
  161. package/skills/cometchat-flutter-v6-migration/SKILL.md +1 -1
  162. package/skills/cometchat-flutter-v6-placement/SKILL.md +1 -1
  163. package/skills/cometchat-flutter-v6-production/SKILL.md +1 -1
  164. package/skills/cometchat-flutter-v6-push/SKILL.md +452 -0
  165. package/skills/cometchat-flutter-v6-testing/SKILL.md +319 -0
  166. package/skills/cometchat-flutter-v6-theming/SKILL.md +1 -1
  167. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +1 -1
  168. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +1 -1
  169. package/skills/cometchat-i18n/SKILL.md +358 -0
  170. package/skills/cometchat-ios/SKILL.md +5 -5
  171. package/skills/cometchat-ios-calls/SKILL.md +409 -0
  172. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +172 -0
  173. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +189 -0
  174. package/skills/cometchat-ios-calls/references/call-layouts.md +136 -0
  175. package/skills/cometchat-ios-calls/references/call-session.md +221 -0
  176. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +353 -0
  177. package/skills/cometchat-ios-calls/references/custom-ui.md +322 -0
  178. package/skills/cometchat-ios-calls/references/device-management.md +171 -0
  179. package/skills/cometchat-ios-calls/references/group-calls.md +396 -0
  180. package/skills/cometchat-ios-calls/references/idle-timeout.md +185 -0
  181. package/skills/cometchat-ios-calls/references/in-call-chat.md +183 -0
  182. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +138 -0
  183. package/skills/cometchat-ios-calls/references/picture-in-picture.md +246 -0
  184. package/skills/cometchat-ios-calls/references/raise-hand.md +239 -0
  185. package/skills/cometchat-ios-calls/references/recording-screen-share.md +339 -0
  186. package/skills/cometchat-ios-calls/references/ringing-integration.md +142 -0
  187. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +267 -0
  188. package/skills/cometchat-ios-calls/references/share-invite.md +152 -0
  189. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +246 -0
  190. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +166 -0
  191. package/skills/cometchat-ios-components/SKILL.md +1 -1
  192. package/skills/cometchat-ios-core/SKILL.md +1 -1
  193. package/skills/cometchat-ios-customization/SKILL.md +1 -1
  194. package/skills/cometchat-ios-features/SKILL.md +1 -1
  195. package/skills/cometchat-ios-placement/SKILL.md +1 -1
  196. package/skills/cometchat-ios-production/SKILL.md +1 -1
  197. package/skills/cometchat-ios-push/SKILL.md +1 -1
  198. package/skills/cometchat-ios-testing/SKILL.md +371 -0
  199. package/skills/cometchat-ios-theming/SKILL.md +1 -1
  200. package/skills/cometchat-ios-troubleshooting/SKILL.md +1 -1
  201. package/skills/cometchat-native-bare-patterns/SKILL.md +45 -3
  202. package/skills/cometchat-native-calls/SKILL.md +599 -0
  203. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +203 -0
  204. package/skills/cometchat-native-calls/references/call-layouts.md +124 -0
  205. package/skills/cometchat-native-calls/references/call-session.md +182 -0
  206. package/skills/cometchat-native-calls/references/custom-ui.md +250 -0
  207. package/skills/cometchat-native-calls/references/device-management.md +135 -0
  208. package/skills/cometchat-native-calls/references/expo-vs-bare.md +179 -0
  209. package/skills/cometchat-native-calls/references/group-calls.md +291 -0
  210. package/skills/cometchat-native-calls/references/idle-timeout.md +128 -0
  211. package/skills/cometchat-native-calls/references/in-call-chat.md +143 -0
  212. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +72 -0
  213. package/skills/cometchat-native-calls/references/picture-in-picture.md +276 -0
  214. package/skills/cometchat-native-calls/references/raise-hand.md +203 -0
  215. package/skills/cometchat-native-calls/references/recording-screen-share.md +290 -0
  216. package/skills/cometchat-native-calls/references/ringing-integration.md +118 -0
  217. package/skills/cometchat-native-calls/references/server-push-bridge.md +135 -0
  218. package/skills/cometchat-native-calls/references/server-push-payloads.md +193 -0
  219. package/skills/cometchat-native-calls/references/share-invite.md +144 -0
  220. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +317 -0
  221. package/skills/cometchat-native-components/SKILL.md +1 -1
  222. package/skills/cometchat-native-core/SKILL.md +1 -1
  223. package/skills/cometchat-native-customization/SKILL.md +1 -1
  224. package/skills/cometchat-native-expo-patterns/SKILL.md +18 -1
  225. package/skills/cometchat-native-features/SKILL.md +1 -1
  226. package/skills/cometchat-native-placement/SKILL.md +1 -1
  227. package/skills/cometchat-native-production/SKILL.md +1 -1
  228. package/skills/cometchat-native-push/SKILL.md +1 -1
  229. package/skills/cometchat-native-testing/SKILL.md +1 -1
  230. package/skills/cometchat-native-theming/SKILL.md +1 -1
  231. package/skills/cometchat-native-troubleshooting/SKILL.md +1 -1
  232. package/skills/cometchat-nextjs-patterns/SKILL.md +1 -1
  233. package/skills/cometchat-placement/SKILL.md +29 -1
  234. package/skills/cometchat-production/SKILL.md +1 -1
  235. package/skills/cometchat-react-calls/SKILL.md +539 -0
  236. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +145 -0
  237. package/skills/cometchat-react-calls/references/call-layouts.md +161 -0
  238. package/skills/cometchat-react-calls/references/call-session.md +235 -0
  239. package/skills/cometchat-react-calls/references/custom-ui.md +201 -0
  240. package/skills/cometchat-react-calls/references/device-management.md +206 -0
  241. package/skills/cometchat-react-calls/references/group-calls.md +262 -0
  242. package/skills/cometchat-react-calls/references/idle-timeout.md +175 -0
  243. package/skills/cometchat-react-calls/references/in-call-chat.md +212 -0
  244. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +172 -0
  245. package/skills/cometchat-react-calls/references/picture-in-picture.md +245 -0
  246. package/skills/cometchat-react-calls/references/raise-hand.md +238 -0
  247. package/skills/cometchat-react-calls/references/recording-screen-share.md +143 -0
  248. package/skills/cometchat-react-calls/references/ringing-integration.md +255 -0
  249. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +241 -0
  250. package/skills/cometchat-react-calls/references/share-invite.md +176 -0
  251. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +198 -0
  252. package/skills/cometchat-react-calls/references/voip-and-web-push.md +165 -0
  253. package/skills/cometchat-react-patterns/SKILL.md +56 -8
  254. package/skills/cometchat-react-push/SKILL.md +448 -0
  255. package/skills/cometchat-react-router-patterns/SKILL.md +1 -1
  256. package/skills/cometchat-react-testing/SKILL.md +404 -0
  257. package/skills/cometchat-theming/SKILL.md +3 -3
  258. package/skills/cometchat-troubleshooting/SKILL.md +2 -2
@@ -0,0 +1,358 @@
1
+ ---
2
+ name: cometchat-i18n
3
+ description: Localization (i18n) across all CometChat UI Kit families — React, React Native, Angular, Android (V5/V6), iOS, Flutter (V5/V6). Covers CometChatLocalize.init signature differences (positional vs object), bundled languages, custom-language registration, RTL support, fallback to English, and cross-family drift risks. Cross-family — applies wherever the agent is configuring CometChat localization.
4
+ license: "MIT"
5
+ compatibility: "All CometChat UI Kit families v4.x / v5.x / v6.x"
6
+ allowed-tools: "shell, file-read, file-search, file-list, ask-user"
7
+ metadata:
8
+ author: "CometChat"
9
+ version: "4.0.0"
10
+ tags: "cometchat i18n localization l10n cometchatlocalize languages rtl arabic hebrew bundled-languages custom-language fallback cross-family"
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Localize the CometChat UI Kit to the user's language. Every kit ships with English + ~15 bundled languages (Arabic, Bengali, Chinese, German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Portuguese, Russian, Swedish, Turkish — exact set varies by kit version). Custom languages can be added at runtime.
16
+
17
+ The biggest gotcha: **the `init` signature differs across kits and major versions**. The same audit pass that caught calls API drift caught one of these too (Angular Localize positional signature) — this skill is the canonical reference.
18
+
19
+ ---
20
+
21
+ ## API surface per family
22
+
23
+ ### React (v6) — object signature
24
+
25
+ ```ts
26
+ import { CometChatLocalize } from "@cometchat/chat-uikit-react";
27
+
28
+ CometChatLocalize.init({
29
+ language: "es",
30
+ fallbackLanguage: "en",
31
+ });
32
+ ```
33
+
34
+ Object literal. `init({ ... })`.
35
+
36
+ ### React Native (v5) — object signature
37
+
38
+ ```ts
39
+ import { CometChatLocalize } from "@cometchat/chat-uikit-react-native";
40
+
41
+ CometChatLocalize.init({
42
+ language: "es",
43
+ fallbackLanguage: "en",
44
+ });
45
+ ```
46
+
47
+ Same object signature as React.
48
+
49
+ ### Angular (v4) — POSITIONAL signature
50
+
51
+ ```ts
52
+ import { CometChatLocalize } from "@cometchat/chat-uikit-angular";
53
+
54
+ CometChatLocalize.init("es");
55
+ // or with custom resources:
56
+ CometChatLocalize.init("es", { es: { CHAT: "Charla" } });
57
+ ```
58
+
59
+ **Positional, not object.** This was the v4.0 audit fix — calling `.init({ language: "es" })` on Angular sets `language = [object Object]` and silently breaks translations. The skill's verification checklist flags this drift.
60
+
61
+ ### Android V5 — Java/Kotlin static method
62
+
63
+ ```kotlin
64
+ // Kotlin
65
+ CometChatLocalize.setLocale(Locale.forLanguageTag("es"))
66
+ ```
67
+
68
+ ```java
69
+ // Java
70
+ CometChatLocalize.setLocale(Locale.forLanguageTag("es"));
71
+ ```
72
+
73
+ `setLocale`, not `init`. Takes a `java.util.Locale`.
74
+
75
+ ### Android V6 (beta) — same as V5
76
+
77
+ V6 keeps the `setLocale(Locale)` API. No drift here.
78
+
79
+ ### iOS V5
80
+
81
+ ```swift
82
+ import CometChatUIKitSwift
83
+
84
+ CometChatLocalize.setLocale(locale: "es")
85
+ ```
86
+
87
+ `setLocale(locale:)`. Takes a String, not `Locale`.
88
+
89
+ ### Flutter V5 (GetX-based)
90
+
91
+ ```dart
92
+ import 'package:cometchat_calls_uikit/cometchat_calls_uikit.dart';
93
+
94
+ CometChatLocalize.init(language: 'es');
95
+ ```
96
+
97
+ Named-arg, not positional. Single string.
98
+
99
+ ### Flutter V6 (Bloc-based)
100
+
101
+ ```dart
102
+ import 'package:cometchat_chat_uikit/cometchat_chat_uikit.dart';
103
+
104
+ CometChatLocalize.init(language: 'es');
105
+ ```
106
+
107
+ Same as V5 in Flutter — named arg.
108
+
109
+ ---
110
+
111
+ ## Cross-family signature summary
112
+
113
+ | Family | Init call | Notes |
114
+ |---|---|---|
115
+ | React (v6) | `CometChatLocalize.init({ language, fallbackLanguage })` | Object |
116
+ | React Native (v5) | `CometChatLocalize.init({ language, fallbackLanguage })` | Object |
117
+ | **Angular (v4)** | `CometChatLocalize.init("es")` | **Positional — drift trap** |
118
+ | Android (V5/V6) | `CometChatLocalize.setLocale(Locale.forLanguageTag("es"))` | Method name `setLocale`, takes `Locale` |
119
+ | iOS (V5) | `CometChatLocalize.setLocale(locale: "es")` | Method name `setLocale`, takes String |
120
+ | Flutter (V5/V6) | `CometChatLocalize.init(language: 'es')` | Named arg |
121
+
122
+ The agent must consult this table before writing any localization code. **Verify against the installed package's type definitions** if uncertain — symbol drift between minor versions is real (the React v5 → v6 changed from positional to object).
123
+
124
+ ---
125
+
126
+ ## When to call init/setLocale
127
+
128
+ After CometChat init is configured but before mounting any kit components:
129
+
130
+ ```ts
131
+ // React example — in your provider
132
+ useEffect(() => {
133
+ CometChatUIKit.init(settings).then(() => {
134
+ CometChatLocalize.init({ language: getUserLocale(), fallbackLanguage: "en" });
135
+ // Now mount kit components
136
+ });
137
+ }, []);
138
+ ```
139
+
140
+ ```kotlin
141
+ // Android — in Application.onCreate
142
+ override fun onCreate() {
143
+ super.onCreate()
144
+ val settings = UIKitSettings.Builder()/* ... */.build()
145
+ CometChatUIKit.init(this, settings) {
146
+ CometChatLocalize.setLocale(Locale.forLanguageTag(getUserLocale()))
147
+ }
148
+ }
149
+ ```
150
+
151
+ ```swift
152
+ // iOS — in App.init or AppDelegate
153
+ CometChat.init(appId: ...) { _, error in
154
+ guard error == nil else { return }
155
+ CometChatLocalize.setLocale(locale: Locale.preferredLanguages.first ?? "en")
156
+ }
157
+ ```
158
+
159
+ Setting locale before init is harmless but the kit doesn't pick up the locale until init completes; some components read the locale at first render. Doing both in sequence is safest.
160
+
161
+ ---
162
+
163
+ ## Custom languages / overriding strings
164
+
165
+ Each kit lets you register a custom language or override individual strings.
166
+
167
+ ### React / React Native (v6)
168
+
169
+ ```ts
170
+ CometChatLocalize.init({
171
+ language: "es",
172
+ fallbackLanguage: "en",
173
+ resources: {
174
+ es: {
175
+ CHAT: "Charla",
176
+ MESSAGES: "Mensajes",
177
+ // ... override only the strings you want
178
+ },
179
+ },
180
+ });
181
+ ```
182
+
183
+ ### Angular
184
+
185
+ Positional second arg:
186
+
187
+ ```ts
188
+ CometChatLocalize.init("es", {
189
+ es: { CHAT: "Charla", MESSAGES: "Mensajes" },
190
+ });
191
+ ```
192
+
193
+ ### Android
194
+
195
+ ```kotlin
196
+ val customResources = mapOf(
197
+ "CHAT" to "Charla",
198
+ "MESSAGES" to "Mensajes",
199
+ )
200
+ CometChatLocalize.setLocale(Locale("es"))
201
+ CometChatLocalize.addStringResources("es", customResources) // verify symbol
202
+ ```
203
+
204
+ The exact symbol for resource-override on Android varies by version — check the kit's published API surface.
205
+
206
+ ### iOS
207
+
208
+ ```swift
209
+ CometChatLocalize.setLocale(locale: "es")
210
+ CometChatLocalize.setStringResources(["CHAT": "Charla"], for: "es")
211
+ ```
212
+
213
+ ### Flutter
214
+
215
+ ```dart
216
+ CometChatLocalize.init(
217
+ language: 'es',
218
+ resources: {
219
+ 'es': { 'CHAT': 'Charla', 'MESSAGES': 'Mensajes' },
220
+ },
221
+ );
222
+ ```
223
+
224
+ ---
225
+
226
+ ## RTL languages
227
+
228
+ Arabic, Hebrew, Persian, Urdu render right-to-left. The kits handle layout direction automatically based on the locale, BUT:
229
+
230
+ 1. **Native iOS / Android**: layout direction follows the device's locale OR the explicitly-set CometChat locale, whichever is set last. If your app sets the device locale to Arabic but the kit's locale is English, mismatched RTL is visible.
231
+ 2. **Web (React / Angular)**: `<html dir="rtl">` is required for full RTL support. The kit reads this from the document root. Set it when locale changes:
232
+
233
+ ```ts
234
+ useEffect(() => {
235
+ const lang = currentLocale;
236
+ document.documentElement.dir = ["ar", "he", "fa", "ur"].includes(lang) ? "rtl" : "ltr";
237
+ CometChatLocalize.init({ language: lang });
238
+ }, [currentLocale]);
239
+ ```
240
+
241
+ 3. **React Native**: `I18nManager.forceRTL(true)` for global RTL flip. Requires app restart to take effect (this is the one common production bug — set RTL, app doesn't visibly change, devs miss the "restart required" warning).
242
+
243
+ ```ts
244
+ import { I18nManager, NativeModules, Platform } from "react-native";
245
+
246
+ if (isRTLLocale(language) && !I18nManager.isRTL) {
247
+ I18nManager.forceRTL(true);
248
+ if (__DEV__) {
249
+ console.warn("RTL set — app must restart for layout change to apply");
250
+ } else {
251
+ NativeModules.DevSettings.reload();
252
+ }
253
+ }
254
+ ```
255
+
256
+ 4. **Flutter**: handled automatically via `MaterialApp.localizationsDelegates` + `Locale('ar')`. Flutter's framework flips layout direction on locale change without restart.
257
+
258
+ ---
259
+
260
+ ## Fallback language
261
+
262
+ Every kit falls back to English when a translation is missing for the active locale. Make this explicit:
263
+
264
+ ```ts
265
+ // React/RN/Flutter
266
+ CometChatLocalize.init({ language: "es", fallbackLanguage: "en" });
267
+ ```
268
+
269
+ Angular and iOS don't have an explicit `fallbackLanguage` arg in their `init` / `setLocale` API — they hardcode English fallback internally. The skill doesn't try to override this.
270
+
271
+ ---
272
+
273
+ ## Detecting the user's preferred language
274
+
275
+ ```ts
276
+ // Web — browser language
277
+ const language = navigator.language.split("-")[0]; // "en-US" → "en"
278
+
279
+ // React Native — device language
280
+ import * as Localization from "expo-localization"; // Expo
281
+ const language = Localization.locale.split("-")[0];
282
+
283
+ // or react-native-localize for bare RN:
284
+ import { getLocales } from "react-native-localize";
285
+ const language = getLocales()[0]?.languageCode ?? "en";
286
+ ```
287
+
288
+ ```kotlin
289
+ // Android
290
+ val language = Locale.getDefault().language // "en"
291
+ ```
292
+
293
+ ```swift
294
+ // iOS
295
+ let language = Locale.preferredLanguages.first?.split(separator: "-").first.map(String.init) ?? "en"
296
+ ```
297
+
298
+ ```dart
299
+ // Flutter
300
+ import 'dart:ui';
301
+ final language = window.locale.languageCode; // 'en'
302
+ ```
303
+
304
+ Map these to your kit's locale convention (most kits use ISO 639-1 two-letter codes; Flutter sometimes accepts BCP47 like `en-US`).
305
+
306
+ ---
307
+
308
+ ## Logout / language switch — re-init the kit
309
+
310
+ When the user changes language at runtime, simply call `init`/`setLocale` again with the new language. The kit re-renders kit components on the next render cycle. No need to logout/re-login.
311
+
312
+ For React/RN — wrap kit components in a `key={language}` to force re-mount if the kit doesn't auto-detect:
313
+
314
+ ```tsx
315
+ <div key={language}>
316
+ <CometChatConversations />
317
+ </div>
318
+ ```
319
+
320
+ This is the workaround for kits that cache localized strings at first render.
321
+
322
+ ---
323
+
324
+ ## Anti-patterns
325
+
326
+ 1. **Calling `init` with the wrong signature.** Object instead of positional on Angular, vice-versa on React. The audit pass catches this — don't ship without verifying.
327
+ 2. **Setting locale before kit init.** Some kits ignore the early call. Always sequence: kit init → localize init.
328
+ 3. **No fallback language on web/RN/Flutter.** Missing translations show as raw keys (`CHAT_HEADER_TITLE` etc.) instead of English fallback.
329
+ 4. **`document.dir` not synced with locale on web.** RTL languages render LTR — broken layout.
330
+ 5. **`I18nManager.forceRTL` without app restart.** Layout doesn't flip; devs think the kit is broken.
331
+ 6. **Hardcoding language in skill output.** Always read user preference (browser/device/explicit setting).
332
+ 7. **Custom resources keyed by lowercase ID** (`"chat"` instead of `"CHAT"`). Kit string keys are uppercase by convention. Mismatched case = no override applied.
333
+ 8. **Trusting the audit-fix-once mindset.** Localize signatures can drift in future minor versions. Re-verify on kit upgrade.
334
+
335
+ ---
336
+
337
+ ## Verification checklist
338
+
339
+ - [ ] `init` / `setLocale` signature matches the family in the table above
340
+ - [ ] Locale set AFTER kit init resolves
341
+ - [ ] `fallbackLanguage` set where supported (React, RN, Flutter)
342
+ - [ ] Web: `document.documentElement.dir` synced with RTL languages
343
+ - [ ] React Native: `I18nManager.forceRTL` warning + restart on RTL set
344
+ - [ ] Custom resources use uppercase string keys
345
+ - [ ] Language detection from browser/device, not hardcoded
346
+ - [ ] Re-init on language switch (or `key={language}` workaround)
347
+ - [ ] Smoke test: switch to a bundled non-English language, verify kit components localize
348
+ - [ ] Smoke test: switch to a missing-resource language, verify English fallback
349
+ - [ ] RTL smoke test: Arabic / Hebrew on web (with `dir="rtl"`) and RN (with `I18nManager.forceRTL`) and native Android/iOS — kit components mirror correctly
350
+
351
+ ---
352
+
353
+ ## Pointers
354
+
355
+ - `cometchat-{family}-core` — kit init order and conventions (localize hooks into the post-init phase)
356
+ - `cometchat-{family}-customization` — custom string resources / theme strings
357
+ - `cometchat-{family}-troubleshooting` — when localization doesn't apply (cache, sequence, fallback)
358
+ - `cometchat-a11y` — sister skill; localization + accessibility together cover the bulk of "production polish"
@@ -2,7 +2,7 @@
2
2
  name: cometchat-ios
3
3
  description: Entry-point for CometChat iOS UI Kit integration in any Swift/iOS project. Detects the project type, gathers requirements through an interactive conversation, and writes production-quality integration code for UIKit and SwiftUI applications.
4
4
  license: "MIT"
5
- allowed-tools: "executeBash, readFile, fileSearch, listDirectory, AskUserQuestion"
5
+ allowed-tools: "shell, file-read, file-search, file-list, ask-user"
6
6
  metadata:
7
7
  author: "CometChat"
8
8
  version: "3.0.0"
@@ -13,7 +13,7 @@ metadata:
13
13
 
14
14
  The user wants to add CometChat to any iOS project. Trigger phrases:
15
15
 
16
- - `/cometchat`
16
+ - `/cometchat` (or invoke the cometchat-ios skill via your agent's mechanism — keyword "cometchat" or "integrate chat" works in most agents)
17
17
  - "add cometchat", "integrate cometchat", "add chat to my app"
18
18
  - "add messaging", "add chat ui", "add in-app chat"
19
19
  - "integrate chat in ios", "add chat to swift app"
@@ -84,7 +84,7 @@ Store this mental map — you'll use it throughout the conversation.
84
84
 
85
85
  **Ask the user for their CometChat credentials:**
86
86
 
87
- Use `AskUserQuestion`:
87
+ Ask the user (preserve this exact shape — `question`, `header`, `multiSelect`, `options[].label`, `options[].description` — agents have varying primitive names but all support this structured form):
88
88
  - **question:** "Let's set up CometChat. Do you have your credentials?"
89
89
  - **header:** "CometChat Setup"
90
90
  - **multiSelect:** false
@@ -111,7 +111,7 @@ Direct them to:
111
111
 
112
112
  #### 3a. "What are you building?"
113
113
 
114
- Use `AskUserQuestion`:
114
+ Ask the user (preserve the structured shape — `question`/`header`/`multiSelect`/`options[].label`/`options[].description`):
115
115
  - **question:** "What kind of app are you building?"
116
116
  - **header:** "Your app"
117
117
  - **multiSelect:** false
@@ -251,7 +251,7 @@ After writing code:
251
251
 
252
252
  ### Step 7 — Iteration menu
253
253
 
254
- Use `AskUserQuestion`:
254
+ Ask the user (preserve the structured shape — `question`/`header`/`options[].label`/`options[].description`):
255
255
  - **question:** "What would you like to do next?"
256
256
  - **header:** "Next step"
257
257
  - **options:**