@cometchat/skills 3.0.0 → 4.0.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 (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -17
  3. package/bin/install.js +389 -43
  4. package/package.json +19 -9
  5. package/skills/cometchat/SKILL.md +1066 -265
  6. package/skills/cometchat-android-v5/SKILL.md +120 -0
  7. package/skills/cometchat-android-v5-components/SKILL.md +430 -0
  8. package/skills/cometchat-android-v5-core/SKILL.md +468 -0
  9. package/skills/cometchat-android-v5-customization/SKILL.md +305 -0
  10. package/skills/cometchat-android-v5-extensions/SKILL.md +124 -0
  11. package/skills/cometchat-android-v5-features/SKILL.md +130 -0
  12. package/skills/cometchat-android-v5-placement/SKILL.md +276 -0
  13. package/skills/cometchat-android-v5-production/SKILL.md +94 -0
  14. package/skills/cometchat-android-v5-push/SKILL.md +620 -0
  15. package/skills/cometchat-android-v5-testing/SKILL.md +187 -0
  16. package/skills/cometchat-android-v5-theming/SKILL.md +166 -0
  17. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +73 -0
  18. package/skills/cometchat-android-v6/SKILL.md +107 -0
  19. package/skills/cometchat-android-v6-builder-settings/SKILL.md +145 -0
  20. package/skills/cometchat-android-v6-compose-components/SKILL.md +202 -0
  21. package/skills/cometchat-android-v6-compose-customization/SKILL.md +280 -0
  22. package/skills/cometchat-android-v6-compose-placement/SKILL.md +213 -0
  23. package/skills/cometchat-android-v6-compose-theming/SKILL.md +224 -0
  24. package/skills/cometchat-android-v6-core/SKILL.md +354 -0
  25. package/skills/cometchat-android-v6-events/SKILL.md +212 -0
  26. package/skills/cometchat-android-v6-extensions/SKILL.md +191 -0
  27. package/skills/cometchat-android-v6-features/SKILL.md +130 -0
  28. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +197 -0
  29. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +268 -0
  30. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +248 -0
  31. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +202 -0
  32. package/skills/cometchat-android-v6-production/SKILL.md +187 -0
  33. package/skills/cometchat-android-v6-push/SKILL.md +274 -0
  34. package/skills/cometchat-android-v6-testing/SKILL.md +279 -0
  35. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +249 -0
  36. package/skills/cometchat-angular-components/SKILL.md +706 -0
  37. package/skills/cometchat-angular-core/SKILL.md +444 -0
  38. package/skills/cometchat-angular-customization/SKILL.md +424 -0
  39. package/skills/cometchat-angular-features/SKILL.md +447 -0
  40. package/skills/cometchat-angular-patterns/SKILL.md +447 -0
  41. package/skills/cometchat-angular-placement/SKILL.md +685 -0
  42. package/skills/cometchat-angular-production/SKILL.md +415 -0
  43. package/skills/cometchat-angular-theming/SKILL.md +365 -0
  44. package/skills/cometchat-angular-troubleshooting/SKILL.md +329 -0
  45. package/skills/cometchat-astro-patterns/SKILL.md +3 -3
  46. package/skills/cometchat-components/SKILL.md +11 -0
  47. package/skills/cometchat-core/SKILL.md +11 -6
  48. package/skills/cometchat-customization/references/component-catalog.md +1 -1
  49. package/skills/cometchat-features/SKILL.md +176 -108
  50. package/skills/cometchat-flutter-v5/SKILL.md +167 -0
  51. package/skills/cometchat-flutter-v5-calls/SKILL.md +192 -0
  52. package/skills/cometchat-flutter-v5-conversations/SKILL.md +117 -0
  53. package/skills/cometchat-flutter-v5-core/SKILL.md +221 -0
  54. package/skills/cometchat-flutter-v5-customization/SKILL.md +227 -0
  55. package/skills/cometchat-flutter-v5-events/SKILL.md +155 -0
  56. package/skills/cometchat-flutter-v5-messages/SKILL.md +258 -0
  57. package/skills/cometchat-flutter-v5-production/SKILL.md +207 -0
  58. package/skills/cometchat-flutter-v5-push/SKILL.md +284 -0
  59. package/skills/cometchat-flutter-v5-theming/SKILL.md +160 -0
  60. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +129 -0
  61. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +151 -0
  62. package/skills/cometchat-flutter-v6/SKILL.md +445 -0
  63. package/skills/cometchat-flutter-v6-calls/SKILL.md +333 -0
  64. package/skills/cometchat-flutter-v6-components/SKILL.md +365 -0
  65. package/skills/cometchat-flutter-v6-conversations/SKILL.md +210 -0
  66. package/skills/cometchat-flutter-v6-core/SKILL.md +305 -0
  67. package/skills/cometchat-flutter-v6-customization/SKILL.md +666 -0
  68. package/skills/cometchat-flutter-v6-events/SKILL.md +216 -0
  69. package/skills/cometchat-flutter-v6-features/SKILL.md +406 -0
  70. package/skills/cometchat-flutter-v6-messages/SKILL.md +333 -0
  71. package/skills/cometchat-flutter-v6-migration/SKILL.md +381 -0
  72. package/skills/cometchat-flutter-v6-placement/SKILL.md +398 -0
  73. package/skills/cometchat-flutter-v6-production/SKILL.md +632 -0
  74. package/skills/cometchat-flutter-v6-theming/SKILL.md +260 -0
  75. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +726 -0
  76. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +216 -0
  77. package/skills/cometchat-ios/SKILL.md +323 -0
  78. package/skills/cometchat-ios-components/SKILL.md +651 -0
  79. package/skills/cometchat-ios-core/SKILL.md +822 -0
  80. package/skills/cometchat-ios-customization/SKILL.md +825 -0
  81. package/skills/cometchat-ios-features/SKILL.md +725 -0
  82. package/skills/cometchat-ios-placement/SKILL.md +750 -0
  83. package/skills/cometchat-ios-production/SKILL.md +730 -0
  84. package/skills/cometchat-ios-push/SKILL.md +582 -0
  85. package/skills/cometchat-ios-theming/SKILL.md +631 -0
  86. package/skills/cometchat-ios-troubleshooting/SKILL.md +983 -0
  87. package/skills/cometchat-native-bare-patterns/SKILL.md +470 -0
  88. package/skills/cometchat-native-components/SKILL.md +594 -0
  89. package/skills/cometchat-native-core/SKILL.md +407 -0
  90. package/skills/cometchat-native-customization/SKILL.md +594 -0
  91. package/skills/cometchat-native-expo-patterns/SKILL.md +485 -0
  92. package/skills/cometchat-native-features/SKILL.md +608 -0
  93. package/skills/cometchat-native-placement/SKILL.md +500 -0
  94. package/skills/cometchat-native-production/SKILL.md +694 -0
  95. package/skills/cometchat-native-push/SKILL.md +593 -0
  96. package/skills/cometchat-native-testing/SKILL.md +583 -0
  97. package/skills/cometchat-native-theming/SKILL.md +656 -0
  98. package/skills/cometchat-native-troubleshooting/SKILL.md +433 -0
  99. package/skills/cometchat-nextjs-patterns/SKILL.md +5 -5
  100. package/skills/cometchat-production/SKILL.md +60 -0
  101. package/skills/cometchat-react-router-patterns/SKILL.md +23 -21
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: cometchat-flutter-v6-users-groups
3
+ description: >
4
+ Use when implementing user lists, group lists, or group member management with
5
+ CometChat Flutter UIKit v6. Triggers on mentions of CometChatUsers, CometChatGroups,
6
+ CometChatGroupMembers, UsersBloc, GroupsBloc, UsersServiceLocator, GroupsServiceLocator,
7
+ user list, group list, contacts, members, group info, add members, ban members,
8
+ transfer ownership, change scope, UsersRequestBuilder, GroupsRequestBuilder,
9
+ GroupMembersRequestBuilder, or customizing user/group list items.
10
+ license: "MIT"
11
+ compatibility: "cometchat_chat_uikit ^6.0.0-beta2; flutter_bloc ^8.1.0"
12
+ allowed-tools: "executeBash, readFile, readCode, fileSearch, listDirectory, grepSearch"
13
+ metadata:
14
+ author: "CometChat"
15
+ version: "3.0.0"
16
+ tags: "cometchat flutter users groups members contacts"
17
+ ---
18
+
19
+ # CometChat Flutter UIKit — Users & Groups
20
+
21
+ Components for displaying and managing users, groups, and group members.
22
+
23
+ ## CometChatUsers
24
+
25
+ Displays a searchable, alphabetically-sorted list of users.
26
+
27
+ ```dart
28
+ CometChatUsers(
29
+ onItemTap: (context, user) {
30
+ Navigator.push(context, MaterialPageRoute(
31
+ builder: (_) => MessagesScreen(user: user),
32
+ ));
33
+ },
34
+ usersStyle: CometChatUsersStyle(
35
+ backgroundColor: colorPalette.background1,
36
+ ),
37
+ usersStatusVisibility: true,
38
+ showBackButton: true,
39
+ onBack: () => Navigator.pop(context),
40
+ )
41
+ ```
42
+
43
+ ### Custom Request Builder
44
+
45
+ ```dart
46
+ CometChatUsers(
47
+ usersRequestBuilder: UsersRequestBuilder()
48
+ ..limit = 30
49
+ ..friendsOnly = true
50
+ ..roles = ['default']
51
+ ..searchKeyword = 'john',
52
+ )
53
+ ```
54
+
55
+ ### View Slots
56
+
57
+ ```dart
58
+ CometChatUsers(
59
+ listItemView: (user) => MyCustomUserItem(user),
60
+ subtitleView: (context, user) => Text(user.status ?? 'offline'),
61
+ trailingView: (context, user) => Icon(Icons.chat),
62
+ )
63
+ ```
64
+
65
+ ## CometChatGroups
66
+
67
+ Displays a searchable list of groups with type indicators (public/private/password).
68
+
69
+ ```dart
70
+ CometChatGroups(
71
+ onItemTap: (context, group) {
72
+ Navigator.push(context, MaterialPageRoute(
73
+ builder: (_) => MessagesScreen(group: group),
74
+ ));
75
+ },
76
+ groupsStyle: CometChatGroupsStyle(
77
+ backgroundColor: colorPalette.background1,
78
+ ),
79
+ groupTypeVisibility: true,
80
+ )
81
+ ```
82
+
83
+ ### Custom Request Builder
84
+
85
+ ```dart
86
+ CometChatGroups(
87
+ groupsRequestBuilder: GroupsRequestBuilder()
88
+ ..limit = 30
89
+ ..joinedOnly = true
90
+ ..searchKeyword = 'team'
91
+ ..withTags = true
92
+ ..tags = ['project'],
93
+ )
94
+ ```
95
+
96
+ ## CometChatGroupMembers
97
+
98
+ Displays members of a specific group with role indicators and management actions.
99
+
100
+ ```dart
101
+ CometChatGroupMembers(
102
+ group: group,
103
+ groupMembersStyle: CometChatGroupMembersStyle(
104
+ backgroundColor: colorPalette.background1,
105
+ ),
106
+ )
107
+ ```
108
+
109
+ ### Group Member Actions
110
+
111
+ The component supports scope changes, kick, and ban based on the logged-in user's role:
112
+
113
+ | Logged-in Role | Can Change Scope | Can Kick | Can Ban |
114
+ |----------------|-----------------|----------|---------|
115
+ | Owner | ✅ All members | ✅ All | ✅ All |
116
+ | Admin | ✅ Participants only | ✅ Participants | ✅ Participants |
117
+ | Participant | ❌ | ❌ | ❌ |
118
+
119
+ ## Architecture (All Three)
120
+
121
+ All follow the same Clean Architecture + BLoC pattern:
122
+
123
+ ```
124
+ {component}/
125
+ ├── bloc/{component}_bloc.dart # State management + SDK listeners
126
+ ├── domain/usecases/ # Get{Component}sUseCase, etc.
127
+ ├── data/repositories/ # SDK wrapper
128
+ ├── di/{component}_service_locator.dart # Singleton DI
129
+ └── widgets/ # List item, empty/error/loading views
130
+ ```
131
+
132
+ ## BLoC State Pattern
133
+
134
+ All three use the same state pattern:
135
+
136
+ ```dart
137
+ // Status-based states
138
+ {Component}Initial → {Component}Loading → {Component}Loaded / {Component}Empty / {Component}Error
139
+
140
+ // Loaded state has:
141
+ final List<{Entity}> items;
142
+ final bool hasMore;
143
+ final Set<String> selectedItems; // For selection mode
144
+ final bool isLoadingMore;
145
+ ```
146
+
147
+ ## Selection Mode
148
+
149
+ All list components support selection:
150
+
151
+ ```dart
152
+ CometChatUsers(
153
+ selectionMode: SelectionMode.multiple,
154
+ onSelection: (selectedUsers) {
155
+ // Handle selected users
156
+ },
157
+ activateSelection: ActivateSelection.onLongClick,
158
+ )
159
+ ```
160
+
161
+ ## Gotchas
162
+
163
+ - `CometChatGroupMembers` has been fully migrated to BLoC + Clean Architecture (bloc/, data/, di/, domain/, widgets/). A `GroupMembersBlocAdapter` wraps the BLoC to implement the legacy `CometChatGroupMembersControllerProtocol` for backward compatibility. The old `cometchat_group_members_controller.dart` file still exists but the BLoC is the active implementation.
164
+ - Group type icons (lock for private, shield for password) are controlled by `groupTypeVisibility`. Setting it to `false` hides all type indicators.
165
+ - `friendsOnly: true` on `UsersRequestBuilder` only works if your CometChat plan supports the friends feature.
166
+ - When a user is blocked, they still appear in `CometChatUsers` unless you set `includeBlockedUsers: false` on the conversations BLoC or filter in the request builder.
167
+
168
+ ## Anti-Patterns
169
+
170
+ ```dart
171
+ // ❌ WRONG — not handling group join for password-protected groups
172
+ onItemTap: (context, group) => Navigator.push(context, MaterialPageRoute(
173
+ builder: (_) => MessagesScreen(group: group), // Fails if not joined
174
+ ))
175
+
176
+ // ✅ CORRECT — check membership, handle password groups
177
+ onItemTap: (context, group) {
178
+ if (group.hasJoined) {
179
+ Navigator.push(context, MaterialPageRoute(
180
+ builder: (_) => MessagesScreen(group: group),
181
+ ));
182
+ } else if (group.type == GroupTypeConstants.password) {
183
+ Navigator.push(context, MaterialPageRoute(
184
+ builder: (_) => JoinProtectedGroupScreen(group: group),
185
+ ));
186
+ } else {
187
+ // Join public group first, then navigate
188
+ }
189
+ }
190
+ ```
191
+
192
+ ```dart
193
+ // ❌ WRONG — hardcoded role check strings
194
+ if (member.scope == 'admin') { ... }
195
+
196
+ // ✅ CORRECT — use SDK constants
197
+ if (member.scope == GroupMemberScope.admin) { ... }
198
+ ```
199
+
200
+ ```dart
201
+ // ❌ WRONG — creating ServiceLocator per widget instance
202
+ final locator = GroupsServiceLocator(); // New instance each time
203
+
204
+ // ✅ CORRECT — use singleton
205
+ final locator = GroupsServiceLocator.instance;
206
+ locator.setup();
207
+ ```
208
+
209
+ ## Checklist
210
+
211
+ - [ ] `onItemTap` handles group join state (joined vs password vs public)
212
+ - [ ] Group member actions respect role hierarchy
213
+ - [ ] Selection mode configured if multi-select needed
214
+ - [ ] Request builder customized for app's user/group filtering needs
215
+ - [ ] ServiceLocator accessed via `.instance` singleton
216
+ - [ ] Colors from `CometChatThemeHelper`, not hardcoded
@@ -0,0 +1,323 @@
1
+ ---
2
+ name: cometchat-ios
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
+ license: "MIT"
5
+ allowed-tools: "executeBash, readFile, fileSearch, listDirectory, AskUserQuestion"
6
+ metadata:
7
+ author: "CometChat"
8
+ version: "3.0.0"
9
+ tags: "cometchat dispatcher entry ios swift uikit swiftui chat messaging"
10
+ ---
11
+
12
+ ## Use this skill when
13
+
14
+ The user wants to add CometChat to any iOS project. Trigger phrases:
15
+
16
+ - `/cometchat`
17
+ - "add cometchat", "integrate cometchat", "add chat to my app"
18
+ - "add messaging", "add chat ui", "add in-app chat"
19
+ - "integrate chat in ios", "add chat to swift app"
20
+
21
+ This is the **entry point for iOS integration**. Do NOT invoke
22
+ framework-specific skills directly — this dispatcher detects the
23
+ project type first and routes to the right ones.
24
+
25
+ **Supported project types:**
26
+
27
+ | Type | Description |
28
+ |---|---|
29
+ | **UIKit** | Traditional UIKit-based iOS apps using Storyboards or programmatic UI |
30
+ | **SwiftUI** | Modern SwiftUI-based iOS apps |
31
+ | **Hybrid** | Apps using both UIKit and SwiftUI |
32
+
33
+ The iOS UI Kit loads `CometChatUIKitSwift` via CocoaPods or Swift Package Manager, along with `CometChatSDK`.
34
+
35
+ ## How this skill works
36
+
37
+ This skill is **interactive and conversational**. You don't just detect
38
+ the project type and dump code. You have a conversation with the developer
39
+ to understand their project, their use case, and exactly where chat
40
+ should go — THEN you write code that fits.
41
+
42
+ **Pattern skills (loaded from your context):**
43
+ - `cometchat-ios-core` — initialization, login, provider pattern, anti-patterns
44
+ - `cometchat-ios-components` — component catalog, props, composition patterns
45
+ - `cometchat-ios-placement` — WHERE to put chat (navigation, tabs, modals)
46
+ - `cometchat-ios-theming` — customizing colors, fonts, and styles
47
+ - `cometchat-ios-customization` — custom views, templates, formatters
48
+
49
+ **Key principle: ask, don't assume.** Every piece of information you need
50
+ from the user should be asked explicitly. Don't guess the view controller,
51
+ don't guess where the trigger button goes, don't guess the auth system.
52
+
53
+ ## Steps
54
+
55
+ ### Step 1 — Detect project type + map the project
56
+
57
+ First, check for iOS project indicators:
58
+
59
+ **Detection checklist:**
60
+ 1. Look for `.xcodeproj` or `.xcworkspace` files
61
+ 2. Check for `Podfile` (CocoaPods), `Package.swift` (SPM as a package), or SPM dep refs in `*.xcodeproj/project.pbxproj` (SPM via Xcode GUI)
62
+ 3. Read `Info.plist` for app configuration
63
+ 4. Check for SwiftUI indicators (`@main App`, `ContentView.swift`)
64
+ 5. Check for UIKit indicators (`AppDelegate.swift`, `SceneDelegate.swift`, Storyboards)
65
+
66
+ **If the project has NO `Podfile`, NO `Package.swift`, AND no SPM refs in the .xcodeproj** (the default state of every freshly Xcode-created `File → New → App` project), STOP. You must establish a dependency-management mechanism before touching integration code. Read `cometchat-ios-core` § 1.0 for the two options (CocoaPods script-able, SPM Xcode-GUI) and complete that step first. Skipping this produces an integration with `import CometChatUIKitSwift` that cannot resolve at build time.
67
+
68
+ **Then read the project yourself — this is critical.**
69
+
70
+ - `Podfile`, `Package.swift`, or SPM refs in `*.xcodeproj/project.pbxproj` — existing dependencies
71
+ - The source directory structure — list all directories under the project
72
+ - Find the entry point: `AppDelegate.swift`, `SceneDelegate.swift`, or `@main App`
73
+ - Find existing view controllers or SwiftUI views
74
+ - Find the navigation structure: `UINavigationController`, `UITabBarController`, `NavigationStack`
75
+
76
+ Store this mental map — you'll use it throughout the conversation.
77
+
78
+ **Compatibility baselines:**
79
+ - iOS 13+ required for CometChat UI Kit
80
+ - Swift 5.0+ required
81
+ - Xcode 14+ recommended
82
+
83
+ ### Step 2 — Set up credentials (onboarding)
84
+
85
+ **Ask the user for their CometChat credentials:**
86
+
87
+ Use `AskUserQuestion`:
88
+ - **question:** "Let's set up CometChat. Do you have your credentials?"
89
+ - **header:** "CometChat Setup"
90
+ - **multiSelect:** false
91
+ - **options:**
92
+ 1. label: "I have my App ID, Region, and Auth Key", description: "I'll paste them now"
93
+ 2. label: "I need to create a CometChat account", description: "Guide me to get credentials"
94
+ 3. label: "I'll set them up later", description: "Just show me the integration code"
95
+
96
+ **If they have credentials:**
97
+ Ask for:
98
+ 1. App ID (from CometChat Dashboard)
99
+ 2. Region (`us`, `eu`, or `in`)
100
+ 3. Auth Key (for development mode)
101
+
102
+ **If they need to create an account:**
103
+ Direct them to:
104
+ > "Create a free account at https://app.cometchat.com
105
+ > 1. Sign up and create a new app
106
+ > 2. Go to API & Auth Keys section
107
+ > 3. Copy your App ID, Region, and Auth Key
108
+ > Tell me when you have them."
109
+
110
+ ### Step 3 — Interactive requirements gathering
111
+
112
+ #### 3a. "What are you building?"
113
+
114
+ Use `AskUserQuestion`:
115
+ - **question:** "What kind of app are you building?"
116
+ - **header:** "Your app"
117
+ - **multiSelect:** false
118
+ - **options:**
119
+ 1. label: "Messaging app", description: "Chat is the main feature — like WhatsApp, Telegram, or iMessage"
120
+ 2. label: "Marketplace or platform", description: "Buyers and sellers communicate — like Airbnb or eBay"
121
+ 3. label: "SaaS or productivity", description: "Team chat or support chat inside a product"
122
+ 4. label: "Social or community", description: "User profiles with messaging — like a dating app or community"
123
+ 5. label: "Support or helpdesk", description: "Customer-to-agent communication"
124
+ 6. label: "Just exploring", description: "Quick demo — fastest path to see chat working"
125
+
126
+ **If "Just exploring":** Skip the rest of Step 3 and scaffold the minimal integration — one view controller showing `CometChatConversations` with `cometchat-uid-1` pre-logged-in.
127
+
128
+ #### 3b. Show what you recommend and why
129
+
130
+ | Intent | What you'll set up |
131
+ |---|---|
132
+ | **Messaging app** | A dedicated messages tab with conversation list + message view |
133
+ | **Marketplace** | A "Chat with seller" button on product screens + an inbox tab |
134
+ | **SaaS / dashboard** | A chat modal triggered from navigation + a messages section |
135
+ | **Social / community** | A full messenger with tabs: Chats, Calls, Users, Groups |
136
+ | **Support** | A floating chat button that opens a support conversation |
137
+
138
+ Ask: "Does this sound right, or do you want a different approach?"
139
+
140
+ #### 3c. Ask where things should go
141
+
142
+ **Show the user their actual project structure** — list the view controllers/views you found in Step 1.
143
+
144
+ **For UIKit projects:**
145
+ > "I found these view controllers in your project:
146
+ > - MainViewController
147
+ > - ProfileViewController
148
+ > - SettingsViewController
149
+ >
150
+ > Where should the messages screen be accessible from?"
151
+
152
+ **For SwiftUI projects:**
153
+ > "I found these views in your project:
154
+ > - ContentView
155
+ > - HomeView
156
+ > - ProfileView
157
+ >
158
+ > Where should the messages view be accessible from?"
159
+
160
+ #### 3d. Detect and ask about authentication
161
+
162
+ Look for auth libraries in the project:
163
+ - `FirebaseAuth` → Firebase Authentication
164
+ - `AuthenticationServices` → Sign in with Apple
165
+ - `GoogleSignIn` → Google Sign-In
166
+ - Custom auth patterns
167
+
168
+ Report what you found and ask:
169
+
170
+ If auth detected:
171
+ > "I see you're using [Firebase Auth / etc.]. Here's how CometChat will work:
172
+ >
173
+ > - **Development (now):** I'll use CometChat's Auth Key for quick testing
174
+ > - **Production (later):** Your server will mint per-user auth tokens
175
+ >
176
+ > Start with dev mode for now?"
177
+
178
+ If no auth detected:
179
+ > "I don't see an authentication system yet. For now, I'll set up CometChat
180
+ > with a hardcoded test user (cometchat-uid-1).
181
+ >
182
+ > When you add auth later, you can connect them."
183
+
184
+ #### 3e. Confirm the plan
185
+
186
+ **Show EXACTLY what you'll do before doing it:**
187
+
188
+ > "Here's what I'll create:
189
+ >
190
+ > **New files:**
191
+ > - `CometChatManager.swift` — initialization and login handling
192
+ > - `ChatViewController.swift` — main chat interface
193
+ >
194
+ > **Files I'll modify:**
195
+ > - `AppDelegate.swift` — add CometChat initialization
196
+ > - `MainViewController.swift` — add navigation to chat
197
+ >
198
+ > **Dependencies:** CometChatUIKitSwift, CometChatSDK
199
+ >
200
+ > **Auth mode:** Development (Auth Key)
201
+ >
202
+ > Proceed? [y/n]"
203
+
204
+ Wait for explicit confirmation.
205
+
206
+ ### Step 4 — Reference pattern skills
207
+
208
+ **All skills are already loaded in your context.** Read and follow them directly:
209
+
210
+ 1. `cometchat-ios-core` — initialization, login, provider pattern
211
+ 2. `cometchat-ios-components` — component catalog, composition patterns
212
+ 3. `cometchat-ios-placement` — placement pattern for the chosen approach
213
+ 4. `cometchat-ios-theming` — if customization is needed
214
+
215
+ ### Step 5 — Write the integration
216
+
217
+ Execute the confirmed plan:
218
+
219
+ 1. **Add dependencies** — CocoaPods or SPM
220
+ 2. **CometChatManager** — singleton for init/login
221
+ 3. **Chat UI** — appropriate components for the use case
222
+ 4. **Wire into existing project** — READ each file before modifying
223
+ 5. **Environment setup** — credentials configuration
224
+
225
+ ### Step 6 — Verify + show result
226
+
227
+ After writing code:
228
+
229
+ 1. Verify the project builds
230
+ 2. Check for any missing imports
231
+ 3. Surface any common issues
232
+
233
+ **Result message:**
234
+ > "CometChat is integrated! Here's what was set up:
235
+ >
236
+ > - CometChatManager.swift ✓
237
+ > - ChatViewController.swift ✓
238
+ > - Dependencies added ✓
239
+ >
240
+ > Next steps:
241
+ > 1. Run `pod install` (if using CocoaPods)
242
+ > 2. Build and run the app
243
+ > 3. Navigate to the chat screen
244
+ >
245
+ > **About the empty conversation list:**
246
+ > Every CometChat app has 5 pre-created test users: `cometchat-uid-1` through `uid-5`.
247
+ > To see chat working:
248
+ > 1. Open https://app.cometchat.com → your app → Users
249
+ > 2. Send a message from `cometchat-uid-2` to `cometchat-uid-1`
250
+ > 3. Refresh the app to see the conversation"
251
+
252
+ ### Step 7 — Iteration menu
253
+
254
+ Use `AskUserQuestion`:
255
+ - **question:** "What would you like to do next?"
256
+ - **header:** "Next step"
257
+ - **options:**
258
+ 1. label: "Customize look and feel", description: "Change colors, fonts, and styles"
259
+ 2. label: "Add a feature", description: "Calls, reactions, polls, AI features"
260
+ 3. label: "Customize a component", description: "Custom message bubbles, headers, etc."
261
+ 4. label: "Set up push notifications", description: "APNs setup for message notifications"
262
+ 5. label: "Set up production auth", description: "Replace dev Auth Key with server tokens"
263
+ 6. label: "Troubleshoot an issue", description: "Debug common problems"
264
+ 7. label: "I'm done", description: "Exit"
265
+
266
+ ## Hard rules
267
+
268
+ ### Always
269
+
270
+ - **Ask, don't assume.** Every integration decision should be confirmed.
271
+ - **Always detect project type first.** Do not assume UIKit or SwiftUI.
272
+ - NEVER replace existing project files unless the user explicitly confirms.
273
+ - ALWAYS read existing files before modifying them.
274
+ - ALWAYS show the plan and get confirmation before writing.
275
+ - For component names and properties, use the `cometchat-ios-components` skill — never invent from training data.
276
+
277
+ ### iOS-specific
278
+
279
+ - **Initialize CometChat in AppDelegate or App init** — before any UI renders
280
+ - **Use the singleton pattern** for CometChatManager
281
+ - **Handle async initialization properly** — don't show chat UI until init completes
282
+ - **Respect iOS lifecycle** — handle background/foreground transitions
283
+ - **Support both light and dark mode** — use CometChatTheme
284
+
285
+ ## Error handling
286
+
287
+ Common iOS integration errors:
288
+
289
+ | Error | Cause | Solution |
290
+ |---|---|---|
291
+ | "CometChat is not initialized" | UI shown before init completes | Use completion handler pattern |
292
+ | "Invalid App ID" | Wrong credentials | Verify App ID in dashboard |
293
+ | "Module not found" | Dependencies not installed | Run `pod install` or add SPM package |
294
+ | Build errors | Missing imports | Add `import CometChatUIKitSwift` |
295
+
296
+ ## Skill routing reference
297
+
298
+ | Skill | When to load |
299
+ |---|---|
300
+ | `cometchat-ios-core` | Always — before any integration code |
301
+ | `cometchat-ios-components` | Always — before writing component code |
302
+ | `cometchat-ios-placement` | When integrating — for placement patterns |
303
+ | `cometchat-ios-theming` | When customizing themes |
304
+ | `cometchat-ios-customization` | When writing custom views or templates |
305
+ | `cometchat-ios-features` | When adding calls, reactions, polls, AI features |
306
+ | `cometchat-ios-push` | When setting up push notifications |
307
+ | `cometchat-ios-production` | When setting up production auth |
308
+ | `cometchat-ios-troubleshooting` | When diagnosing problems |
309
+
310
+ ## Complete Skill Set
311
+
312
+ This iOS UI Kit skill set includes 9 comprehensive skills:
313
+
314
+ 1. **cometchat-ios** (this file) — Entry-point dispatcher
315
+ 2. **cometchat-ios-core** — Initialization, login, manager pattern
316
+ 3. **cometchat-ios-components** — Complete component catalog
317
+ 4. **cometchat-ios-placement** — Navigation patterns, tabs, modals
318
+ 5. **cometchat-ios-theming** — Colors, fonts, dark mode
319
+ 6. **cometchat-ios-customization** — Custom views, templates, formatters
320
+ 7. **cometchat-ios-features** — Calls, reactions, polls, AI, extensions
321
+ 8. **cometchat-ios-push** — Push notifications setup
322
+ 9. **cometchat-ios-production** — Server-side auth, security
323
+ 10. **cometchat-ios-troubleshooting** — Common issues and debugging