Apple Foundation Models
Integrates Apple's on-device Foundation Models framework to build private, offline AI and LLM features in Swift.
The Apple Foundation Models skill equips Claude Code with comprehensive implementation knowledge for Apple's native on-device AI framework across iOS, iPadOS, macOS, and visionOS. It guides developers through initializing SystemLanguageModel, managing interactive LanguageModelSession lifecycles, and creating structured outputs with Generable schemas. Additionally, it streamlines tool calling, prompt construction with PromptBuilder, and safety guardrail enforcement for building fully offline, privacy-centric AI experiences in native Swift applications.
Key Features
01Integrates custom tool and function calling using the Tool protocol
02Implements structured guided generation conforming to Swift Generable schemas
03Structures dynamic prompts and system instructions with PromptBuilder
04Configures and manages SystemLanguageModel and LanguageModelSession on Apple platforms
05Applies safety guardrails, localization handling, and streamResponse patterns
061 GitHub stars
Use Cases
01Generating type-safe, structured Swift models directly from prompts with Generable
02Building offline conversational assistants with custom tool execution and instructions
03Optimizing on-device LLM latency using model prewarming and streaming responses