Skip to content

Leanback to Compose TV Migration

Guides an agent to migrate Android TV screens from Leanback/Views to Jetpack Compose for TV (androidx.tv).

Repository
android/skills
Stars
10,278
Licence
Apache-2.0
Files
4 files

What it does

When installed, the agent follows a set of rules and patterns for converting Android TV apps built with the older Leanback toolkit, Android Views or Support Fragments into Jetpack Compose for TV. It covers 10-foot (TV couch viewing distance) design, TV Material 3 components, D-pad remote focus handling so users can move around the screen without getting stuck, focus zoom on cards, Media3 video playback, and file naming and import conventions. It is instructional: it tells the agent how to write and structure the code rather than running any tools itself.

Great for

  • Android TV developers moving a Leanback app to Jetpack Compose for TV
  • Teams replacing BrowseSupportFragment, settings, login or video playback screens with Compose equivalents

Skip it if

  • Phone or tablet apps, since the rules target TV dependencies and D-pad navigation (wrong platform)
  • Projects that must keep Leanback or Views for compatibility reasons, because the skill mandates Compose for TV and forbids AndroidView wrappers, which could break existing code if applied blindly

Try asking

  • “Migrate my BrowseSupportFragment home screen to a Compose for TV browse screen with a hero carousel”
  • “Convert my Leanback login GuidedStepSupportFragment into a Compose AuthenticationScreen with initial focus set”
  • “Replace my VideoSupportFragment playback screen with Media3 PlayerSurface in Compose”
Step-by-step guide: how to use Leanback to Compose TV MigrationInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the Apache-2.0 licence and an attribution note.

    leanback-to-compose-tv-migration.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip leanback-to-compose-tv-migration.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip leanback-to-compose-tv-migration.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the agent your existing Leanback fragment or presenter code so it can map each piece to a Compose equivalent.
  • Check the generated Gradle dependencies and versions yourself, since the skill's guidance is prescriptive and may not match your project's setup.
  • Test focus behaviour on a real TV or emulator with a D-pad remote, because focus bugs are not visible in code review alone.

What's inside

  • references/android/training/tv/get-started/navigation.md
  • references/android/training/tv/playback/compose/browse.md
  • references/android/training/tv/playback/compose/index.md
  • SKILL.md

Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.