/cometchat-skills:cometchat-android-v6-compose-customizationfrom cometchat-skills
Customizes CometChat Android v6 UI in Jetpack Compose: theming via CometChatTheme composable, light/dark color schemes, per-component styles, composable view slots, custom message rendering with bubble factories, localization, and sounds.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ground truth: catalog
android-v6.json+ the Compose theme source. ⚠️ The theming API below was read from the INSTALLED 6.0.5 source (factories re-checked on 6.1.1) and differs from the docs — see the callout. Fetch token names fromcolor-resources; never invent one.⚠️ Jetpack Compose cohort — theming is the
CometChatThemecomposable + colour-scheme factories; slots are@Composablelambdas. The Views cohort (XML theme attributes + ViewHolder listeners) is a separate skill.
cometchat-android-v6-core — install, credentials, init/login, the fetch map. Assumed here, never repeated.cometchat-android-v6-compose-components — what exists and its param conventions."match the chat to our brand", "use our typography", "support dark mode", "restyle rows or bubbles", "replace the empty/loading/error view", "add a long-press option", "render a custom message type", "translate the UI". Theming lives HERE — there is no separate theming skill.
Cloning a named app, or mixing kit components with your own UI? Measure the target's colors, type, spacing and radii into ONE token source, theme the kit from it, and style every custom component from the same tokens so kit and custom parts look like one design; host a kit component in your own dialog/panel when only its placement differs. Flow: cometchat-onboarding → references/clone-mode.md (Design sync, build levels L0–L6).
Wrap the kit UI in the CometChatTheme composable and override the colour scheme:
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import com.cometchat.uikit.compose.theme.CometChatTheme
import com.cometchat.uikit.compose.theme.darkColorScheme
import com.cometchat.uikit.compose.theme.lightColorScheme
@Composable
fun AppChatTheme(content: @Composable () -> Unit) {
// Pass named params — CometChatColorScheme is NOT a data class, so there is no .copy().
// Setting `primary` DERIVES the whole extended ramp (extendedPrimaryColor50...900) for you.
val scheme = if (isSystemInDarkTheme()) {
darkColorScheme(primary = Color(0xFF8B7FFF))
} else {
lightColorScheme(primary = Color(0xFFF76808))
}
CometChatTheme(colorScheme = scheme) { content() }
}
CometChatTheme(colorScheme, shapes, typography, content) provides all three through composition locals; read them anywhere with CometChatTheme.colorScheme / .typography / .shapes. Follow the system by default on a fresh integration (isSystemInDarkTheme()), and override only the tokens you actually brand so future kit versions stay consistent.
⚠️ Docs drift — trust this file. The docs Compose tab teaches
CometChatColorScheme.light()/.dark(). Those factories do not exist in 6.0.5 or 6.1.1: the real ones are top-levellightColorScheme()/darkColorScheme()incom.cometchat.uikit.compose.theme, configured by named params, not.copy()(CometChatColorSchemeis a plain class). Logged internally. The compile gate rejects both wrong forms.
| Intent | Mechanism | Docs page (fetch for exact names) |
|---|---|---|
| brand colour, light/dark | CometChatTheme(colorScheme = ...) + lightColorScheme()/darkColorScheme() | theme-introduction (Compose tab) |
| exact token names | CometChatColorScheme fields | color-resources |
| fonts / text styles | CometChatTypography (28 TextStyle named params: titleBold, heading1Bold, ...), passed as CometChatTheme(typography = ...) | no shipped page documents Compose typography — theme-introduction is colours-only and component-styling covers Views (cometchatFontBold). Use the signature here; do not fetch. |
| restyle ONE component | style = CometChat<X>Style.default().copy(...) (style classes ARE data classes) | component-styling |
| bubble look per type | bubble style data classes | message-bubble-styling |
| replace a REGION of a row | @Composable slot params — itemView, leadingView, subtitleView, trailingView | customization-view-slots |
| empty / error / loading | hideEmptyState/hideErrorState/hideLoadingState + your own composable | customization-state-views |
| long-press / composer actions | options / addOptions params | customization-menu-options |
| custom message TYPE | bubble factories (see below) | not the docs message-template page |
| custom text patterns | textFormatters + CometChatTextFormatter/CometChatMentionsFormatter | customization-text-formatters |
| what a list fetches | conversationsRequestBuilder (and the per-list equivalents) | customization-viewmodel-data |
| translate the UI | CometChatLocalize | localize |
| in-app sounds | CometChatSoundManager | sound-manager |
@Composable lambdasCometChatConversations(
modifier = Modifier.fillMaxSize(),
trailingView = { conversation, typing -> MyUnreadPill(conversation) }, // (Conversation, TypingIndicator?)
options = { context, conversation -> myMenuItems(conversation) },
hideEmptyState = true, // then render your own
conversationsRequestBuilder = ConversationsRequest.ConversationsRequestBuilder()
.setConversationType("user"), // scope in the REQUEST, not a client filter
onItemClick = { /* navigate */ },
)
Slot params take (@Composable (Conversation, TypingIndicator?) -> Unit)? on the conversations list, with the analogous shape on users/groups/members. Style params take a data class: style = CometChatConversationsStyle.default().copy(...).
What to check and why: cometchat-onboarding/references/clone-mode.md -> Message chrome. This is the Compose how-to.
Kit default: avatar and sender name only on INCOMING messages in a GROUP (shouldShowAvatar: LEFT and isGroupConversation; DefaultHeaderView shows the name only for group messages). Your own messages and every 1:1 chat get neither, and messageAlignment = LEFT_ALIGNED alone still leaves 1:1 chats bare.
Do this whenever the target shows avatars/names (Slack, Discord, Teams); don't ask. Fill the per-message leadingView (avatar) and headerView (name) slots on CometChatMessageList. A provided slot wins over the kit's rule for every message, own and others', in 1:1 and group chats:
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.cometchat.chat.constants.CometChatConstants
import com.cometchat.chat.models.BaseMessage
import com.cometchat.chat.models.Group
import com.cometchat.chat.models.User
import com.cometchat.uikit.compose.presentation.messagelist.ui.CometChatMessageList
import com.cometchat.uikit.compose.presentation.shared.baseelements.avatar.CometChatAvatar
import com.cometchat.uikit.compose.theme.CometChatTheme
import com.cometchat.uikit.core.constants.UIKitConstants
// The kit never draws the leading slot on centered action/call rows, but headerView renders on EVERY row.
private fun BaseMessage.hasSender() =
category != CometChatConstants.CATEGORY_ACTION && category != CometChatConstants.CATEGORY_CALL
@Composable
fun ChannelMessageList(user: User?, group: Group?) {
CometChatMessageList(
user = user, group = group,
messageAlignment = UIKitConstants.MessageListAlignment.LEFT_ALIGNED, // one left column, like Slack
leadingView = { message, _ ->
CometChatAvatar(modifier = Modifier.padding(end = 8.dp).size(32.dp),
name = message.sender?.name ?: "?", avatarUrl = message.sender?.avatar)
},
headerView = { message, _ ->
if (message.hasSender()) Text(message.sender?.name ?: "", style = CometChatTheme.typography.caption1Medium,
color = CometChatTheme.colorScheme.textColorPrimary, modifier = Modifier.padding(bottom = 4.dp))
},
)
}
LEFT_ALIGNED for a Slack-style column: in STANDARD the leading slot of your own messages renders on the right. The slot's second argument is the core MessageAlignment (sender side), not the forced bubble alignment.headerView replaces the kit's (time-in-header with TimeStampAlignment.TOP and the multi-attachment batch suppression go with it). Style the name from your token source.Register factories on the message list for custom categories/types; createContentView runs before the message is known, bindContentView receives it. ⚠️ CometChatMessageTemplate and setTemplates are absent from the shipped 6.0.5 and 6.1.1 artifacts (logged internally). The docs message-template page was corrected upstream (verified 2026-09-09): it is now "Message Bubble Factory" and teaches the factory API — fetch its Compose tab for the current signatures.
Custom UI goes INSIDE the component — a slot param, a style copy, a menu option, a formatter — never a composable stacked over a kit component with a Box, and never a forked component. If no slot exists, fetch the page's Compose tab before inventing UI; if there genuinely is no hook, say so rather than re-implementing the component.
CometChatColorScheme.light() from the docs (use lightColorScheme()) · calling .copy() on a colour scheme (not a data class — pass named params) · forgetting CometChatTheme { } around kit UI (falls back to defaults) · theming only light mode (no isSystemInDarkTheme() branch) · hardcoding colours per screen · Box-stacking custom UI instead of using a slot param · re-implementing a list to change one row · client-side filtering instead of a scoped request builder · emitting CometChatMessageTemplate.
Compile: ./gradlew :app:assembleDebug # in YOUR app (native-fence.mjs is a pack-repo gate, not installed by the CLI). On device: the brand colour appears on kit surfaces; toggle system dark mode → the UI follows with readable contrast; a slot composable renders INSIDE its component; state views appear on empty/error/loading; a changed menu option shows on long-press.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cometchat, android, jetpack-compose, theming, customization, dark-mode
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'.Other plugins' skills for the same job