foundation-models

Enable on-device AI inference in Swift apps using Apple Foundation Models.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/bluewaves-creations/bluewaves-skills --skill foundation-models-bluewaves-creations
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: foundation-models
Source: https://github.com/bluewaves-creations/bluewaves-skills/tree/main/plugins/swift-apple-dev/skills/foundation-models
Command: npx skills add https://github.com/bluewaves-creations/bluewaves-skills --skill foundation-models-bluewaves-creations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Apple Foundation Models enable private, on-device AI inference, eliminating cloud dependency and reducing latency for apps on Apple devices.

Core Features & Use Cases

  • On-device AI inference with Foundation Models for offline, privacy-preserving operation.
  • Structured output generation via the @Generable macro to produce typed results and safer data exchange.
  • Tool calling to integrate local or remote services without transmitting data to external servers.

Quick Start

Install Xcode 26+ and create a Swift project. Import FoundationModels and initialize a LanguageModelSession to begin experimenting with on-device AI. For quick validation, run a simple prompt like asking for a summary or simple reasoning using the session.

Frequently Asked Questions about foundation-models

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

FAQPage Schema
How do I run on-device AI inference offline in a Swift app?▼

Structured output generation uses the @Generable macro in Swift to produce typed results. This enables safer data exchange by constraining the Foundation Models output to specific types you define.

Can I use tool calling with Foundation Models on iOS without sending data to external servers?▼

Foundation Models require Xcode 26+ and compatible hardware running iOS 26+, macOS Tahoe+, iPadOS 26+, or visionOS 26+. You must import FoundationModels and initialize a LanguageModelSession to begin on-device AI inference.

What's the best way to generate typed structured output from a local language model in Swift?▼

Structured output generation uses the @Generable macro in Swift to produce typed results. This enables safer data exchange by constraining the Foundation Models output to specific types you define.

Can I use tool calling with Foundation Models on iOS without sending data to external servers?▼

Tool calling with Foundation Models integrates local or remote services directly within your on-device AI workflow. It executes functions without transmitting your underlying data to external servers, preserving privacy.

Do I need Xcode 26 and specific hardware to use Foundation Models for on-device AI?▼

Foundation Models require Xcode 26+ and compatible hardware running iOS 26+, macOS Tahoe+, iPadOS 26+, or visionOS 26+. You must import FoundationModels and initialize a LanguageModelSession to begin on-device AI inference.

Why use on-device AI with Foundation Models instead of cloud-based inference for Swift apps?▼

On-device AI with Foundation Models eliminates cloud dependency and reduces latency for iOS apps. It provides offline, privacy-preserving operation by running inference directly on supported Apple hardware.