{"id":"edf9671d-6b27-456f-83a7-b63356c14000","shortId":"q27UD4","kind":"skill","title":"cometchat-android-v6-extensions","tagline":"CometChat Android UIKit v6 extension architecture — DataSource/Repository pattern, custom message types, and data-layer overrides","description":"> **Companion skills:** cometchat-android-v6-features (feature catalog), cometchat-android-v6-kotlin-customization, cometchat-android-v6-compose-customization\n\n## Purpose\n\nExtend the CometChat UIKit v6 data layer using the clean architecture DataSource/Repository pattern. Create custom DataSource implementations, override repository behavior, and register custom message types.\n\n## Use this skill when\n\n- Creating a custom DataSource implementation to change how data is fetched\n- Overriding default repository behavior\n- Registering custom message types\n- Understanding the data flow from DataSource → Repository → ViewModel\n\n## Do not use this skill when\n\n- Customizing UI/bubble rendering (use `cometchat-*-customization` — that's the BubbleFactory layer)\n- Working with component APIs (use `cometchat-*-components`)\n\n## 1. Clean Architecture Overview\n\nThe `chatuikit-core` module follows clean architecture with three layers:\n\n```\n┌─────────────────────────────────────────┐\n│  UI Layer (chatuikit-kotlin / compose)  │\n│  Components observe ViewModel state     │\n├─────────────────────────────────────────┤\n│  ViewModel Layer (core/viewmodel/)      │\n│  Calls use cases / repositories         │\n├─────────────────────────────────────────┤\n│  Domain Layer (core/domain/)            │\n│  Repository interfaces, Use cases       │\n├─────────────────────────────────────────┤\n│  Data Layer (core/data/)                │\n│  DataSource interfaces + impls          │\n│  Repository implementations            │\n└─────────────────────────────────────────┘\n```\n\n## 2. DataSource Pattern\n\nEach feature area has a DataSource interface and default implementation:\n\n```\ncore/data/datasource/\n├── ConversationListDataSource.kt       (interface)\n├── ConversationListDataSourceImpl.kt   (default implementation)\n├── MessageListDataSource.kt\n├── MessageListDataSourceImpl.kt\n├── ...\n```\n\n### 2.1 All DataSource Types\n\n| DataSource | Implementation | What it provides |\n|---|---|---|\n| `CallButtonsDataSource` | `CallButtonsDataSourceImpl` | Call button actions |\n| `CallLogsDataSource` | `CallLogsDataSourceImpl` | Call history fetching |\n| `CollaborativeDataSource` | `CollaborativeDataSourceImpl` | Document/whiteboard data |\n| `ConversationListDataSource` | `ConversationListDataSourceImpl` | Conversation list fetching |\n| `GroupMembersDataSource` | `GroupMembersDataSourceImpl` | Group member operations |\n| `GroupsDataSource` | `GroupsDataSourceImpl` | Group list fetching |\n| `MessageComposerDataSource` | `MessageComposerDataSourceImpl` | Composer actions/attachments |\n| `MessageHeaderDataSource` | `MessageHeaderDataSourceImpl` | Header data (name, status) |\n| `MessageInformationDataSource` | `MessageInformationDataSourceImpl` | Read receipts, delivery info |\n| `MessageListDataSource` | `MessageListDataSourceImpl` | Message fetching/pagination |\n| `PollDataSource` | `PollDataSourceImpl` | Poll creation/voting |\n| `ReactionListDataSource` | `ReactionListDataSourceImpl` | Reaction data |\n| `SearchDataSource` | `SearchDataSourceImpl` | Global search |\n| `StickerDataSource` | `StickerDataSourceImpl` | Sticker fetching |\n| `UsersDataSource` | `UsersDataSourceImpl` | User list fetching |\n\n### 2.2 Additional DataSource\n\n| File | Purpose |\n|---|---|\n| `MessageReceiptEventListener.kt` | Listens for receipt events at the data layer |\n\n## 3. Repository Pattern\n\nRepositories in `core/data/repository/` implement domain interfaces from `core/domain/repository/`:\n\n```\ncore/data/repository/\n├── CallButtonsRepositoryImpl.kt\n├── CallLogsRepositoryImpl.kt\n├── ConversationListRepositoryImpl.kt\n├── GroupMembersRepositoryImpl.kt\n├── GroupsRepositoryImpl.kt\n├── MessageComposerRepositoryImpl.kt\n├── MessageHeaderRepositoryImpl.kt\n├── MessageInformationRepositoryImpl.kt\n├── MessageListRepositoryImpl.kt\n├── PollRepositoryImpl.kt\n├── ReactionListRepositoryImpl.kt\n├── SearchRepositoryImpl.kt\n├── StickerRepositoryImpl.kt\n├── UsersRepositoryImpl.kt\n```\n\nEach repository wraps a DataSource and adds business logic, caching, or transformation.\n\n## 4. ViewModel Layer\n\nViewModels in `core/viewmodel/` consume repositories and expose UI state:\n\n```kotlin\n// Example: CometChatConversationsViewModel\n// - Injected via CometChatConversationsViewModelFactory\n// - Exposes StateFlow<ConversationListUIState>\n// - Calls ConversationListRepositoryImpl internally\n```\n\nViewModel factories in `core/factory/` handle dependency injection:\n\n| Factory | ViewModel |\n|---|---|\n| `CometChatConversationsViewModelFactory` | `CometChatConversationsViewModel` |\n| `CometChatMessageListViewModelFactory` | `CometChatMessageListViewModel` |\n| `CometChatGroupsViewModelFactory` | `CometChatGroupsViewModel` |\n| `CometChatUsersViewModelFactory` | `CometChatUsersViewModel` |\n| `CometChatCallLogsViewModelFactory` | `CometChatCallLogsViewModel` |\n| `CometChatMessageComposerViewModelFactory` | `CometChatMessageComposerViewModel` |\n| `CometChatMessageHeaderViewModelFactory` | `CometChatMessageHeaderViewModel` |\n| `CometChatGroupMembersViewModelFactory` | `CometChatGroupMembersViewModel` |\n| `CometChatMessageInformationViewModelFactory` | `CometChatMessageInformationViewModel` |\n| `CometChatReactionListViewModelFactory` | `CometChatReactionListViewModel` |\n| `CometChatSearchViewModelFactory` | `CometChatSearchViewModel` |\n| `CometChatCallButtonsViewModelFactory` | `CometChatCallButtonsViewModel` |\n| `CometChatCreatePollViewModelFactory` | `CometChatCreatePollViewModel` |\n| `CometChatThreadHeaderViewModelFactory` | `CometChatThreadHeaderViewModel` |\n| `CometChatStickerKeyboardViewModelFactory` | `CometChatStickerKeyboardViewModel` |\n| `CometChatIncomingCallViewModelFactory` | `CometChatIncomingCallViewModel` |\n| `CometChatOutgoingCallViewModelFactory` | `CometChatOutgoingCallViewModel` |\n| `CometChatAIAssistantChatHistoryViewModelFactory` | `CometChatAIAssistantChatHistoryViewModel` |\n\n## 5. UI State Classes\n\nEach ViewModel exposes a sealed UI state from `core/state/`:\n\n| State Class | Used By |\n|---|---|\n| `CallLogsUIState` | Call logs |\n| `MessageListUIState` | Message list |\n| `GroupsUIState` | Groups list |\n| `UsersUIState` | Users list |\n| `GroupMembersUIState` | Group members |\n| `MessageComposerUIState` | Composer |\n| `MessageHeaderUIState` | Header |\n| `MessageInformationUIState` | Message info |\n| `ReactionListUIState` | Reactions |\n| `SearchUIState` | Search |\n| `CallButtonsUIState` | Call buttons |\n| `CreatePollUIState` | Poll creation |\n| `ThreadHeaderUIState` | Thread header |\n| `StickerKeyboardUIState` | Sticker keyboard |\n| `IncomingCallUIState` | Incoming call |\n| `OutgoingCallUIState` | Outgoing call |\n| `ChatHistoryUIState` | AI chat history |\n| `ConversationStarterUIState` | AI conversation starter |\n| `ConversationSummaryUIState` | AI conversation summary |\n| `SmartRepliesUIState` | AI smart replies |\n| `DeleteState` | Delete operations |\n| `UIState` | Base UI state |\n\n## 6. Data Flow\n\n```\nUser Action → Component → ViewModel → Repository → DataSource → CometChat SDK\n                                                                      ↓\nUI Update  ← Component ← ViewModel ← StateFlow ← Repository ← SDK Response\n```\n\n## Hard rules\n\n- DataSources are the DATA layer — they fetch and mutate data. Do NOT confuse with BubbleFactory which is the UI rendering layer\n- The v5 `DataSource` decorator / `ChatConfigurator` pattern for bubble customization does NOT exist in v6 — use BubbleFactory instead (see `cometchat-*-customization`)\n- ViewModels are shared across both UI stacks (Kotlin Views and Compose) — they live in `chatuikit-core`\n- Always use the provided ViewModel factories — do not instantiate ViewModels directly","tags":["cometchat","android","extensions","skills","agent-skills","ai-agent","chat","claude-code","cursor","messaging","nextjs","react"],"capabilities":["skill","source-cometchat","skill-cometchat-android-v6-extensions","topic-agent-skills","topic-ai-agent","topic-chat","topic-claude-code","topic-cometchat","topic-cursor","topic-messaging","topic-nextjs","topic-react","topic-react-native","topic-ui-kit"],"categories":["cometchat-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/cometchat/cometchat-skills/cometchat-android-v6-extensions","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add cometchat/cometchat-skills","source_repo":"https://github.com/cometchat/cometchat-skills","install_from":"skills.sh"}},"qualityScore":"0.463","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 27 github stars · SKILL.md body (7,648 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:04:46.540Z","embedding":null,"createdAt":"2026-05-07T13:05:05.786Z","updatedAt":"2026-05-18T19:04:46.540Z","lastSeenAt":"2026-05-18T19:04:46.540Z","tsv":"'1':124 '2':171 '2.1':192 '2.2':271 '3':285 '4':323 '5':391 '6':475 'across':540 'action':205,479 'actions/attachments':233 'add':317 'addit':272 'ai':453,457,461,465 'alway':554 'android':3,7,26,33,39 'api':120 'architectur':11,54,126,135 'area':176 'base':472 'behavior':63,87 'bubbl':524 'bubblefactori':115,510,532 'busi':318 'button':204,436 'cach':320 'call':152,203,208,343,409,435,448,451 'callbuttonsdatasourc':201 'callbuttonsdatasourceimpl':202 'callbuttonsrepositoryimpl.kt':297 'callbuttonsuist':434 'calllogsdatasourc':206 'calllogsdatasourceimpl':207 'calllogsrepositoryimpl.kt':298 'calllogsuist':408 'case':154,162 'catalog':30 'chang':79 'chat':454 'chatconfigur':521 'chathistoryuist':452 'chatuikit':130,142,552 'chatuikit-cor':129,551 'chatuikit-kotlin':141 'class':394,405 'clean':53,125,134 'collaborativedatasourc':211 'collaborativedatasourceimpl':212 'cometchat':2,6,25,32,38,46,110,122,484,535 'cometchat-android-v6-compose-customization':37 'cometchat-android-v6-extensions':1 'cometchat-android-v6-features':24 'cometchat-android-v6-kotlin-customization':31 'cometchataiassistantchathistoryviewmodel':390 'cometchataiassistantchathistoryviewmodelfactori':389 'cometchatcallbuttonsviewmodel':378 'cometchatcallbuttonsviewmodelfactori':377 'cometchatcalllogsviewmodel':364 'cometchatcalllogsviewmodelfactori':363 'cometchatconversationsviewmodel':337,356 'cometchatconversationsviewmodelfactori':340,355 'cometchatcreatepollviewmodel':380 'cometchatcreatepollviewmodelfactori':379 'cometchatgroupmembersviewmodel':370 'cometchatgroupmembersviewmodelfactori':369 'cometchatgroupsviewmodel':360 'cometchatgroupsviewmodelfactori':359 'cometchatincomingcallviewmodel':386 'cometchatincomingcallviewmodelfactori':385 'cometchatmessagecomposerviewmodel':366 'cometchatmessagecomposerviewmodelfactori':365 'cometchatmessageheaderviewmodel':368 'cometchatmessageheaderviewmodelfactori':367 'cometchatmessageinformationviewmodel':372 'cometchatmessageinformationviewmodelfactori':371 'cometchatmessagelistviewmodel':358 'cometchatmessagelistviewmodelfactori':357 'cometchatoutgoingcallviewmodel':388 'cometchatoutgoingcallviewmodelfactori':387 'cometchatreactionlistviewmodel':374 'cometchatreactionlistviewmodelfactori':373 'cometchatsearchviewmodel':376 'cometchatsearchviewmodelfactori':375 'cometchatstickerkeyboardviewmodel':384 'cometchatstickerkeyboardviewmodelfactori':383 'cometchatthreadheaderviewmodel':382 'cometchatthreadheaderviewmodelfactori':381 'cometchatusersviewmodel':362 'cometchatusersviewmodelfactori':361 'companion':22 'compon':119,123,145,480,488 'compos':41,144,232,424,547 'confus':508 'consum':329 'convers':217,458,462 'conversationlistdatasourc':215 'conversationlistdatasource.kt':185 'conversationlistdatasourceimpl':216 'conversationlistdatasourceimpl.kt':187 'conversationlistrepositoryimpl':344 'conversationlistrepositoryimpl.kt':299 'conversationstarteruist':456 'conversationsummaryuist':460 'core':131,553 'core/data':165 'core/data/datasource':184 'core/data/repository':290,296 'core/domain':158 'core/domain/repository':295 'core/factory':349 'core/state':403 'core/viewmodel':151,328 'creat':57,73 'createpolluist':437 'creation':439 'creation/voting':253 'custom':14,36,42,58,66,75,89,106,111,525,536 'data':19,49,81,94,163,214,237,257,283,476,499,505 'data-lay':18 'datasourc':59,76,97,166,172,179,194,196,273,315,483,496,519 'datasource/repository':12,55 'decor':520 'default':85,182,188 'delet':469 'deletest':468 'deliveri':244 'depend':351 'direct':564 'document/whiteboard':213 'domain':156,292 'event':280 'exampl':336 'exist':528 'expos':332,341,397 'extend':44 'extens':5,10 'factori':347,353,559 'featur':28,29,175 'fetch':83,210,219,229,265,270,502 'fetching/pagination':249 'file':274 'flow':95,477 'follow':133 'global':260 'group':222,227,415,421 'groupmembersdatasourc':220 'groupmembersdatasourceimpl':221 'groupmembersrepositoryimpl.kt':300 'groupmembersuist':420 'groupsdatasourc':225 'groupsdatasourceimpl':226 'groupsrepositoryimpl.kt':301 'groupsuist':414 'handl':350 'hard':494 'header':236,426,442 'histori':209,455 'impl':168 'implement':60,77,170,183,189,197,291 'incom':447 'incomingcalluist':446 'info':245,429 'inject':338,352 'instanti':562 'instead':533 'interfac':160,167,180,186,293 'intern':345 'keyboard':445 'kotlin':35,143,335,544 'layer':20,50,116,138,140,150,157,164,284,325,500,516 'list':218,228,269,413,416,419 'listen':277 'live':549 'log':410 'logic':319 'member':223,422 'messag':15,67,90,248,412,428 'messagecomposerdatasourc':230 'messagecomposerdatasourceimpl':231 'messagecomposerrepositoryimpl.kt':302 'messagecomposeruist':423 'messageheaderdatasourc':234 'messageheaderdatasourceimpl':235 'messageheaderrepositoryimpl.kt':303 'messageheaderuist':425 'messageinformationdatasourc':240 'messageinformationdatasourceimpl':241 'messageinformationrepositoryimpl.kt':304 'messageinformationuist':427 'messagelistdatasourc':246 'messagelistdatasource.kt':190 'messagelistdatasourceimpl':247 'messagelistdatasourceimpl.kt':191 'messagelistrepositoryimpl.kt':305 'messagelistuist':411 'messagereceipteventlistener.kt':276 'modul':132 'mutat':504 'name':238 'observ':146 'oper':224,470 'outgo':450 'outgoingcalluist':449 'overrid':21,61,84 'overview':127 'pattern':13,56,173,287,522 'poll':252,438 'polldatasourc':250 'polldatasourceimpl':251 'pollrepositoryimpl.kt':306 'provid':200,557 'purpos':43,275 'reaction':256,431 'reactionlistdatasourc':254 'reactionlistdatasourceimpl':255 'reactionlistrepositoryimpl.kt':307 'reactionlistuist':430 'read':242 'receipt':243,279 'regist':65,88 'render':108,515 'repli':467 'repositori':62,86,98,155,159,169,286,288,312,330,482,491 'respons':493 'rule':495 'sdk':485,492 'seal':399 'search':261,433 'searchdatasourc':258 'searchdatasourceimpl':259 'searchrepositoryimpl.kt':308 'searchuist':432 'see':534 'share':539 'skill':23,71,104 'skill-cometchat-android-v6-extensions' 'smart':466 'smartrepliesuist':464 'source-cometchat' 'stack':543 'starter':459 'state':148,334,393,401,404,474 'stateflow':342,490 'status':239 'sticker':264,444 'stickerdatasourc':262 'stickerdatasourceimpl':263 'stickerkeyboarduist':443 'stickerrepositoryimpl.kt':309 'summari':463 'thread':441 'threadheaderuist':440 'three':137 'topic-agent-skills' 'topic-ai-agent' 'topic-chat' 'topic-claude-code' 'topic-cometchat' 'topic-cursor' 'topic-messaging' 'topic-nextjs' 'topic-react' 'topic-react-native' 'topic-ui-kit' 'transform':322 'type':16,68,91,195 'ui':139,333,392,400,473,486,514,542 'ui/bubble':107 'uikit':8,47 'uistat':471 'understand':92 'updat':487 'use':51,69,102,109,121,153,161,406,531,555 'user':268,418,478 'usersdatasourc':266 'usersdatasourceimpl':267 'usersrepositoryimpl.kt':310 'usersuist':417 'v5':518 'v6':4,9,27,34,40,48,530 'via':339 'view':545 'viewmodel':99,147,149,324,326,346,354,396,481,489,537,558,563 'work':117 'wrap':313","prices":[{"id":"d45249b9-4b0f-4bd3-baa7-99b1ae04b6cc","listingId":"edf9671d-6b27-456f-83a7-b63356c14000","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"cometchat","category":"cometchat-skills","install_from":"skills.sh"},"createdAt":"2026-05-07T13:05:05.786Z"}],"sources":[{"listingId":"edf9671d-6b27-456f-83a7-b63356c14000","source":"github","sourceId":"cometchat/cometchat-skills/cometchat-android-v6-extensions","sourceUrl":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-extensions","isPrimary":false,"firstSeenAt":"2026-05-07T13:05:05.786Z","lastSeenAt":"2026-05-18T19:04:46.540Z"}],"details":{"listingId":"edf9671d-6b27-456f-83a7-b63356c14000","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cometchat","slug":"cometchat-android-v6-extensions","github":{"repo":"cometchat/cometchat-skills","stars":27,"topics":["agent-skills","ai-agent","chat","claude-code","cometchat","cursor","messaging","nextjs","react","react-native","ui-kit"],"license":null,"html_url":"https://github.com/cometchat/cometchat-skills","pushed_at":"2026-05-18T05:04:24Z","description":"Add CometChat chat to any React, Next.js, React Native, Angular, Android, iOS, or Flutter project through your AI coding agent. Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and 50+ more agents.","skill_md_sha":"fb489e84e5ad71ce74cb39f5742e94c4f77995e1","skill_md_path":"skills/cometchat-android-v6-extensions/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-extensions"},"layout":"multi","source":"github","category":"cometchat-skills","frontmatter":{"name":"cometchat-android-v6-extensions","license":"MIT","description":"CometChat Android UIKit v6 extension architecture — DataSource/Repository pattern, custom message types, and data-layer overrides","compatibility":"Android 9.0+ (API 28); Kotlin 1.9+; com.cometchat:chatuikit-core-android:6.x"},"skills_sh_url":"https://skills.sh/cometchat/cometchat-skills/cometchat-android-v6-extensions"},"updatedAt":"2026-05-18T19:04:46.540Z"}}