foundation-models-on-device

Enable on-device LLM text generation and structured outputs in iOS apps.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lllooollpp/solopreneur- --skill foundation-models-on-device-lllooollpp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models-on-device
Source: https://github.com/lllooollpp/solopreneur-/tree/main/solopreneur/data/skills/foundation-models-on-device
Command: npx skills add https://github.com/lllooollpp/solopreneur- --skill foundation-models-on-device-lllooollpp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Apple FoundationModels on-device workflows enable private, offline AI capabilities by running LLM tasks directly on iOS devices, avoiding cloud dependency and preserving user data.

Core Features & Use Cases

  • On-device text generation with privacy-preserving sessions
  • Structured output with @Generable for typed results
  • Custom tool calling to perform domain-specific actions
  • Snapshot streaming for real-time UI updates
  • End-to-end on-device workflow for offline apps

Quick Start

Create an on-device LanguageModelSession and call respond with a prompt to begin generating text offline.

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 LLM workflows on-device for offline iOS apps?

To run on-device LLM workflows for offline iOS apps, you can use FoundationModels integration to execute text generation and tool calling directly on the device. This avoids cloud dependency and preserves user data privacy.

How does streaming work for real-time UI updates in on-device text generation?

Streaming for real-time UI updates uses snapshot streaming to incrementally deliver generated text to the interface. This mechanism provides immediate visual feedback while the offline LLM continues processing the prompt.

Can I get structured outputs from an on-device LanguageModelSession?

You can get structured outputs from an on-device LanguageModelSession by applying the @Generable attribute. This feature enables typed, structured results for your private text generation workflows.

Does FoundationModels support custom tool calling for domain-specific actions?

FoundationModels supports custom tool calling to perform domain-specific actions during on-device LLM workflows. This allows your offline iOS apps to execute localized tasks triggered by the model.

What is the best way to ensure user data privacy during LLM text generation?

The best way to ensure user data privacy during LLM text generation is to run private workflows entirely on-device. This offline approach avoids cloud dependency, keeping all session data localized to the iOS hardware.