foundation-models-on-device

Generate privacy-preserving text and structured output in iOS 26+ apps using Apple's FoundationModels framework.

12|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TeiNam/kiro-with-harness --skill foundation-models-on-device-teinam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/TeiNam/kiro-with-harness/tree/main/skills/foundation-models-on-device
Command: npx skills add https://github.com/TeiNam/kiro-with-harness --skill foundation-models-on-device-teinam

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill allows for the integration of Apple's on-device language model, providing privacy-preserving text generation and structured output without the need for cloud dependency.

Core Features & Use Cases

  • On-Device LLM Integration: Incorporate Apple's FoundationModels framework into iOS apps for text generation, tool calling, and structured output.
  • Text Generation: Generate and summarize text, and implement custom tool calling for domain-specific actions.
  • Structured Output: Stream structured responses for real-time UI updates.
  • Use Case: Build an app that provides personalized text generation based on user input, while maintaining user privacy and offline support.

Quick Start

To use the skill, create a new session with the model, generate text, and stream the results.

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 generate text on-device in iOS 26 without sending data to the cloud?

On-device text generation in iOS 26 uses Apple's FoundationModels framework to run the local language model, ensuring privacy-preserving execution and offline support without cloud dependency.

How do I get structured output from an on-device LLM in my iOS app?

Structured output from an on-device LLM is produced using the @Generable macro in the FoundationModels framework, enabling guided generation and streaming of structured responses for real-time UI updates.

Does the FoundationModels framework support custom tool calling for domain-specific actions?

Yes, the FoundationModels framework supports custom tool calling, enabling your iOS 26 app to execute domain-specific actions and integrate those capabilities directly into the text generation workflow.

Can I stream text generation results for real-time UI updates in iOS 26?

Real-time UI updates during text generation are handled via snapshot streaming with FoundationModels, passing incremental model outputs directly to your app interface as they are produced.

What are the limitations of using FoundationModels for on-device text generation?

On-device text generation with FoundationModels is limited to iOS 26+ environments, requiring compatible hardware to execute the local model and provide offline, privacy-preserving structured output.