{"id":"dee713b4-48a0-4d9f-adac-e918bb7261e4","shortId":"BQVuN8","kind":"skill","title":"cometchat-android-v5-production","tagline":"Production readiness for CometChat Android — server-side token auth, user management CRUD, ProGuard rules, and security checklist.","description":"> **Companion skills:** `cometchat-android-v5-core` covers dev-mode login;\n> `cometchat-android-v5-push` covers push notification setup for production.\n\n## Purpose\n\nThis skill covers hardening a CometChat Android integration for production: replacing client-side Auth Key with server-side token generation, user management CRUD, ProGuard/R8 rules, and security best practices.\n\n---\n\n## Use this skill when\n\n- \"Set up production auth\"\n- \"Replace Auth Key with tokens\"\n- \"ProGuard is breaking CometChat\"\n- \"How do I create CometChat users from my backend?\"\n\n## Do not use this skill when\n\n- Setting up dev-mode login → use `cometchat-android-v5-core`\n- Adding features → use `cometchat-android-v5-features`\n\n---\n\n## 1. Why production auth matters\n\nIn dev mode, `CometChatUIKit.login(uid)` uses the Auth Key embedded in your app. Anyone can decompile the APK, extract the key, and login as ANY user. Production deployments MUST use server-side token generation.\n\n## 2. Token auth flow\n\n```\nClient → Your Server → CometChat REST API → auth token → Client\nClient calls CometChatUIKit.loginWithAuthToken(token)\n```\n\nYour server calls: `POST https://{APP_ID}.api-{REGION}.cometchat.io/v3/users/{uid}/auth_tokens`\nwith headers: `appId`, `apiKey` (REST API Key, NOT Auth Key).\n\n## 3. Client-side implementation\n\n**Java:**\n```java\n// Fetch token from YOUR backend\nString token = fetchTokenFromYourServer(currentUserId);\n\nCometChatUIKit.loginWithAuthToken(token, new CometChat.CallbackListener<User>() {\n    @Override\n    public void onSuccess(User user) {\n        // Navigate to chat\n    }\n    @Override\n    public void onError(CometChatException e) {\n        // Handle error\n    }\n});\n```\n\n## 4. ProGuard/R8 rules\n\nAdd to `proguard-rules.pro`:\n\n```\n-keep class com.cometchat.** { *; }\n-keep class com.cometchat.chatuikit.** { *; }\n-dontwarn com.cometchat.**\n```\n\n## 5. Security checklist\n\n- [ ] Auth Key removed from client code\n- [ ] REST API Key stored server-side only\n- [ ] `loginWithAuthToken()` used instead of `login(uid)`\n- [ ] ProGuard rules added\n- [ ] Network security config allows CometChat domains\n- [ ] Push token unregistered on logout\n\n---\n\n## Hard rules\n\n- **Never ship Auth Key in production APKs.** Use `loginWithAuthToken()`.\n- **REST API Key ≠ Auth Key.** REST API Key is server-only. Auth Key is client-side dev-only.\n- **Add ProGuard keep rules.** R8 can strip CometChat classes needed at runtime.","tags":["cometchat","android","production","skills","agent-skills","ai-agent","chat","claude-code","cursor","messaging","nextjs","react"],"capabilities":["skill","source-cometchat","skill-cometchat-android-v5-production","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-v5-production","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 (2,412 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:45.198Z","embedding":null,"createdAt":"2026-05-07T13:05:04.099Z","updatedAt":"2026-05-18T19:04:45.198Z","lastSeenAt":"2026-05-18T19:04:45.198Z","tsv":"'/auth_tokens':200 '/v3/users/':198 '1':131 '2':171 '3':211 '4':248 '5':262 'ad':123,287 'add':251,331 'allow':291 'android':3,10,28,38,54,120,128 'anyon':149 'api':180,194,206,272,311,316 'apikey':204 'apk':153,307 'app':148,192 'appid':203 'auth':15,62,86,88,134,143,173,181,209,265,303,313,322 'backend':104,222 'best':77 'break':94 'call':185,190 'chat':239 'checklist':23,264 'class':255,258,339 'client':60,175,183,184,213,269,326 'client-sid':59,212,325 'code':270 'com.cometchat':256,261 'com.cometchat.chatuikit':259 'cometchat':2,9,27,37,53,95,100,119,127,178,292,338 'cometchat-android-v5-core':26,118 'cometchat-android-v5-features':126 'cometchat-android-v5-production':1 'cometchat-android-v5-push':36 'cometchat.callbacklistener':230 'cometchat.io':197 'cometchat.io/v3/users/':196 'cometchatexcept':244 'cometchatuikit.login':139 'cometchatuikit.loginwithauthtoken':186,227 'companion':24 'config':290 'core':30,122 'cover':31,41,50 'creat':99 'crud':18,72 'currentuserid':226 'decompil':151 'deploy':163 'dev':33,114,137,329 'dev-mod':32,113 'dev-on':328 'domain':293 'dontwarn':260 'e':245 'embed':145 'error':247 'extract':154 'featur':124,130 'fetch':218 'fetchtokenfromyourserv':225 'flow':174 'generat':69,170 'handl':246 'hard':299 'harden':51 'header':202 'id':193 'implement':215 'instead':281 'integr':55 'java':216,217 'keep':254,257,333 'key':63,89,144,156,207,210,266,273,304,312,314,317,323 'login':35,116,158,283 'loginwithauthtoken':279,309 'logout':298 'manag':17,71 'matter':135 'mode':34,115,138 'must':164 'navig':237 'need':340 'network':288 'never':301 'new':229 'notif':43 'onerror':243 'onsuccess':234 'overrid':231,240 'post':191 'practic':78 'product':5,6,46,57,85,133,162,306 'proguard':19,92,285,332 'proguard-rules.pro':253 'proguard/r8':73,249 'public':232,241 'purpos':47 'push':40,42,294 'r8':335 'readi':7 'region':195 'remov':267 'replac':58,87 'rest':179,205,271,310,315 'rule':20,74,250,286,300,334 'runtim':342 'secur':22,76,263,289 'server':12,66,167,177,189,276,320 'server-on':319 'server-sid':11,65,166,275 'set':83,111 'setup':44 'ship':302 'side':13,61,67,168,214,277,327 'skill':25,49,81,109 'skill-cometchat-android-v5-production' 'source-cometchat' 'store':274 'string':223 'strip':337 'token':14,68,91,169,172,182,187,219,224,228,295 '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' 'uid':140,199,284 'unregist':296 'use':79,107,117,125,141,165,280,308 'user':16,70,101,161,235,236 'v5':4,29,39,121,129 'void':233,242","prices":[{"id":"f42eef92-42e9-4322-8035-867b57a881bb","listingId":"dee713b4-48a0-4d9f-adac-e918bb7261e4","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:04.099Z"}],"sources":[{"listingId":"dee713b4-48a0-4d9f-adac-e918bb7261e4","source":"github","sourceId":"cometchat/cometchat-skills/cometchat-android-v5-production","sourceUrl":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v5-production","isPrimary":false,"firstSeenAt":"2026-05-07T13:05:04.099Z","lastSeenAt":"2026-05-18T19:04:45.198Z"}],"details":{"listingId":"dee713b4-48a0-4d9f-adac-e918bb7261e4","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cometchat","slug":"cometchat-android-v5-production","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":"05283595e2f58c3951a75e33427b46c7d85ec9a2","skill_md_path":"skills/cometchat-android-v5-production/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v5-production"},"layout":"multi","source":"github","category":"cometchat-skills","frontmatter":{"name":"cometchat-android-v5-production","license":"MIT","description":"Production readiness for CometChat Android — server-side token auth, user management CRUD, ProGuard rules, and security checklist.","compatibility":"Android 7.0+; Java 8+; Kotlin 1.8+; com.cometchat:chat-uikit-android:5.x"},"skills_sh_url":"https://skills.sh/cometchat/cometchat-skills/cometchat-android-v5-production"},"updatedAt":"2026-05-18T19:04:45.198Z"}}