Agent skill

Adaptive

by arindamxd in arindamxd/camerax-android

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR.

Apache-2.0Auto-check passedFrontend & Design

Install Adaptive

skills CLI
$ npx skills add arindamxd/camerax-android --skill adaptive -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install arindamxd/camerax-android adaptive --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/arindamxd/camerax-android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/adaptive .claude/skills/adaptive && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
adaptive
GitHub stars
132
Used in
4 other repos
Token cost
~3.2k tokens
SKILL.md length
1,300 words
Files
17 (incl. references)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR.

  • Works in 5 steps: Verify current UI → Make the navigation bar adaptive → Add multi-pane layouts using Navigation… → …
  • Tasks that involve CSS and styling
  • SKILL.md covers Prerequisites, Workflow to make an app adaptive, Step 1. Verify current UI and Step 2. Make the navigation…, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Adaptive is an agent skill from arindamxd/camerax-android. Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API. It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav…

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 26 other files, including reference files (for example `references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md`, `references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md` and `references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md`).

It sits in Frontend & Design, covering CSS and styling, Responsive design and Backend development. It works with Android. The repository describes itself as: A Play Store camera app showing Jetpack CameraX APIs in Kotlin — install it, use it, copy the patterns. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve CSS and styling
  • Tasks that involve Responsive design
  • Tasks that involve Backend development

Example prompts

  • “Use the adaptive skill to instruction to make or update an app's UI so that it adapts to different Android devices including phones, tablets…”
  • “/adaptive”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Verify current UI
  2. Make the navigation bar adaptive
  3. Add multi-pane layouts using Navigation 3 Scenes
  4. Make vertical lists adaptive by changing the number of columns
  5. Hide App Bars when scrolling

What it can do on your machine

Read from SKILL.md and the folder at commit 7c36352. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Adaptive loads about 3.2k tokens when it runs, and up to ~23k if it reads all its reference files. Until then it costs about 144 tokens; SKILL.md has 1,300 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~144
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~23k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from arindamxd/camerax-android at commit 7c36352, republished under its Apache-2.0 licence (© arindamxd). 1,300 words, ~3,154 tokens.

Download SKILL.mdSave it as .claude/skills/adaptive/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
adaptive
description
Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API. It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav bars) using the Compose Grid and FlexBox APIs.
license
Complete terms in LICENSE.txt
metadata.author
Google LLC
metadata.last-updated
2026-08-06
metadata.keywords
android, ui, adaptive, Grid, FlexBox, MediaQuery, navigation

Prerequisites

The app must:

  • Use Compose for all screens. If it's still using Fragments or Views, suggest using the XML to Compose skill to migrate those screens.
  • Use Jetpack Navigation 3. If it doesn't, suggest the Navigation 3 skill to migrate the app.

Workflow to make an app adaptive

To make an app adaptive, follow these steps or a subset of them adapting to the task.

  • Step 1: Verify current UI
  • Step 2: Make the navigation bar adaptive
  • Step 3: Add multi-pane layouts
  • Step 4: Make vertical lists adaptive by changing the number of columns
  • Step 5: Hide app bars when scrolling

Step 1. Verify current UI

Ensure that screenshot tests exist to verify the current UI on different form factors. If they don't exist, add the Compose Preview Screenshot Testing tool. Use the following annotation to create previews for all the major form factors. For example:

<br />
kotlin
@Preview(name = "Phone", device = Devices.PHONE, showBackground = true)
@Preview(name = "Foldable", device = Devices.FOLDABLE, showBackground = true)
@Preview(name = "Tablet", device = Devices.TABLET, showBackground = true)
@Preview(name = "Desktop", device = Devices.DESKTOP, showBackground = true)
annotation class FormFactorPreviews

@PreviewTest
@FormFactorPreviews
@Composable
fun FeedScreenPreview() {
    SnippetsTheme {
        Box {
            Text("My Screen")
        }
    }
}
   
<br />

Step 2. Make the navigation bar adaptive

Bottom navigation bars are optimized for touch input when the user is holding a phone in portrait mode. On larger screen hand-held devices, like tablets and unfolded foldables, the navigation area must be accessible from the edge of the screen (navigation rail).

If you need to provide more screen space for the content, hide the navigation area. Examples of this include:

  • Hiding the navigation bar when the user scrolls down and showing it again when the user scrolls up. The assumption is that when the user is scrolling down, they are consuming content but when scrolling up they are trying to navigate away from that content.
  • Hiding the navigation area when its content is distracting. For example, in camera previews or when displaying a full-screen photo.

When the detail screen is displayed full-screen on mobile, full-screen mode must be deactivated on larger screens.

Steps to migrate:

  • Locate the existing navigation bar.
  • Convert each item to a NavigationSuiteItem.
  • Identify whether the navigation bar's visibility changes. For example, if it is wrapped with an AnimatedContent or AnimatedVisibility composable. If so, follow the guidance in the "Control navigation area visibility".
  • Replace the container that held the navigation bar (often a Scaffold) with NavigationSuiteScaffold from the Material 3 adaptive layouts library.
  • Supply the navigation items using the navigationItems parameter of NavigationSuiteScaffold.
Step 2.1. Control navigation area visibility

If the navigation bar's visibility changes - it is hidden under certain scenarios or on certain screens - this behavior must be maintained with the adaptive navigation area. This is done using NavigationSuiteScaffold's state parameter.

Steps to migrate:

  • Identify the scenarios under which the navigation bar is hidden. This is usually done with a boolean variable for the visibility. Use isNavBarVisible or shouldShowNavBar as the variable name.
  • Create an instance of NavigationSuiteScaffoldState using rememberNavigationSuiteScaffoldState() and pass it to NavigationSuiteScaffold.
  • When the navigation area visibility changes, use a LaunchedEffect to call show or hide on the NavigationSuiteScaffoldState.

For example:

<br />
kotlin
// Pass this variable to any composable that needs to control the navigation area visibility
var isNavBarVisible by remember { mutableStateOf(true) }
val scaffoldVisibilityState = rememberNavigationSuiteScaffoldState()

NavigationSuiteScaffold(
    navigationSuiteItems = navItems,
    state = scaffoldVisibilityState
) {
    // Main content
}

LaunchedEffect(isNavBarVisible){
    if (isNavBarVisible) {
        scaffoldVisibilityState.show()
    } else {
        scaffoldVisibilityState.hide()
    }
}
   
<br />

Step 3. Add multi-pane layouts using Navigation 3 Scenes

Analyze the codebase looking for related screens - tapping on something in one screen opens another screen that shows information related to the first. There are two canonical screen relationships: list-detail and supporting pane.

IMPORTANT: You must use the Navigation 3 SceneStrategy approach to implement multi-pane layouts. Do not use ListDetailPaneScaffold or SupportingPaneScaffold.

Step 3.1. List-detail
Identify the list and detail screens

List-detail layouts display a list of items (this is the list screen) and clicking on an item opens a new screen that shows more details about that item (the detail screen).

Typical usage includes productivity apps like email, notes, and messaging.

Unless requested explicitly, avoid this pattern when the detail content requires substantial screen space (e.g., images or media that benefits from a full-screen presentation).

Add a Material list-detail SceneStrategy
  • Add the androidx.compose.material3.adaptive:adaptive-navigation3 library
  • Create an androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy using rememberListDetailSceneStrategy
  • Pass the ListDetailSceneStrategy to NavDisplay using its sceneStrategies parameter
Use metadata to identify the list and detail screens
  • Add metadata using entry(metadata = ...) or NavEntry(metadata = ...) to the list entry using ListDetailSceneStrategy.listPane(detailPlaceholder = { <placeholder composable> }).
  • Use the detailPlaceholder parameter to add a placeholder on the detail screen when no list items are selected.
  • Add metadata to the detail entry using ListDetailSceneStrategy.detailPane().
Important considerations
  • When a detail screen displays its content full-screen on mobile (content fills the entire screen, bars or rails are hidden), full-screen mode must be deactivated if it's part of a list-detail layout.
  • Detail screens must not show a back arrow when on a list-detail layout.

For a reference implementation, check the Nav3 Material List Detail recipe.

Step 3.2. Supporting pane

Identify supporting pane screens where a main screen displays a single item, and selecting it opens a "supporting screen" with more details. The supporting screen complements the main screen and is shown in a supporting pane.

Show full SKILL.md (518 more words)Show less
Add a Material supporting pane SceneStrategy
  • If you haven't already, add the androidx.compose.material3.adaptive:adaptive-navigation3 library
  • Create an androidx.compose.material3.adaptive.navigation3.SupportingPaneSceneStrategy using rememberSupportingPaneSceneStrategy
  • Pass the SupportingPaneSceneStrategy to NavDisplay using its sceneStrategies parameter
Use metadata to identify the main and supporting screens
  • Add metadata using entry(metadata = ...) or NavEntry(metadata = ...) to the main entry using SupportingPaneSceneStrategy.mainPane()
  • Add metadata to the supporting entry using SupportingPaneSceneStrategy.supportingPane()
Step 3.3. Run screenshot tests

If you have made changes, record new reference files. Ask the user to visually verify that the new layouts are correct.

Step 4. Make vertical lists adaptive by changing the number of columns

Step 4.1. Make lazy lists adaptive

Look for the following vertical list composables: LazyColumn, LazyVerticalGrid, LazyVerticalStaggeredGrid.

Steps to migrate:

  • Choose a suitable minimum width in dp for the column. The item must be clearly visible to the user at this width.
  • For LazyColumn: change to a LazyVerticalGrid and follow the instruction later
  • For LazyVerticalGrid: change the columns parameter to use GridCells.Adaptive(<width>.dp)
  • For LazyVerticalStaggeredGrid: change the columns parameter to use StaggeredGridCells.Adaptive(<width>.dp)
Step 4.2. Migrate non-lazy lists to Grid

WARNING: Grid is an experimental API available from Compose 1.11.0-beta01. Confirm with the user that they are happy to use an experimental API in their codebase.

Look for any Column that contains multiple items of the same type and replace it with Grid. Do not replace it with LazyVerticalGrid or any other lazy layout. Do not place Grid inside the existing Column. Completely replace it.

Grid is configured by supplying a lambda (an extension function on GridConfigurationScope) to its config parameter. Inside the lambda, constraints provides the minimum and maximum dimensions of the grid container and can be used to change the number of rows and columns based on the available size. For example, the following code configures Grid such that when the available width is:

  • less than 800dp, a 2x4 grid is used
  • 800dp or more, a 4x2 grid is used
<br />
kotlin
Grid(
    config = {
        val maxWidthDp = constraints.maxWidth.toDp()
        val (cols, rows) = if (maxWidthDp < 800.dp){
            2 to 4
        } else{
            4 to 2
        }

        val gapSizeDp = 8.dp
        val cellSize = ((maxWidthDp - (gapSizeDp * (cols - 1))) / cols).coerceAtLeast(0.dp)
        repeat(cols) { column(cellSize) }
        repeat(rows) { row(cellSize) }
        gap(gapSizeDp)
    }
) { /** items **/ }
   
<br />

Grid is an experimental API so add the @OptIn(ExperimentalGridApi::class) annotation to any function that uses it.

Step 5: Hide App Bars when scrolling

In an app with multiple top-level destinations, each screen must manage its own app bar state independently. There are two main scroll behaviors:

  • exitUntilCollapsedScrollBehavior: Hides on scroll down, stays hidden while you scroll up until you reach the very top (0 offset).
  • enterAlwaysScrollBehavior: Hides on scroll down, shows immediately on scroll up.

Final step: Build and test

Build the app and run the local tests. If the project has screenshot tests, run them but DO NOT update the reference images. Prompt the user to do this after they have viewed the screenshot diffs.

Additional documentation for experimental adaptive APIs

The following APIs are available from Compose 1.11.0-beta01.

FlexBox

Check the FlexBox documentation:

MediaQuery

Check the MediaQuery documentation when you need to query the device's screen size, pointer precision, keyboard type, whether it has cameras or microphones, and other device capabilities.

Grid

Check the Grid documentation when you need to display a fixed number of items in a grid layout:

© arindamxd, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (references) in .agents/skills/adaptive of arindamxd/camerax-android.

  • SKILL.md
  • references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md
  • references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md
  • references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md
  • references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md
  • references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md
  • references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md
  • references/android/develop/ui/compose/layouts/adaptive/grid/index.md
  • references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md
  • references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md
  • references/android/develop/ui/compose/tooling
  • … and 6 more

Open the folder on GitHubat commit 7c36352

Used in 4 other repositories

We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in arindamxd/camerax-android, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Adaptive next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Adaptive compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Adaptive this skillarindamxd/camerax-android1324 repos~3.2kAutomated safety check: PassApache-2.0
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
MCP Developmentcoollabsio/coolify63k1 repos~949Automated safety check: PassMIT
Material 3hamen/material-3-skill1.5k2 repos~7.8kAutomated safety check: PassMIT
Frontend Design Routercode-yeongyu/oh-my-openagent70k—~5.3kAutomated safety check: PassCustom licence
Refero Designreferodesign/refero_skill292—~5.3kAutomated safety check: PassMIT

Similar skills

  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed
  • Material 3

    hamen/material-3-skill

    Implement Google's Material Design 3 (Material You) UI system.

    1.5k GitHub starsUsed in 2 repos~7.8k tokens
    Frontend & DesignAuto-check passed
  • Frontend Design Router

    code-yeongyu/oh-my-openagent

    Routes frontend and UI work through design reference rulesets, with a design-system gate plus layout and print guidance, before any UI code is written.

    70k GitHub stars~5.3k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Refero Design

    referodesign/refero_skill

    Primary/default skill for UI design, product design, web design, landing pages, dashboards, product screens, redesigns, visual polish, frontend/CSS styling, design systems, components, responsive…

    292 GitHub stars~5.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Material Design 3 UI/UX Guide

    skydashnet/material-design-3-ui-skill

    Guides designing, reviewing or implementing interfaces that follow Google's Material Design 3 system: semantic tokens, component states, adaptive layout and accessibility.

    130 GitHub stars~3k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed

More from arindamxd/camerax-android

All 21 skills in this repo
  • Styles

    arindamxd/camerax-android

    A skill your agent uses to integrate the Jetpack Compose Styles API into an Android project.

    132 GitHub starsUsed in 4 repos~2.3k tokens
    Auto-check passed
  • Verified Email

    arindamxd/camerax-android

    Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API.

    132 GitHub starsUsed in 4 repos~4.7k tokens
    Auto-check passed
  • Edge To Edge

    arindamxd/camerax-android

    A skill your agent uses to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues.

    132 GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed
  • Camerax

    arindamxd/camerax-android

    Provide technical guidance for Android camera development with CameraX.

    132 GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed
  • Leanback To Compose Tv Migration

    arindamxd/camerax-android

    Provides instructions and architectural patterns for migrating Android TV applications from legacy Leanback UI Toolkit, Android Views, or Support Fragments to Jetpack Compose for TV (androidx.tv).

    132 GitHub starsUsed in 2 repos~8.7k tokens
    Auto-check passed
  • Migrate XML Views To Jetpack Compose

    arindamxd/camerax-android

    Provides a structured workflow for migrating an Android XML View to Jetpack Compose.

    132 GitHub starsUsed in 5 repos~1.4k tokens
    Auto-check passed

Works with

Questions about Adaptive

What does Adaptive do?

Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR. Adaptive is an agent skill from arindamxd/camerax-android. Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and XR.

When should I use Adaptive?

Adaptive fits situations like: tasks that involve CSS and styling; tasks that involve Responsive design; tasks that involve Backend development.

How do I install Adaptive in Claude Code?

Run `npx skills add arindamxd/camerax-android --skill adaptive -a claude-code`. Or copy the skill folder (.agents/skills/adaptive in arindamxd/camerax-android) into .claude/skills/adaptive in your project. Claude Code loads it when a task matches its description.

How do I install Adaptive in Codex?

Run `npx skills add arindamxd/camerax-android --skill adaptive -a codex`. Or copy the skill folder (.agents/skills/adaptive in arindamxd/camerax-android) into .agents/skills/adaptive in your project. Codex loads it when a task matches its description.

Can I use Adaptive in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add arindamxd/camerax-android --skill adaptive -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adaptive, .gemini/skills/adaptive, .github/skills/adaptive and .opencode/skills/adaptive in your project.

What does Adaptive need to run?

SKILL.md names no scripts, command-line tools or credentials: Adaptive is instructions for the agent only.

Does Adaptive access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Adaptive safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Adaptive use?

Adaptive is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Adaptive use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 20k tokens, read only when the agent opens those files.

What are the alternatives to Adaptive?

Skills that share tags, products or a category with Adaptive: UI Styling (Ohh-889/skyroc, 795 stars), MCP Development (coollabsio/coolify, 63k stars), Material 3 (hamen/material-3-skill, 1.5k stars) and Frontend Design Router (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Adaptive?

arindamxd (a GitHub user) maintains it in arindamxd/camerax-android, which has 132 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 2, 2026.

Source: arindamxd/camerax-android on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.