Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add noloman/Android-AI-skills --skill android-ml-ondevicegit clone --depth 1 https://github.com/noloman/Android-AI-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/noloman/android-ai-skills/android-ml-ondevice)<a href="https://agentmods.dev/skills/noloman/android-ai-skills/android-ml-ondevice"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/android-ml-ondevice/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/noloman/android-ai-skills/android-ml-ondevice"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/android-ml-ondevice.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00407 |
| Opus 5 | $0.00000 | $0.00204 |
| Sonnet 5 | $0.00000 | $0.00081 |
| Haiku 4.5 | $0.00000 | $0.00041 |
Grade A, and why
android-ml-ondevice scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
name: android-ml-ondevice description: On-device ML — ML Kit, TensorFlow Lite, Gemini Nano, model management. user-invocable: true
Android On-Device ML
Cross-cutting skill — always activates alongside the project-type-specific skill.
Hard Rules
- Prefer ML Kit for common tasks (text recognition, barcode, face, pose) — pre-trained, optimized.
- Run inference off the main thread — use coroutines with Dispatchers.Default.
- Use Google Play Services-based ML Kit models to reduce APK size.
- Bundle TFLite models in assets/ or download dynamically via Play Asset Delivery.
- Validate model input/output shapes — mismatches cause silent failures or crashes.
- Handle model loading failures gracefully — provide fallback or skip ML feature.
- Do not ship unnecessarily large models — quantize (INT8) to reduce size and latency.
- Respect user privacy — process data on-device, do not upload without consent.
- Request camera/microphone permissions before ML features that use them.
- Test ML features on low-end devices — not just flagships.
- Prefer MediaPipe Tasks API for new vision/text/audio ML features — unified, cross-platform, actively maintained.
- TensorFlow Lite is now rebranded as LiteRT — update references in new code.
Core Patterns
- ML Kit auto-downloads models via Google Play Services (no APK size impact).
- Use InputImage.fromMediaImage() for CameraX integration with ML Kit.
- TFLite Interpreter with GPU delegate for acceleration on supported devices.
- Use Gemini Nano (on-device LLM) via AI Core API for generative tasks — supports text and multimodal input.
- Implement progressive enhancement — ML features enhance but are not required.
- Cache inference results when input hasn't changed.
References
- references/ml_kit.md
- references/tensorflow_lite.md
- references/gemini_nano.md
- references/model_management.md
- references/mediapipe.md
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 40 lines · 0 tokens per session scan A a047e01004b5
android-ml-ondevice is a skill published in the GitHub repository noloman/Android-AI-skills (6 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 407 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ml-kit-genai-prompt-api
Analyzes Android codebases to implement ML Kit GenAI Prompt API. Use this skill to send natural language requests on-device to Gemini Nano, use structured output with Prompt API, implement prefix caching, optimize the current prompt, or apply best practices.".
model-authoring
Empirical rules for authoring PyTorch models for on-device execution on Apple platforms, covering energy-efficient inference, scalable compute, and correctness testing. Use this skill whenever the user is writing, debugging, or reviewing PyTorch model code intended for on-device execution — even if they don't…
working-with-coreai
Use this skill whenever the user mentions coreai-torch, TorchConverter, coreai-build, AIModel, AIProgram, .aimodel, or wants to export/compile/run a PyTorch model on Apple silicon (iPhone, iPad, Mac). Also triggers for "deploy on device", "optimize for on-device performance", onboarding new models to Core AI, or…
axiom-ai
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.
firebase-ai
Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.
frontend-a11y
Accessibility patterns for React and Next.js — semantic HTML, ARIA attributes, form labeling, keyboard navigation, focus management, and screen reader support. Use when building any interactive UI component or form.