Litert Runtime
Configures and implements LiteRT (.tflite) on-device inference on Android in Kotlin using the CompiledModel API on CPU and GPU. Use this skill for any Android LiteRT or .tflite task, including Gradle setup, image classification or vision/audio/embedding helpers, TensorBuffer reuse, CPU memory optimization, Bitmap preprocessing, AndroidViewModel GPU-to-CPU fallback with warm-up on a single-thread dispatcher, LiteRT in Google Play services (play-services-litert), migrating from legacy org.tensorflow.lite.Interpreter, GpuDelegate, or play-services-tflite, and latency benchmarking. Don't use for r
Install
npx skills add google-ai-edge/litert-samples --skill litert-runtimegit clone --depth 1 https://github.com/google-ai-edge/litert-samples.git /tmp/litert-samples
mkdir -p ~/.claude/skills
cp -r /tmp/litert-samples/skills/android/litert-runtime ~/.claude/skills/litert-runtimePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
This skill provides step-by-step guidance for building an Android app that runs
a `.tflite` model with the [LiteRT CompiledModel API](https://ai.google.dev/edge/litert/android)
(`com.google.ai.edge.litert:litert` 2.x; [source repository](https://github.com/google-ai-edge/litert/blob/main/README.md)) on the CPU or
the GPU, with the runtime bundled in the APK or from Google Play services. Don't
use the deprecated `org.tensorflow.lite.Interpreter` API. For
open text language models using `.litertlm` files, suggest the `litert-lm`
skill.
## Prerequisites
- A Kotlin Android project (`minSdk` must be `24` or higher, as declared by the LiteRT 2.3.0 AARs).
- The runtime that Step 1 picks: the Google Play services runtime (`com.google.android.gms:play-services-litert`, the default; see [LiteRT in Google Play services](references/play-services.md)), or the bundled runtime (`implementation("com.google.ai.edge.litert:litert:2.3.0")` and `implementation("com.google.ai.edge.litert:litert-gpu:2.3.0")` from Google Maven). For the bundled runtime, from 2.3.0 the GPU accelerator is the second artifact: with `litert` alone the app builds, and `CompiledModel.create` with `CompiledModel.Options(Accelerator.GPU)` throws `LiteRtException` because the APK has no GPU accelerator library. With `CompiledModel.Options(Accelerator.GPU, Accelerator.CPU)` it doesn't throw: the model runs on the CPU while the app reports the GPU, and only Logcat shows it (`GPU accelerator could not be loaded and registereDetails
- Skill name
litert-runtime- Repository
- google-ai-edge/litert-samples
- Path
skills/android/litert-runtime/SKILL.md- License
- Apache-2.0
- Repo updated
- 17 November 2026
- Copies
- Found in 2 GitHub repos
FAQ
What does the Litert Runtime skill do?
Configures and implements LiteRT (.tflite) on-device inference on Android in Kotlin using the CompiledModel API on CPU and GPU. Use this skill for any Android LiteRT or .tflite task, including Gradle setup, image classification or vision/audio/embedding helpers, TensorBuffer reuse, CPU memory optimization, Bitmap preprocessing, AndroidViewModel GPU-to-CPU fallback with warm-up on a single-thread dispatcher, LiteRT in Google Play services (play-services-litert), migrating from legacy org.tensorflow.lite.Interpreter, GpuDelegate, or play-services-tflite, and latency benchmarking. Don't use for r
How do I install the Litert Runtime skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add google-ai-edge/litert-samples --skill litert-runtime. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Litert Runtime popular?
It lives in google-ai-edge/litert-samples, which has 499 GitHub stars and 134 forks.
Related skills
Litert Lm
499google-ai-edge/litert-samples
Builds an Android app that runs an open text LLM on the device, on the CPU or the GPU, with the LiteRT-LM Kotlin API (com.google.ai.edge.litertlm:litertlm-android). Use this skill when creating a chat, summarization, or extraction feature with a .litertlm model from Hugging Face litert-community (Gemma, Qwen, Llama, Phi), including the Gradle dependency, the GPU manifest entries, getting the model file onto the device, Engine initialization off the main thread, a streamed multi-turn Conversation with sendMessageAsync, and the AndroidViewModel and Compose screen. Don't use for running .tflite v
Accuracy Safe Quantization
499google-ai-edge/litert-samples
Shrink a converted LiteRT model with ai-edge-quantizer (fp16 / int8 / int4) without losing accuracy, verifying parity against the float source after every step. Use when choosing a quantization recipe for a new model, when a quantized model fails to load, degrades on a task benchmark, or degenerates over long generations, or when deciding between dynamic-range, weight-only, and blockwise variants.
Benchmark on Ddp
499google-ai-edge/litert-samples
Measure a LiteRT .tflite model with `benchmark_model` on Developer Device Platform (DDP) lab phones through `litert benchmark --ddp`, or on the Mac you run it from, and turn the session into rows of the performance leaderboard under benchmark/leaderboard - one matrix entry per model, one session per accelerator, collect results.pb and runtime_info.pb, rebuild board.json, check the page, commit the data. Use when a model needs latency and memory numbers per platform, device and accelerator, or when a new benchmark_model release means re-measuring the board.
Swiftui Iphone Duo
470FloWritesCode/fwc-swiftui-skills
Adapts and reviews SwiftUI apps for iPhone Duo (Xcode 27.1 / iOS 27.1 SDK) and continuously changing window sizes. Use when supporting the foldable iPhone Duo, outer or inner display, vertical bars (toolbarVerticalBehavior, axisBehavior, visibilityPriority, ToolbarOverflowMenu), sheet placement, reserved regions and the fold, ArrangementView, onHingeChange, CameraCaptureAccessory, NavigationSplitView, adaptive TabView sidebar, ViewThatFits, AnyLayout, or when replacing UIDevice / UIScreen.main / idiom / orientation layout branches.
Swiftui Liquid Glass
470FloWritesCode/fwc-swiftui-skills
Implement, review, and refactor SwiftUI features using the iOS 26+ Liquid Glass API. Use when adopting Liquid Glass in new UI, converting existing surfaces to glass, reviewing glass usage for correctness, or fixing common Liquid Glass pitfalls (custom blur stacks, scroll views, button shapes, bottom bars, pre-enclosed symbols).
Senior Mobile
1.2kborghei/Claude-Skills
Mobile development across SwiftUI, Jetpack Compose, React Native (Expo) and Flutter: scaffolding, feature architecture, static performance checks and store listings. Use when building, optimizing or shipping a mobile app.
Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.