Loading...
Loading...
Use when implementing on-device AI with Apple's Foundation Models framework (iOS 26+), building summarization/extraction/classification features, or using @Generable for type-safe structured output.
npx skill4agent add johnrogers/claude-swift-engineering foundation-models| Reference | Load When |
|---|---|
| Getting Started | Setting up LanguageModelSession, checking availability, basic prompts |
| Structured Output | Using |
| Tool Calling | Integrating external data (weather, contacts, MapKit) via Tool protocol |
| Streaming | AsyncSequence for progressive UI updates, PartiallyGenerated types |
| Troubleshooting | Context overflow, guardrails, errors, anti-patterns |
SystemLanguageModel.default.availabilityLanguageModelSession| Use Case | Foundation Models? | Alternative |
|---|---|---|
| Summarization | Yes | - |
| Extraction (key info) | Yes | - |
| Classification | Yes | - |
| Content tagging | Yes (built-in adapter) | - |
| World knowledge | No | ChatGPT, Claude, Gemini |
| Complex reasoning | No | Server LLMs |
Task { }SystemLanguageModel.default.availability