foundation-models-on-device

Generate text and extract structured data on iOS 26+ with Apple's FoundationModels framework.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/dbrijesh/raep --skill foundation-models-on-device-dbrijesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/dbrijesh/raep/tree/main/templates/skills/foundation-models-on-device
Command: npx skills add https://github.com/dbrijesh/raep --skill foundation-models-on-device-dbrijesh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Swift, FoundationModels, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides on-device language model capabilities using Apple's FoundationModels framework, enabling privacy-preserving AI functions directly on the device.

Core Features & Use Cases

  • Text Generation: Generate text on the device without cloud dependency.
  • Structured Output: Extract structured data from natural language input.
  • Tool Calling: Implement custom tool calling for domain-specific AI actions.
  • Snapshot Streaming: Stream structured responses for real-time UI updates.
  • Use Case: A developer can integrate this Skill into an iOS app to provide real-time, privacy-preserving language processing capabilities.

Quick Start

Use the foundation-models-on-device skill to generate a response to "What's a good month to visit Paris?" and extract the result's content.

Frequently Asked Questions about foundation-models-on-device

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

FAQPage Schema
How do I run on-device text generation in iOS without a cloud dependency?

On-device text generation runs locally using Apple's FoundationModels framework on iOS 26+. It processes prompts directly on the hardware, ensuring privacy-preserving AI functions without requiring a network connection.

How do I extract structured data from natural language input on iOS?

Structured data extraction parses natural language input into defined formats using the FoundationModels framework. It leverages on-device AI to securely transform text into structured data without cloud processing.

Does on-device AI with FoundationModels support custom tool calling?

Yes, FoundationModels supports custom tool calling for domain-specific AI actions. You can implement tools on-device to execute specific functions triggered by the language model during text generation.

What's the best way to stream structured AI responses for real-time UI updates in Swift?

Snapshot streaming provides structured responses for real-time UI updates in Swift. It leverages the FoundationModels framework to incrementally stream on-device AI outputs directly to your iOS app interface.

Do I need iOS 26 and Swift to use FoundationModels for on-device AI?

Yes, FoundationModels requires Swift and iOS 26+ to be enabled on the device. These dependencies are mandatory for executing on-device language model capabilities and ensuring privacy-preserving functionality.

What are the limitations of on-device AI compared to cloud-based language models?

On-device AI limitations include hardware constraints and the requirement for iOS 26+ with FoundationModels enabled. It prioritizes privacy-preserving text generation over cloud scalability for iOS apps.