cometchat/cometchat-skills/cometchat-android-v6-compose-placement
Claude Code and agent skill by cometchat/cometchat-skills
- community
Checking that the SKILL.md file is still in the repository.
Where the CometChat Android v6 chat UI goes in a Jetpack Compose app — the default conversations→message NavHost flow, growing to the tab-based app (chats/users/groups/calls + detail, thread and search routes + incoming calls), a single one-to-one screen, or chat embedded in an existing composable, with a correct back stack and IME handling. Triggers: 'cometchat compose navigation', 'chat screen navhost', 'tab based chat compose', 'embed cometchat in a composable', 'full chat app jetpack compos…
Install
npx vskill@latest install cometchat/cometchat-skills/cometchat-android-v6-compose-placementSKILL.md
The same SKILL.md was published earlier as cometchat/cometchat-skills/cometchat-android-v6-compose-placement.
Ground truth: catalogandroid-v6.json+contracts.android-v6.json(core-chat-surface,chat-experience) + the docs recipes (conversation-message-view,tab-based-chat,one-to-one-chat— Compose tab). Param shapes verified against the INSTALLED 6.0.5 Compose source.⚠️ Jetpack Compose cohort. Screens are composables on aNavHost. The Views cohort (Activities + XML) is a separate skill.
Companion skills (read first)
cometchat-android-v6-core— install, credentials,initFromSettings → login → render, and `references/layout.md` (the ONE sizing standard). Sizing rules live THERE.cometchat-android-v6-compose-components— the param conventions (onX/hideX/@Composableslots).
Use this skill when
"add a chat route to my NavHost", "build the full chat app in Compose", "open a chat screen for this user", "embed the conversation list in an existing composable", "the composer is under the keyboard".
Prerequisites & install
⚠️ Build setup (same for Compose):android.useAndroidX=trueingradle.properties. On 6.1.1 that's all: the POMs carry theannotations-java5exclusion and chat-sdk 5.0.7 is all-AndroidX (verified: a clean Compose app builds with no exclude and Jetifier off). On 6.0.x you ALSO needconfigurations.all { exclude(group = "org.jetbrains", module = "annotations-java5") }+android.enableJetifier=true, or the FIRST build fails (~40Duplicate classerrors viachatuikit-core-android). Full block:cometchat-android-v6-core§Prerequisites & install.
Same kit + initFromSettings → login gate as core — no chat route is shown before login resolves; gate the NavHost (or the start destination) on it. Compose cohort artifact only.
The rule that governs every layout: one screen per route
Compose composes by navigation, not side-by-side panes. List, message, thread and search are separate NavHost destinations with a real back stack. Never build a web-style two-pane split on a phone.
Add Navigation Compose — the kit does not pull it in. Every placement below uses NavHost / rememberNavController; without the dependency the app fails with Unresolved reference: rememberNavController:
Placement 1 — conversations → messages (the default)
The core-chat-surface contract. core carries the full code; the structure:
⚠️ **Use aNavHost, notif/else— mandatory as soon as a THREAD is in play (the defaultsurface includes one), so Placement 1 already uses it. This is correctness, not polish.**CometChatMessageListresolves itsCometChatMessageListViewModelfrom the enclosingViewModelStoreOwner. In oneif/elsecomposition scope both the main list and the thread listshare the Activity's store, so the thread REUSES the main chat's ViewModel,parentMessageIdisinert, and the thread screen silently renders the ENTIRE conversation — no error, no warning(verified on device, 6.0.6). EachNavHostdestination is its ownViewModelStoreOwner, whichis what makes the thread scope hold. A production app also gets a real back stack from it. PassUser/Group(bothParcelable) or re-fetch by uid/guid on the destination (Placement 5'sgetUser/getGroup) — safer across process death.
`weight(1f)` on the list is load-bearing: without it the list is unbounded and the composer is pushed off-screen. imePadding() keeps the composer above the keyboard.
Placement 2 — a chat tab in an existing app
Put CometChatConversations inside your existing Scaffold + NavigationBar tab. The tab shows the LIST; tapping a row navigates to the message route above the bottom bar (full-screen), so the composer isn't fighting the nav bar. Reuse the host's NavHost — additive, never rewrite the graph.
Placement 3 — grow to the full app (the tab-based recipe)
The chat-experience contract: a NavigationBar over four destinations — Chats (CometChatConversations) · Users (CometChatUsers) · Groups (CometChatGroups) · Calls (CometChatCallLogs) — each item click routing into the same message screen. Then, as the plan names them:
⚠️ A Groups tap is NOT a Conversations tap.CometChatGroupslists groups the user may nothave joined; routing one straight to the message screen renders the kit's error state with alive-but-dead composer (verified on device). Gate on membership (group.isJoined— the fieldhasJoinedis private;isJoined()is the accessor) and join first when false —CometChat.joinGroup(guid, groupType, password, CallbackListener<Group>)— the listener is REQUIRED (4 params), prompting for the password whengroupTypeisCometChatConstants.GROUP_TYPE_PASSWORD. Only a Conversations row is guaranteed joined, becausea conversation exists only once you are in it.
- Detail routes — user detail (block/unblock) and group detail via
CometChatGroupMembers(kick/ban/scope, role-gated). - Thread route — note Compose takes the parent as params, not setters:
- Search route — (import
com.cometchat.uikit.core.constants.SearchScope)CometChatSearch(searchScopes = listOf(SearchScope.CONVERSATIONS, SearchScope.MESSAGES), uid = ..., guid = ..., onConversationClick = ..., onMessageClick = ..., onBackPress = ...). Omituid/guidfor global search; pass one to scope to the open chat. - Incoming calls at app level —
CometChatIncomingCalldriven by a global call listener, hoisted above the NavHost so a call surfaces from any tab (→cometchat-android-v6-calls).
Each tab keeps its own back stack (navController per tab, or saveState/restoreState on the bottom-nav items).
Placement 4 — embed in an existing composable
Give the component a bounded box: Modifier.weight(1f) inside a Column, Modifier.height(360.dp), or fillMaxSize() in its own pane. Never place it in an unbounded parent (a Column with verticalScroll, or no weight) — the kit fills what you give it, and unbounded means nothing. Never nest CometChatMessageList inside another scrollable.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cometchat-android-v6-compose-placement/SKILL.md
Popularity
- Repository stars
- 120
- Repository forks
- 2
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cometchat/cometchat-skills/cometchat-android-v6-compose-placement)