foundation-models

Integrate Apple Foundation Models for on-device text summarization and structured generation.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/Emasoft/emasoft-complete-ios-app-authoring --skill foundation-models-emasoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models
Source: https://github.com/Emasoft/emasoft-complete-ios-app-authoring/tree/main/skills/foundation-models
Command: npx skills add https://github.com/Emasoft/emasoft-complete-ios-app-authoring --skill foundation-models-emasoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of integrating on-device AI capabilities into Apple platform applications while maintaining user privacy and avoiding server costs. It provides comprehensive guidance for using Apple's Foundation Models framework, which powers Apple Intelligence, to perform summarization, extraction, classification, tagging, and structured generation directly on the user's device.

Core Features & Use Cases

  • On-Device LLM Integration: Use the ~3B parameter Foundation Models framework for summarization, extraction, classification, and short dialog on iOS 26+, iPadOS 26+, macOS 26+, and visionOS 26+.
  • Structured Output: Generate type-safe structured data using the Generable macro and Guide constrained decoding, eliminating manual JSON parsing and hallucinated keys.
  • Tool Calling & Streaming: Wire tool calling for live data fetching and implement progressive UI updates with snapshot streaming over PartiallyGenerated.
  • Use Case: Imagine building a note-taking app that summarizes long articles offline. Use this Skill to implement on-device summarization with streaming, availability checks for unsupported devices, and graceful fallbacks when Apple Intelligence is disabled.

Quick Start

Use the foundation-models skill to add on-device text summarization to your iOS app by checking availability, creating a LanguageModelSession with instructions, and streaming the response to update the UI progressively.

Frequently Asked Questions about foundation-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add on-device AI to my iOS app using Apple's Foundation Models framework?

To add on-device AI to your iOS app, check model availability, create a LanguageModelSession with instructions, and stream responses to update the UI progressively using the Foundation Models framework on iOS 26+.

Does the Foundation Models framework work offline on unsupported devices?

The Foundation Models framework requires iOS 26+, iPadOS 26+, macOS 26+, or visionOS 26+. It provides availability checking and graceful fallbacks for unsupported devices or when Apple Intelligence is disabled.

How do I generate type-safe structured data from an on-device LLM in Swift?

Generate type-safe structured data in Swift by using the Generable macro and Guide constrained decoding, which eliminates manual JSON parsing and prevents hallucinated keys from the on-device LLM output.

Can I implement tool calling and streaming with the Apple Intelligence Foundation Models?

Yes, you can wire tool calling for live data fetching and implement progressive UI updates with snapshot streaming over PartiallyGenerated using the Apple Intelligence Foundation Models framework.

What are the limitations of using a 3B parameter on-device model for text summarization?

The ~3B parameter Foundation Models framework handles summarization, extraction, classification, and short dialog directly on-device, offering privacy and no server costs but limited to supported Apple platforms and active Apple Intelligence.

How do I train custom LoRA adapters for the Apple Foundation Models framework?

The Foundation Models framework supports custom LoRA adapter training to extend on-device language model capabilities, allowing tailored summarization, classification, and structured generation for specific application contexts.