Integrates Apple’s on-device FoundationModels framework for privacy-focused, offline-capable AI features in iOS apps.
This skill provides comprehensive patterns and best practices for leveraging Apple's native FoundationModels framework (iOS 26+) within Claude Code. It guides developers through implementing on-device text generation, structured data extraction using the @Generable macro, custom tool calling for domain-specific tasks, and snapshot-based streaming for responsive UIs. By focusing on Apple Intelligence capabilities, it ensures high privacy standards and offline functionality while handling model availability checks and context window constraints efficiently.
Key Features
01Structured output generation with type-safe @Generable macros and @Guide constraints
02Custom Tool calling implementation for domain-specific AI logic and data retrieval
03Snapshot streaming for real-time UI updates with partially generated data
04Comprehensive availability checks for Apple Intelligence device eligibility and model states
051 GitHub stars
06On-device text generation and multi-turn conversations via LanguageModelSession
Use Cases
01Implementing offline-capable AI assistants that don't rely on cloud API connectivity
02Extracting structured information like calendar events or user profiles from natural language
03Building privacy-first AI applications that process sensitive data entirely on-device