
Wear OS Compose Material3
FreeStreamline your Wear OS development with Material3 guidance.
Free · Opens the source repo
What Wear OS Compose Material3 does
The Wear OS Compose Material3 skill provides developers with expert guidance on creating, updating, and migrating Wear OS projects using the Material3 design system. This skill focuses on the androidx.wear.compose.material3, androidx.wear.compose.foundation, and androidx.wear.compose.navigation3 libraries, which are essential for building modern Wear OS applications. It is particularly useful for developers looking to leverage the latest features and design paradigms offered by Material3, ensuring that their applications are both visually appealing and functionally robust.
This skill includes detailed instructions on migration from previous versions of Wear OS Compose, such as Material 2.5 and Horologist. Developers will find step-by-step guidance on how to update their projects effectively, including mandatory checks for library versions and compliance with the latest standards. The skill emphasizes the importance of using the latest stable versions of libraries and provides a clear protocol for handling errors and ensuring a smooth development experience.
In addition to migration and update guidance, the skill offers a comprehensive collection of sample references for various Wear Compose components. These samples serve as canonical examples for developers, helping them to understand the correct usage of components like AlertDialog, AppScaffold, and various progress indicators. By following these samples, developers can ensure that their implementations align with Material3 design principles, thereby enhancing the user experience on Wear OS devices.
Overall, this skill is an invaluable resource for developers and designers working on Wear OS applications, providing them with the tools and knowledge necessary to create high-quality, modern applications that meet user expectations.
When to use it
Use this skill when starting a new Wear OS project or updating an existing one to leverage Material3 features.
When not to use it
This skill may not be suitable for projects that do not require Material3 or are built on significantly older versions of Wear OS Compose that do not support the latest features.
What you can build with it
Migrating a Legacy Wear OS App
Use this skill to guide the migration of an existing Wear OS application from Material 2.5 to Material3, ensuring compliance with the latest design standards.
Updating to Latest Material3 Features
Leverage this skill when adding new features to your Wear OS app that require the latest Material3 components and design principles.
Accessing Component Samples
Utilize the skill to find reference samples for specific Wear Compose components, ensuring proper implementation in your projects.
How to install Wear OS Compose Material3
View source1. Install with the skills CLI
npx skills add android/skills/wear-compose-m3 --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by androidPrerequisites 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 version: For Wear Compose Material3, use Kotlin 2.0.0 or higher.
- Compose compiler:
- If Kotlin version is 2.0.0+ , the project must use the
org.jetbrains.kotlin.plugin.composeGradle plugin. - If Kotlin version is < 2.0.0 , the project must use
kotlinCompilerExtensionVersionincomposeOptions, matching the Compose to Kotlin Compatibility Map.
- If Kotlin version is 2.0.0+ , the project must use the
- Min SDK: Ensure
minSdkis at least 25. - Sample extraction mandate: Wear Compose libraries ship with an additional JAR file which contains individual samples for each and every component. You mustn't propose code changes, other than previews or basic changes such as color changes, until the samples in Capability 3 are extracted to the local cache. Library source files are incomplete and NOT a substitute for these samples; bypassing extraction is an environment setup failure.
Gotchas
- Mandatory sync and validation: After updating versions in
libs.versions.tomlorbuild.gradle.kts, you must perform a Gradle sync before refactoring any code. This ensures the environment has resolved the libraries correctly. - 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
Use this guidance when migrating from an older version of Wear OS Compose or Horologist.
- Unless otherwise indicated by the developer, use the latest stable version of Wear Compose Material3 from
{VERSION}. - Read the migration guide.
- Use the official component mappings from the migration guide.
- 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.
- Always check against the component guidance in Capability 4.
- Expect screenshot tests to fail when a migration has been performed: Even when migrating to very similar components, expected defaults for padding and positioning will have changed. Do not seek to artificially match the pre-migration screenshot, but give preference to the Material3 defaults.
Capability 2: Adding Wear OS Compose Material3 features or updating the app
Use this guidance when the developer asks to update a project which is using an earlier version of Wear OS Compose Material3, or when they ask to add further features.
- Unless otherwise indicated by the developer, use the latest stable version of Wear Compose Material3 from
{VERSION}. - Do not use the Horologist Composables, Compose Layout, or Compose Material libraries.
- Always check against the component guidance in Capability 4.
- Expect screenshot tests to fail when a migration has been performed: Even when migrating to very similar components, expected defaults for padding and positioning will have changed. Do not seek to artificially match the pre-migration screenshot, but give preference to the Material3 defaults.
Capability 3: 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.
Material 3 components in androidx.wear.compose.material3.*
Foundation components in androidx.wear.compose.foundation.*
Capability 4: Component guidance
Mandatory: Use this capability as a checklist against any component use. It provides more holistic guidance on how to use each component in practice, beyond the component syntax.
-
AppScaffoldandScreenScaffold- [ ] Use
AppScaffoldas the outer container, withScreenScaffoldchildren. - [ ] Use only ONE
AppScaffoldand any number ofScreenScaffold.
- [ ] Use
-
ScalingLazyColumn- UseTransformingLazyColumninstead. -
<br />TransformingLazyColumn- You will need the following imports:
<br />import androidx.wear.compose.foundation.lazy.TransformingLazyColumn import androidx.wear.compose.foundation.lazy.TransformingLazyColumnDefaults import androidx.wear.compose.foundation.lazy.rememberTransformingLazyColumnState // ... import androidx.wear.compose.material3.lazy.rememberTransformationSpec import androidx.wear.compose.material3.lazy.transformedHeightCanonical example:
<br />
<br />val columnState = rememberTransformingLazyColumnState() val transformationSpec = rememberTransformationSpec() ScreenScaffold( scrollState = columnState ) { contentPadding -> TransformingLazyColumn( state = columnState, contentPadding = contentPadding ) { item { ListHeader( modifier = Modifier .fillMaxWidth() .transformedHeight(this, transformationSpec) .minimumVerticalContentPadding(ListHeaderDefaults.minimumTopListContentPadding), transformation = SurfaceTransformation(transformationSpec) ) { Text(text = "Header") } } // ... other items item { Button( modifier = Modifier .fillMaxWidth() .transformedHeight(this, transformationSpec) .minimumVerticalContentPadding(ButtonDefaults.minimumVerticalListContentPadding), transformation = SurfaceTransformation(transformationSpec), onClick = { /* ... */ }, icon = { Icon( imageVector = Icons.Default.Build, contentDescription = "build", ) }, ) { Text( text = "Build", maxLines = 1, overflow = TextOverflow.Ellipsis, ) } } } }- [ ] Use
TransformingLazyColumninstead ofScalingLazyColumn. - [ ] You must pass the
contentPaddingparameter fromScreenScaffoldto theTransformingLazyColumn. - [ ] Use the
minimumVerticalContentPaddingmodifier to achieve required padding top and bottom.- This expects a value from defaults, such as
ButtonDefaults,CardDefaults, `ListHeaderDefaults. - Note: This is a scoped modifier available within
TransformingLazyColumnItemScope.
- This expects a value from defaults, such as
- [ ] Ensure the list morphs and scales.
- [ ] Use
transformedHeightmodifier. - [ ] Use
transform = SurfaceTransform(...). - [ ] If configuring a list for snapping, use
flingBehaviorandrotaryScrollableBehaviortogether:
<br />val columnState = rememberTransformingLazyColumnState() ScreenScaffold(scrollState = columnState) { contentPadding -> TransformingLazyColumn( state = columnState, flingBehavior = TransformingLazyColumnDefaults.snapFlingBehavior(columnState), rotaryScrollableBehavior = RotaryScrollableDefaults.snapBehavior(columnState) ) { // ... // ... } } - [ ] Use
-
ScreenScaffold- [ ] Guard the
scrollIndicatorwith!LocalScrollCaptureInProgress.current.
- [ ] Guard the
-
EdgeButton- [ ] Do NOT use as the final item within a
TransformingLazyColumn. Instead, use the slot inScreenScaffold. - [ ] When used in a
TransformingLazyColumn, add the required overscroll behavior:
<br />val columnState = rememberTransformingLazyColumnState() ScreenScaffold( scrollState = columnState, edgeButton = { EdgeButton( onClick = { /* TODO */ }, modifier = Modifier.scrollable( columnState, orientation = Orientation.Vertical, reverseDirection = true, // Apply overscroll to the EdgeButton for proper scrolling behavior. overscrollEffect = rememberOverscrollEffect(), ) ) { Text("More") } } ) { contentPadding -> TransformingLazyColumn( contentPadding = contentPadding, state = columnState, ) { // ... // ... } } - [ ] Do NOT use as the final item within a
-
Column- [ ] USE as a direct child of
ScreenScaffoldif the screen is will never scroll, even with the largest system font. - [ ] Use
TransformingLazyColumninstead for all other cases.
- [ ] USE as a direct child of
-
Styles
- [ ] Do NOT hard-code text sizes, use
typographyfromMaterialTheme. - [ ] Do NOT hard-code colors, use
colorSchemefromMaterialTheme.
- [ ] Do NOT hard-code text sizes, use
-
Use component defaults:
- [ ] Components such as
Buttonhave a correspondingButtonDefaultsobject. - [ ] Check for and use the
*Defaultsobject for any component when working with padding and styling values, in preference to hard-coded values.
- [ ] Components such as
-
Use Wear specific previews:
- [ ]
WearPreviewDevices - [ ]
WearPreviewFontScales
- [ ]
-
Ambient mode
- [ ] Use
LocalAmbientModeManagerinstead ofAmbientLifecycleObserver.
- [ ] Use
-
Navigation
- [ ] When adding navigation fresh, use Navigation3.
- [ ] For Navigation3 in Wear OS, use
SwipeDismissableSceneStrategy()from the Wear Composecompose-navigation3library.
-
Comments
- [ ] Where any Kotlin file has been modified, ensure that the existing comments are up to date and accurately reflect any changes to the implementation.
-
HorizontalPagerorVerticalPager- [ ] Use the Composable hierarchy in this order:
AppScaffold,HorizontalPagerScaffold,HorizontalPager,AnimatedPage,ScreenScaffold. Or similarly forVerticalPager.
- [ ] Use the Composable hierarchy in this order:
Frequently asked questions about Wear OS Compose Material3
Similar skills
Android App Development
Comprehensive guide for Android and cross-platform app development.
Add App Clip to Expo App
Integrate lightweight iOS App Clips into your Expo project.
APK Reverse
Streamline your Android APK reverse engineering process.
Swift Expert
Master iOS/macOS development with Swift and SwiftUI.
React Native Expert
Build and optimize mobile apps with React Native and Expo.
Kotlin Specialist
Master idiomatic Kotlin with expert patterns and practices.
