foundation-models-on-device

Enable on-device LLM workflows with Apple FoundationModels for iOS apps.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Apple FoundationModels on-device enables private, offline LLM execution for iOS apps, avoiding cloud dependencies and enabling responsive UI.

Core Features & Use Cases

  • On-device LLM execution with FoundationModels for privacy-preserving apps.
  • Structured output via @Generable and tool calling for domain actions.
  • Snapshot streaming to drive real-time UI updates on-device.

Quick Start

Integrate FoundationModels in your iOS project and initialize an on-device session to start generating results.

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 run LLMs on-device for iOS apps without cloud dependencies?

On-device LLMs execute locally using Apple FoundationModels to avoid cloud dependencies. This enables private, offline AI generation while supporting responsive UI updates for iOS apps.

How do I get structured output from an on-device LLM in my iOS app?

Structured output from on-device LLMs is generated using the @Generable attribute and tool calling. This enables domain-specific actions and structured data extraction within private, offline iOS apps.

What is the best way to update my iOS UI in real-time during on-device LLM generation?

Snapshot streaming is the best way to update iOS UI during on-device LLM generation. It streams generation snapshots from FoundationModels to drive real-time UI updates locally.

Does Apple FoundationModels support custom tool calling for offline iOS apps?

Apple FoundationModels supports custom tool calling for offline iOS apps. This enables domain-specific actions during on-device LLM execution without requiring cloud dependencies.

Why does my on-device LLM generation stop early in my iOS app?

On-device LLM generation stops early due to the 4,096-token constraint enforced by FoundationModels. Session management limits output length to ensure responsive performance during offline execution.

Can I use FoundationModels for private, offline AI generation in iOS?

You can use FoundationModels for private, offline AI generation in iOS. It enables on-device LLM execution, avoiding cloud dependencies while supporting structured output and tool calling.