Foundation Models On Device
Apple FoundationModels guide for on-device LLM work in iOS 26, covering @Generable output and tool calling.
- CCM score
- 75 of 100
- skills.sh installs
- 11.9K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers availability checks, single-turn and multi-turn sessions, guided generation with
@Generable, custom tool calling, and snapshot streaming - Includes SwiftUI integration for
PartiallyGeneratedstreams plus error handling forLanguageModelSession.ToolCallError - Enforces a 4,096 token limit across instructions, prompt, and output, and requires checking
model.availabilitybefore creating a session - Designed for iOS 26+ apps that need privacy-preserving, offline-capable AI features without cloud dependencies
Install
$ npx -y skills add affaan-m/ecc --skill foundation-models-on-device -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
FoundationModels: On-Device LLM (iOS 26)
Patterns for integrating Apple's on-device language model into apps using the FoundationModels framework. Covers text generation, structured output with @Generable, custom tool calling, and snapshot streaming — all running on-device for privacy and offline support.
When to Activate
- Building AI-powered features using Apple Intelligence on-device
- Generating or summarizing text without cloud dependency
- Extracting structured data from natural language input
- Implementing custom tool calling for domain-specific AI actions
- Streaming structured responses for real-time UI updates
- Need privacy-preserving AI (no data leaves the device)
Core Pattern — Availability Check
Always check model availability before creating a session:
struct GenerativeView: View {
private var model = SystemLanguageModel.default
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Mobile Apps, AI Agents & LLM Apps
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 257- Exa Search11.9K
- Swift Concurrency 6 211.9K
- Nestjs Patterns11.9K
- Data Scraper Agent11.9K
- Hexagonal Architecture11.9K
- Mcp Server Patterns11.9K
- Plankton Code Quality11.9K
- Fal Ai Media11.8K
- Visa Doc Translate11.8K
- Inventory Demand Planning11.8K
- Customs Trade Compliance11.8K
- Brand Voice11.8K
- Seo11.7K
- Kotlin Ktor Patterns11.7K
- Enterprise Agent Ops11.7K
- Quality Nonconformance11.7K
- Ralphinho Rfc Pipeline11.7K
- Crosspost11.7K
- Agent Eval11.7K
- Production Scheduling11.6K
- Videodb11.6K
- Nanoclaw Repl11.6K
- Logistics Exception Management11.6K
- Kotlin Exposed Patterns11.6K
Similar to Foundation Models On Device
More Mobile Appsapple-intelligencershankras/claude-code-apple-skills548 installsStructured catalog guide for Apple's on-device AI features covering Foundation Models, Visual Intelligence, and App Intents.
apple-on-device-aidpearson2699/swift-ios-skills4.3K installsBuild private on-device AI on Apple platforms with Foundation Models, Core ML, MLX Swift, or llama.cpp.
firebase-ai-logic-basicsfirebase/agent-skills149.7K installsOfficial Firebase skill for calling Gemini from client-side Android, iOS, Web, and Flutter apps without a backend.
open-autoglm-phone-agentreason-machines/trending-skills1.3K installsOpen-AutoGLM is an AI phone agent framework that drives Android, HarmonyOS, and iOS devices from natural language.