Перейти к содержанию
Skillpedia
Мобильные приложения10k · #11939

wear-compose-m3

Что он делает

Этот скилл направляет создание, обновление и перенос приложений Wear OS с библиотекой Wear Compose Material 3. Он охватывает каркасы, ленивые списки, режим ambient и перенос с Material 2.5 или Horologist. Он нужен разработчикам, которые создают приложения для умных часов.

Когда использовать

  • ✓Когда вы начинаете новое приложение Wear OS с компонентами Material 3.
  • ✓Когда вы хотите перенести приложение для часов с Material 2.5 или Horologist на Wear Compose Material 3.
  • ✓Когда нужен прокручиваемый список или экран режима ambient для приложения часов.

Ссылка на скилл

https://github.com/android/skills/blob/main/wear/wear-compose-m3/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/android/skills/blob/main/wear/wear-compose-m3/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Сделай экран Wear OS с прокручиваемым списком и режимом ambient с помощью Wear Compose Material 3.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Скилл проверяет текущие версии библиотек и последний стабильный релиз, затем настраивает требования к Kotlin и SDK. Затем он использует каркасы и списки Material 3, чтобы создать или перенести экраны.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Prerequisites and compatibility

  1. Current Wear OS Compose version in-use: To find the installed library version, read gradle/libs.versions.toml or build.gradle.kts directly. Don't run ./gradlew dependencies or other shell commands to resolve versions.
  2. Wear OS Compose Material3 version: If an internal tool is available to establish the latest stable version {VERSION} of androidx.wear.compose:compose-material3, use that tool.
  3. Strict compliance: If a version is listed as stable, you MUST use it, unless overridden by the user. Do not downgrade based on initial "Unresolved reference" errors in the editor or outdated web search results.
  4. Kotlin & Compose compiler: Use Kotlin 2.0.0+ with the org.jetbrains.kotlin.plugin.compose Gradle plugin.
  5. Min SDK: Ensure minSdk is at least 25.
  6. Compile SDK & AGP: Ensure compileSdk and AGP meet the library's AAR metadata floors (compileSdk >= 35 and AGP >= 8.6.0 for 1.6.x; compileSdk >= 37 and AGP >= 9.1.0 for 1.7.x).

Gotchas

  1. Mandatory sync and validation: After updating versions in libs.versions.toml or build.gradle.kts, perform a Gradle sync (or ./gradlew assembleDebug) before refactoring, and run ./gradlew assembleDebug after refactoring to verify the build.
  2. Prohibition of guessing (error protocol): If you encounter an 'Unresolved Reference' or API mismatch after a successful sync, do not attempt to 'fix' it by downgrading the library version.

Capabilities and tools

Capability 1: Migration, updates, and adding features

Use this guidance when migrating from an older version of Wear OS Compose or Horologist, updating an existing Wear Compose Material3 project, or adding features.

  1. Unless otherwise indicated by the developer, use the latest stable version of Wear Compose Material3 from {VERSION} (superseding any literal version strings in the migration guide).
  2. When migrating from Material 2.5 or Horologist, read the migration guide and use its official component mappings.
  3. Before refactoring any component (for example, Chip -> Button), check the parameter names, slot types, and "Expressive" design tokens.
  4. Do not use the Horologist Composables, Compose Layout, or Compose Material libraries; replace Horologist components with Wear Compose M3 equivalents (AppScaffold -> M3 AppScaffold, ScreenScaffold -> M3 ScreenScaffold, ScalingLazyColumn -> TransformingLazyColumn, ResponsiveListHeader -> ListHeader, PagerScreen -> HorizontalPagerScaffold, Chip -> Button, Confirmation -> ConfirmationDialog).
  5. Always check against the component guidance in Capability 3.
  6. Expect screenshot tests to fail when migrating or updating components: expected defaults for padding and positioning will have changed. Do not seek to artificially match the previous screenshot, but give preference to the Material3 defaults.

Capability 2: Component samples

Use this table of reference to find canonical samples for Wear Compose components. When working with a Wear Compose component, you must use the samples linked from the table to ensure you know how to correctly use it.

Important: Symbols marked with [alpha], [beta], or [rc] are only available in that pre-release track and are not in stable {VERSION}. Do not use them unless the project explicitly targets that pre-release version.

Material 3 components in androidx.wear.compose.material3.*

Component / Symbol Reference Samples
AlertDialog, AlertDialogDefaults AlertDialogSample
AnimatedPage, HorizontalPagerScaffold, VerticalPagerScaffold OneHandedGestureSamples, PageIndicatorSample, PagerScaffoldSample
AnimatedText, rememberAnimatedTextFontRegistry AnimatedTextSample
AppCard CardSample
AppScaffold [ListHeaderSample](re
Частые вопросы

Какую версию библиотеки он использует?

Он использует последнюю стабильную версию, если вы не велите взять другую.

Каковы минимальные требования к SDK?

Скилл требует minSdk не ниже 25 и Kotlin 2.0.0 или новее.

Запускает ли он команды оболочки, чтобы найти версии?

Нет. Он читает файлы сборки напрямую и при необходимости проверяет официальные метаданные Maven.

Подробности

Оригинальное описание автора

Guidance for Wear OS Compose Material3 (Wear Compose Material 3 / Wear Compose Material3) watch and wearable apps. Covers creating, updating, and migrating projects (Material 2.5 and Horologist migration) using androidx.wear.compose.material3, androidx.wear.compose.foundation, and androidx.wear.compose.navigation3, including AppScaffold, ScreenScaffold, TransformingLazyColumn, ambient mode, and previews.

repo: android/skills

Популярность

Звёзды на GitHub
10k
Место в рейтинге
#11939
Лицензия
Apache-2.0
Обновлён
29.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы