foundation-models-on-device

Integrate Apple's FoundationModels framework for on-device text generation and tool invocation.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/klu-dev/porting-ecc-to-vscode --skill foundation-models-on-device-klu-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/klu-dev/porting-ecc-to-vscode/tree/main/.github/skills/foundation-models-on-device
Command: npx skills add https://github.com/klu-dev/porting-ecc-to-vscode --skill foundation-models-on-device-klu-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a framework for integrating Apple's on-device language model into iOS apps, ensuring privacy and offline support for text generation, tool calling, and structured responses.

Core Features & Use Cases

  • Text Generation: Generate text on-device without cloud dependency.
  • Tool Calling: Invoke custom code for domain-specific AI actions.
  • Structured Responses: Stream structured responses for real-time UI updates.
  • Use Case: Develop AI-powered iOS apps that require privacy and offline functionality, such as generating text, extracting structured data, or implementing custom AI actions.

Quick Start

Use the foundation-models-on-device skill to generate a text summary of the provided article.

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 integrate on-device LLM text generation in iOS apps?

On-device LLM text generation in iOS apps is integrated using Apple's FoundationModels framework. This Skill provides the necessary Swift APIs to generate text locally without cloud dependency.

Can I use FoundationModels for custom tool calling on iOS?

Yes, FoundationModels supports custom tool calling on iOS. You can invoke custom code for domain-specific AI actions directly within the on-device language model workflow.

What iOS version is required to use Apple's on-device LLM?

Apple's on-device LLM requires iOS 26 or later. You must also have the FoundationModels dependency available in your Swift project to execute language model tasks.

How do I stream structured responses from an on-device language model?

Structured responses are streamed from an on-device language model using the FoundationModels framework. This Skill facilitates real-time UI updates by supporting structured response streaming.

Does on-device text generation work offline?

On-device text generation works entirely offline. By leveraging the FoundationModels framework, iOS apps can generate text, extract structured data, and invoke tools without any cloud connectivity.