Logo Cometchat Android V6 Compose Customization

Cometchat Android V6 Compose Customization

Tổ chức
cometchat
cometchat-android-v6-compose-customization

Make the CometChat Android v6 UI match your app in the Jetpack Compose cohort — theming with the CometChatTheme composable and lightColorScheme/darkColorScheme, per-component style data classes, @Composable view slots, state views, menu options, text formatters, custom message rendering with bubble factories, localization and sounds. Triggers: 'cometchat compose theme', 'brand colors jetpack compose cometchat', 'dark mode compose cometchat', 'custom row composable', 'custom message type compose'.

Add to TypingMind

Tổng quan

Nhà phát hànhcometchat
Kho mãcometchat-skills
Tên kỹ năngcometchat-android-v6-compose-customization
Sao
109
Bản fork
2
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được cometchat công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Cometchat Android V6 Compose Customization trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-compose-customization
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-android-v6-compose-customization .claude/skills/cometchat-android-v6-compose-customization
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Cometchat Android V6 Compose Customization trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Cometchat Android V6 Compose Customization ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Cometchat Android V6 Compose Customization với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Ground truth: catalog android-v6.json + the Compose theme source. ⚠️ The theming API below was read from the INSTALLED 6.0.5 source and differs from the docs — see the callout. Fetch token names from color-resources; never invent one.

⚠️ Jetpack Compose cohort — theming is the CometChatTheme composable + colour-scheme factories; slots are @Composable lambdas. The Views cohort (XML theme attributes + ViewHolder listeners) is a separate skill.

Companion skills (read first)

  • 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.

Use this skill when

"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.

Theming — the top mechanism (BAKED)

Wrap the kit UI in the CometChatTheme composable and override the colour scheme:

kotlin
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: the real ones are top-level lightColorScheme() / darkColorScheme() in com.cometchat.uikit.compose.theme, configured by named params, not .copy() (CometChatColorScheme is a plain class). Logged internally. The compile gate rejects both wrong forms.

Customization mechanism map (pick the smallest one that does the job)

IntentMechanismDocs page (fetch for exact names)
brand colour, light/darkCometChatTheme(colorScheme = …) + lightColorScheme()/darkColorScheme()theme-introduction (Compose tab)
exact token namesCometChatColorScheme fieldscolor-resources
fonts / text stylesCometChatTypography (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 componentstyle = CometChat<X>Style.default().copy(...) (style classes ARE data classes)component-styling
bubble look per typebubble style data classesmessage-bubble-styling
replace a REGION of a row@Composable slot params — itemView, leadingView, subtitleView, trailingViewcustomization-view-slots
empty / error / loadinghideEmptyState/hideErrorState/hideLoadingState + your own composablecustomization-state-views
long-press / composer actionsoptions / addOptions paramscustomization-menu-options
custom message TYPEbubble factories (see below)not the docs message-template page
custom text patternstextFormatters + CometChatTextFormatter/CometChatMentionsFormattercustomization-text-formatters
what a list fetchesconversationsRequestBuilder (and the per-list equivalents)customization-viewmodel-data
translate the UICometChatLocalizelocalize
in-app soundsCometChatSoundManagersound-manager

What's swappable — slots are @Composable lambdas

kotlin
CometChatConversations(
    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(...).

Custom message types — bubble factories, not templates

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 artifact (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.

The rule

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.

Common pitfalls

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.

Verify it works

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.

Câu hỏi thường gặp

Kỹ năng AI Cometchat Android V6 Compose Customization làm được gì?

Make the CometChat Android v6 UI match your app in the Jetpack Compose cohort — theming with the CometChatTheme composable and lightColorScheme/darkColorScheme, per-component style data classes, @Composable view slots, state views, menu options, text formatters, custom message rendering with bubble factories, localization and sounds. Triggers: 'cometchat compose theme', 'brand colors jetpack compose cometchat', 'dark mode compose cometchat', 'custom row composable', 'custom message type compose'.

Vì sao nên dùng Cometchat Android V6 Compose Customization trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Cometchat Android V6 Compose Customization là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Cometchat Android V6 Compose Customization trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v6-compose-customization. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Cometchat Android V6 Compose Customization?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Cometchat Android V6 Compose Customization với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Cometchat Android V6 Compose Customization với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Cometchat Android V6 Compose Customization có miễn phí không?

Có. Kỹ năng này được cometchat phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇