foundation-models-on-device

Generate text, structured output, and tool calls on iOS 26 with FoundationModels.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Michae2xl/claude-skills-michael --skill foundation-models-on-device-michae2xl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/Michae2xl/claude-skills-michael/tree/main/skills/foundation-models-on-device
Command: npx skills add https://github.com/Michae2xl/claude-skills-michael --skill foundation-models-on-device-michae2xl

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides an on-device language model for iOS 26 and above, enabling text generation, structured output, and tool calling without cloud dependency.

Core Features & Use Cases

  • Text Generation: Create text and perform text generation tasks on-device.
  • Structured Output: Generate structured Swift types for structured data output.
  • Tool Calling: Invoke custom code for domain-specific tasks.
  • Use Case: Develop AI-powered features in iOS apps that rely on privacy-preserving on-device processing and offline support.

Quick Start

Use the LanguageModelSession to create a session and respond to a prompt like "What's a good month to visit Paris?".

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 AI text generation in an iOS app?

On-device AI text generation in iOS uses the FoundationModels framework to process prompts locally. You create a LanguageModelSession and pass a prompt to generate text without requiring a cloud connection.

Can I generate structured Swift types from on-device language models?

Structured output generation from on-device models produces native Swift types directly. The FoundationModels framework parses the language model response into defined Swift structures for reliable data handling.

How does tool calling work with on-device LLMs on iOS?

Tool calling with on-device LLMs allows the model to invoke your custom Swift functions for domain-specific tasks. The FoundationModels framework manages the session context to trigger external code during text generation.

Do I need an internet connection for on-device AI processing on iOS 26+?

On-device AI processing on iOS 26+ operates entirely offline without an internet connection. The FoundationModels framework executes language models locally on the device to ensure privacy and support offline capabilities.

What are the requirements for integrating on-device LLMs into an iOS application?

Integrating on-device LLMs requires iOS 26 or above and the FoundationModels framework. Developers need Swift programming knowledge to implement LanguageModelSession and handle text generation or tool calling.