foundation-models-on-device

Integrate Apple's on-device FoundationModels framework into iOS 26+ apps for offline text generation and structured data extraction.

2|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/sayasaya8039/ZWG_Terminal --skill foundation-models-on-device-sayasaya8039
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/sayasaya8039/ZWG_Terminal/tree/main/.claude/skills/foundation-models-on-device
Command: npx skills add https://github.com/sayasaya8039/ZWG_Terminal --skill foundation-models-on-device-sayasaya8039

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the difficulty of building privacy-preserving AI features for iOS apps that require offline functionality and no user data to leave the device, which is not possible with cloud-dependent large language models.

Core Features & Use Cases

  • On-Device Text Generation: Generate summaries, content, and responses directly on the user's device without cloud API calls, ideal for privacy-sensitive use cases like note-taking or personal assistant apps.
  • Structured Data Extraction: Use the @Generable macro to extract typed, structured data from natural language input for form filling, command parsing, or data entry tasks.
  • Custom Tool Calling: Implement domain-specific AI actions like recipe search or calendar lookup by defining custom tools the model can invoke automatically.
  • Snapshot Streaming: Stream partially generated structured responses to update UIs in real time as the model produces output, for responsive user experiences.
  • Use Case Example: A cooking app can use this Skill to extract structured dietary preferences from user natural language input, then generate personalized recipe suggestions entirely on-device without sending user data to external servers.

Quick Start

Use the foundation-models-on-device skill to add a private on-device AI feature to your iOS 26+ app that extracts structured user preferences from natural language input and returns personalized suggestions without sending data to the cloud.

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 implement on-device LLM text generation in SwiftUI without cloud dependency?

To implement on-device LLM text generation in SwiftUI, you integrate Apple's FoundationModels framework to run large language model tasks locally on iOS 26+ devices, ensuring user data never leaves the device.

Can I extract structured data from natural language input in iOS 26?

You can extract structured data from natural language input in iOS 26 by using the @Generable macro to parse typed information for form filling and command parsing without external API calls.

Does iOS 26 support custom tool calling with Apple Intelligence for offline apps?

iOS 26 supports custom tool calling with Apple Intelligence by allowing you to define domain-specific tools like recipe search or calendar lookup that the on-device model invokes automatically.

What is the best way to stream partial LLM responses for real-time SwiftUI updates?

The best way to stream partial LLM responses for real-time SwiftUI updates is using snapshot streaming, which pushes partially generated structured data to the UI as the model produces output.

Can I use FoundationModels for privacy-preserving AI features in note-taking apps?

You can use FoundationModels to build privacy-preserving AI features for note-taking apps by executing on-device text generation and structured data extraction entirely without cloud dependency.