on-device-ai

Implement on-device AI workflows in React Native apps using ExecuTorch.

265|12|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/software-mansion-labs/skills --skill on-device-ai-software-mansion-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: on-device-ai
Source: https://github.com/software-mansion-labs/skills/tree/main/skills/react-native-best-practices/references/on-device-ai
Command: npx skills add https://github.com/software-mansion-labs/skills --skill on-device-ai-software-mansion-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

React Native apps typically rely on cloud AI services which introduce latency, bandwidth usage, and privacy concerns. This Skill enables on-device AI workloads to run locally using ExecuTorch, covering common tasks like image classification, object detection, OCR, text-to-speech, speech-to-text, and embeddings. It also guides initialization, model loading, and safe usage patterns across Expo and bare React Native environments.

Core Features & Use Cases

  • On-device AI execution to reduce cloud dependency and latency.
  • Hook-based patterns for LLMs, vision, audio, and privacy-aware ML with comprehensive setup and error handling.
  • Real-world use cases across mobile apps, including offline inference, privacy-preserving ML, and low-latency AI features.

Quick Start

Initialize ExecuTorch at app entry with a resource fetcher and run a sample on-device AI task.

Frequently Asked Questions about on-device-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run on-device AI models in a React Native app without cloud dependencies?

You can run on-device AI in React Native by initializing ExecuTorch at your app entry with a resource fetcher to load models locally, eliminating cloud latency and bandwidth usage.

What mobile AI tasks can ExecuTorch handle for local inference in Expo?

ExecuTorch handles common on-device AI tasks for Expo apps including image classification, object detection, OCR, text-to-speech, speech-to-text, and embeddings.

Can I use React Native hooks for privacy-aware machine learning on mobile?

Yes, this Skill provides hook-based patterns for LLMs, vision, audio, and privacy-aware ML, ensuring safe usage and comprehensive error handling across React Native environments.

Does on-device AI in React Native work in both Expo and bare environments?

Yes, on-device AI execution using ExecuTorch is fully supported across both Expo and bare React Native environments, guiding initialization, model loading, and safe usage patterns.

What are the limitations of running machine learning locally on mobile devices?

On-device machine learning eliminates cloud dependency but requires careful resource fetching, robust error handling for model loading, and managing local hardware constraints for offline inference.