Agent skill

Ha Android UI

by home-assistant in home-assistant/android

Home Assistant Android UI guidance. An agent skill from home-assistant/android.

Apache-2.0Auto-check passedMobile

Install Ha Android UI

skills CLI
$ npx skills add home-assistant/android --skill ha-android-ui -a claude-code

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

GitHub CLI
$ gh skill install home-assistant/android ha-android-ui --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/home-assistant/android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ha-android-ui .claude/skills/ha-android-ui && 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
ha-android-ui
GitHub stars
4k
Token cost
~1.5k tokens
SKILL.md length
632 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Home Assistant Android UI guidance. An agent skill from home-assistant/android.

  • Reviewing Compose screens
  • SKILL.md covers Compose Only, Design System, Screen Structure and ViewModel, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Anything using HATheme and the design system

What it does

Ha Android UI is an agent skill from home-assistant/android. Home Assistant Android UI guidance. Use when building or reviewing Compose screens, ViewModels, screen state, navigation, dialogs, widgets, or anything using HATheme and the design system.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Android development and Design systems. It works with Home Assistant and Android. The repository describes itself as: Home Assistant Companion for Android. The licence is Apache-2.0.

When your agent uses it

  • Reviewing Compose screens
  • Anything using HATheme and the design system

Example prompts

  • “/ha-android-ui”

What it can do on your machine

Read from SKILL.md and the folder at commit eaa2122. 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

    Links to these hosts (documentation or services it may open):

    • developers.home-assistant.io

    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

Ha Android UI loads about 1.5k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 632 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 home-assistant/android at commit eaa2122, republished under its Apache-2.0 licence (© home-assistant). 632 words, ~1,527 tokens.

Download SKILL.mdSave it as .claude/skills/ha-android-ui/SKILL.md (or your agent's skills folder).
name
ha-android-ui
description
Home Assistant Android UI guidance. Use when building or reviewing Compose screens, ViewModels, screen state, navigation, dialogs, widgets, or anything using HATheme and the design system.

HA Android UI

Use this skill when creating or changing screens, ViewModels, navigation, or widgets.

The screen pattern is documented in depth at https://developers.home-assistant.io/docs/android/ui_architecture.

Compose Only

  • All new UI uses Jetpack Compose; no new XML, databinding, or viewbinding. Legacy XML screens are migrated over time.
  • All new widgets use Jetpack Glance; legacy RemoteViews widgets must not be extended.

Design System

  • Use io.homeassistant.companion.android.common.compose.theme.HATheme and the HA* components (HAButton, HAText, HATextField, HACheckbox, HALoading, HADropdownMenu, HAModalBottomSheet, ...) instead of Material components directly. Apply the theme in setContent, not inside the screen composable.
  • Never mix Material 2 and Material 3 in a screen; use HATextStyle for typography, HADimens.SPACE* tokens for spacing and sizes — no magic numbers for padding.
  • Access colors via LocalHAColorScheme.current with the tokens from HAColorScheme; never hardcode colors. Raw Material 3 elements get the wrong light/dark colors — if an HA* wrapper is missing, create it first (own PR, added to the Compose catalog with screenshots) instead of styling a Material component inline.
  • Use Snackbars for errors and transient feedback, not Toasts.
  • All displayed strings live in the value files in :common, English only, accessed with stringResource(R.string.*) — never hardcode displayed text. Only edit common/src/main/res/values/strings.xml: translations come from Lokalise and the translated values-*/strings.xml files are gitignored — never add or edit them.

Screen Structure

Name composables descriptively after the UI component (SettingsScreen.kt, UserCard.kt). Split every screen into a stateful entry point and a stateless content composable, hoisting state:

kotlin
@Composable
internal fun SettingsScreen(viewModel: SettingsViewModel) {
    val state by viewModel.uiState.collectAsStateWithLifecycle()
    SettingsScreenContent(uiState = state, onToggleSetting = viewModel::onToggleSetting)
}

@Composable
internal fun SettingsScreenContent(uiState: SettingsUiState, onToggleSetting: (String) -> Unit) {
    // Stateless: renders uiState and reports interactions through callbacks.
}

Recurring review feedback on screen composables:

  • Keep composables small: split large screens into small private composables (see recent screens like AssistSettingsScreen), and move a composable to its own file when the file grows too big.
  • Pass child composables only the parameters they need, never the whole ViewState.
  • No logic in the UI layer: no filtering, sorting, or mapping collections inside a composable — the ViewState carries display-ready data (for example a prebuilt HADropdownItem list). remember any value that must be computed in composition so it doesn't rebuild on every recomposition.
  • Name the stateless layer *Screen/*Content; *View is legacy.
  • Set the semantic Role on custom clickable rows (e.g. Modifier.clickable(role = Role.Checkbox)) for accessibility.
  • Disable/gate action buttons on input validity via the ViewState, and surface errors to the user (snackbar or state), with validation living in the ViewModel.
  • Don't seed local UI state once from a value that can still change (LaunchedEffect(Unit) reading a flow-backed field) — derive it from the current state so it stays in sync.

Add a @Preview for major composables using HAThemeForPreview:

kotlin
@Preview
@Composable
private fun SettingsScreenPreview() {
    HAThemeForPreview {
        SettingsScreenContent(uiState = SettingsUiState.Default, onToggleSetting = {})
    }
}
Show full SKILL.md (229 more words)Show less

ViewModel

  • Use MVVM; when logic grows complex, move to MVI with a single viewState Flow. Extract complex logic into UseCase classes and interact with data through repositories.
  • ViewModels never reference Compose or platform UI types; they expose state through Flow:
kotlin
@HiltViewModel
class DashboardViewModel @Inject constructor(
    private val getDashboard: GetUserDashboardUseCase,
) : ViewModel() {
    private val _uiState = MutableStateFlow<UiState>(UiState.Loading)
    val uiState: StateFlow<UiState> = _uiState.asStateFlow()
}
  • State classes are immutable (val, immutable collections, copy() for changes) and cheap to read: never compute in a get() that Compose evaluates on every recomposition — pre-compute when producing the state, in the ViewModel on a background dispatcher (Default), never on Main. Iterating a server's full entity list on the Main thread is a recurring review finding.
  • One ViewState is the single source of truth: don't keep parallel maps or extra mutable fields in the ViewModel that mirror what the state already holds — read and update the state itself.
  • ViewModels never expose Compose or platform types (no Context, no icon or lazy-list types); resolve those in the Compose layer and hoist callbacks instead of passing UI objects down.
  • Model distinct screen modes as a sealed hierarchy (Loading / Content / Error) so when stays exhaustive.
  • One-shot effects (navigation, snackbar) are events on a consumed-once Flow, never replayed state.

Navigation

  • Jetpack Navigation Compose, aiming for one Activity with one navigation graph made of feature sub-graphs. New screens must be in the graph; legacy Activities get migrated.
  • Use type-safe routes with @Serializable data/object classes:
kotlin
@Serializable
data class FeatureRoute(val value: Int)

fun NavGraphBuilder.featureNavGraph(navController: NavController) {
    composable<FeatureRoute> {
        FeatureScreen(
            value = it.toRoute<FeatureRoute>().value,
            onNavigateBack = { navController.popBackStack() },
        )
    }
}
  • All navigation needs tests, including back and forward stack behavior.

© home-assistant, 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

Just SKILL.md in .agents/skills/ha-android-ui of home-assistant/android.

Open the folder on GitHubat commit eaa2122

Compare with similar skills

Ha Android UI 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.

Ha Android UI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ha Android UI this skillhome-assistant/android4k—~1.5kAutomated safety check: PassApache-2.0
Stylesarindamxd/camerax-android1324 repos~2.3kAutomated safety check: PassApache-2.0
Jetpack Compose Expertaldefy/compose-skill596—~4.8kAutomated safety check: PassCustom licence
STS Amethyst Launcher Design SystemModinMobileSTS/SlayTheAmethystModded402—~1.7kAutomated safety check: PassCustom licence
Hz Metavrx UI Setmeta-quest/agentic-tools213—~1.4kAutomated safety check: PassApache-2.0
Cometchat Android V6 Compose Componentscometchat/cometchat-skills130—~2.9kAutomated safety check: PassMIT

Similar skills

  • 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
    MobileAuto-check passed
  • Jetpack Compose Expert

    aldefy/compose-skill

    Guides Jetpack Compose and Compose Multiplatform work across Android, Desktop, iOS and web, plus Android TV, Material 3 motion, paging, navigation and design-to-code.

    596 GitHub stars~4.8k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • STS Amethyst Launcher Design System

    ModinMobileSTS/SlayTheAmethystModded

    Design system imported from the SlayTheAmethyst Android Jetpack Compose launcher: Material 3 surfaces, user-selected seed colors, light and dark themes and typography rules.

    402 GitHub stars~1.7k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Hz Metavrx UI Set

    meta-quest/agentic-tools

    Builds app UI for Meta VR and Horizon OS with the MetaVrx UI Set, a Jetpack Compose component library and design system.

    213 GitHub stars~1.4k tokensUpdated 14 days ago
    Frontend & DesignAuto-check passed
  • Cometchat Android V6 Compose Components

    cometchat/cometchat-skills

    The closed catalog of CometChat Android v6 UI Kit components for the Jetpack Compose cohort — what exists, the composable import for each, the param shape (onX lambdas, hideX booleans, @Composable…

    130 GitHub stars~2.9k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Cometchat Android V6 Core

    cometchat/cometchat-skills

    Foundational rules for the CometChat Android UI Kit v6 — the two UI cohorts and their artifacts, credentials via the gitignored assets settings file, initFromSettings → login → render ordering, the…

    130 GitHub stars~5.5k tokensUpdated 3 days ago
    MobileAuto-check passed

More from home-assistant/android

All 10 skills in this repo
  • Ha Android Architecture

    home-assistant/android

    Home Assistant Android module and layer architecture. An agent skill from home-assistant/android.

    4k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Ha Android Concurrency

    home-assistant/android

    Home Assistant Android coroutine and threading guidance. An agent skill from home-assistant/android.

    4k GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Ha Android E2E Debugging

    home-assistant/android

    Home Assistant Android end-to-end (Maestro) failure triage. An agent skill from home-assistant/android.

    4k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Ha Android Kotlin Style

    home-assistant/android

    Home Assistant Android Kotlin style. An agent skill from home-assistant/android.

    4k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Ha Android Logging Errors

    home-assistant/android

    Home Assistant Android logging and error handling. An agent skill from home-assistant/android.

    4k GitHub stars~845 tokensUpdated yesterday
    Auto-check passed
  • Ha Android Testing

    home-assistant/android

    Home Assistant Android testing guidance. An agent skill from home-assistant/android.

    4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Questions about Ha Android UI

What does Ha Android UI do?

Home Assistant Android UI guidance. An agent skill from home-assistant/android. Ha Android UI is an agent skill from home-assistant/android. Home Assistant Android UI guidance.

When should I use Ha Android UI?

Ha Android UI fits situations like: reviewing Compose screens; anything using HATheme and the design system.

How do I install Ha Android UI in Claude Code?

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

How do I install Ha Android UI in Codex?

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

Can I use Ha Android UI 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 home-assistant/android --skill ha-android-ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ha-android-ui, .gemini/skills/ha-android-ui, .github/skills/ha-android-ui and .opencode/skills/ha-android-ui in your project.

What does Ha Android UI need to run?

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

Does Ha Android UI access the network?

SKILL.md names 1 domain. As links in the text: developers.home-assistant.io. This is read from the text; nothing was executed.

Is Ha Android UI 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 Ha Android UI use?

Ha Android UI 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 Ha Android UI use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ha Android UI?

Skills that share tags, products or a category with Ha Android UI: Styles (arindamxd/camerax-android, 132 stars), Jetpack Compose Expert (aldefy/compose-skill, 596 stars), STS Amethyst Launcher Design System (ModinMobileSTS/SlayTheAmethystModded, 402 stars) and Hz Metavrx UI Set (meta-quest/agentic-tools, 213 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ha Android UI?

home-assistant (a GitHub organization) maintains it in home-assistant/android, which has 3,954 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

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