foundation-models-on-device

Generate text and extract structured data on-device with Apple's FoundationModels framework.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill solves the challenge of implementing on-device language model features in iOS 26+ applications, providing privacy and offline support for AI-powered text generation and more.

Core Features & Use Cases

  • On-Device Text Generation: Generate text on the device without sending data to the cloud.
  • Structured Output: Extract structured data from natural language input.
  • Custom Tool Calling: Integrate custom AI tools for domain-specific actions.
  • Real-Time Updates: Stream responses for real-time UI updates.
  • Use Case: Build an app that summarizes documents or suggests recipes on the device, ensuring no data leaves the user's device.

Quick Start

Use the foundation-models-on-device skill to generate a summary of a document.

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 perform on-device text generation in iOS without a cloud dependency?

On-device text generation on iOS uses Apple's FoundationModels framework to generate text locally, ensuring privacy and offline support without sending data to the cloud.

What are the requirements for using FoundationModels to extract structured data on iOS?

Extracting structured data with FoundationModels requires iOS 26+, Swift, device eligibility, and Apple Intelligence to be enabled for local natural language processing.

How do I extract structured data from natural language input using FoundationModels?

FoundationModels extracts structured data from natural language on-device by mapping text inputs to defined schemas, enabling local data extraction without cloud processing.

Can I stream AI responses for real-time UI updates using on-device FoundationModels?

FoundationModels supports streaming responses for real-time UI updates, allowing iOS applications to display on-device text generation progressively as it is produced.

What is the best way to integrate custom AI tools for domain-specific actions on iOS?

FoundationModels enables custom tool calling to integrate domain-specific actions directly within on-device text generation workflows, executing local tools without network connectivity.