wear-compose-m3
Was er macht
Dieser Skill begleitet das Erstellen, Aktualisieren und Migrieren von Wear-OS-Apps mit der Bibliothek Wear Compose Material 3. Er behandelt Gerüste, Lazy-Listen, den Ambient-Modus und die Migration von Material 2.5 oder Horologist. Er ist für Entwickler gedacht, die Apps für Smartwatches bauen.
Wann du ihn nutzt
- ✓Wenn du eine neue Wear-OS-App mit Material-3-Komponenten startest.
- ✓Wenn du eine Watch-App von Material 2.5 oder Horologist auf Wear Compose Material 3 migrieren willst.
- ✓Wenn du eine scrollbare Liste oder einen Bildschirm für den Ambient-Modus für eine Watch-App brauchst.
Link zum Skill
https://github.com/android/skills/blob/main/wear/wear-compose-m3/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Baue einen Wear-OS-Bildschirm mit einer scrollbaren Liste und Ambient-Modus mit Wear Compose Material 3.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill prüft deine aktuellen Bibliotheksversionen und die neueste stabile Version und richtet dann die Anforderungen für Kotlin und SDK ein. Danach baut oder migriert er die Bildschirme mit den Gerüsten und Listen von Material 3.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Prerequisites and compatibility
- Current Wear OS Compose version in-use: To find the installed library version, read
gradle/libs.versions.tomlorbuild.gradle.ktsdirectly. Don't run./gradlew dependenciesor other shell commands to resolve versions. - Wear OS Compose Material3 version: If an internal tool is available to establish the latest stable version
{VERSION}ofandroidx.wear.compose:compose-material3, use that tool.- Otherwise, fetch the official Maven metadata XML to identify
{VERSION}(highest number, ignoring-alpha,-beta, or-rc).
- Otherwise, fetch the official Maven metadata XML to identify
- 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.
- Kotlin & Compose compiler: Use Kotlin 2.0.0+ with the
org.jetbrains.kotlin.plugin.composeGradle plugin. - Min SDK: Ensure
minSdkis at least 25. - Compile SDK & AGP: Ensure
compileSdkand AGP meet the library's AAR metadata floors (compileSdk >= 35andAGP >= 8.6.0for1.6.x;compileSdk >= 37andAGP >= 9.1.0for1.7.x).
Gotchas
- Mandatory sync and validation: After updating versions in
libs.versions.tomlorbuild.gradle.kts, perform a Gradle sync (or./gradlew assembleDebug) before refactoring, and run./gradlew assembleDebugafter refactoring to verify the build. - 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.
- 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). - When migrating from Material 2.5 or Horologist, read the migration guide and use its official component mappings.
- Before refactoring any component (for example,
Chip->Button), check the parameter names, slot types, and "Expressive" design tokens. - Do not use the Horologist Composables, Compose Layout, or Compose Material libraries; replace Horologist components with Wear Compose M3 equivalents (
AppScaffold-> M3AppScaffold,ScreenScaffold-> M3ScreenScaffold,ScalingLazyColumn->TransformingLazyColumn,ResponsiveListHeader->ListHeader,PagerScreen->HorizontalPagerScaffold,Chip->Button,Confirmation->ConfirmationDialog). - Always check against the component guidance in Capability 3.
- 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 |
Häufige Fragen
Welche Version der Bibliothek nutzt er?
Er nutzt die neueste stabile Version, außer du bittest um eine andere.
Welche minimalen SDK-Anforderungen gelten?
Der Skill verlangt minSdk mindestens 25 und Kotlin 2.0.0 oder neuer.
Führt er Shell-Befehle aus, um Versionen zu finden?
Nein. Er liest deine Build-Dateien direkt und prüft bei Bedarf die offiziellen Maven-Metadaten.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 10k
- Platz im Ranking
- #11939
- Lizenz
- Apache-2.0
- Aktualisiert
- 29.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
agp-9-upgrade
10kHilft deinem Agenten, eine Android-App auf Android Gradle Plugin 9 zu aktualisieren und die Breaking Changes abzuarbeiten. Nicht für Multiplattform-Projekte.
camerax
10kHilft deinem Agenten, Kamerafunktionen für Android mit CameraX zu bauen, einschließlich Videoaufnahme, Hardwaresteuerung, ML Kit und Media3-Effekten.
android-for-cars-parked-apps
10kHilft deinem Agenten, eine Android-Video-, Spiele- oder Browser-App so anzupassen, dass sie als geparkte App in Android Auto und Android Automotive läuft.
appfunctions
10kHilft deinem Agenten, in einer Android-App wichtige Abläufe zu finden und sie als AppFunctions bereitzustellen, die KI-Agenten und Sprachbefehle ausführen können.
Ähnliche Skills
android-clean-architecture
280kLässt deinen Agenten Android-Projekte effizient strukturieren. Der Code wird so organisiert, dass Wartung und neue Features leichter werden.
compose-multiplatform-patterns
280kHilft deinem Agenten, Compose Multiplatform und Jetpack Compose Patterns in KMP-Projekten einzusetzen. Abgedeckt sind State, Navigation, Theming und Performance.
dart-flutter-patterns
280kLässt deinen Agenten Code für Dart- und Flutter-Apps schreiben. Er nutzt moderne Patterns für robuste und gut wartbare Apps.