foundation-models

Installation
SKILL.md

FoundationModels — On-Device LLM

Apple's framework for on-device generative AI. No cloud, no API keys, full privacy.

Critical Constraints

  • ❌ DO NOT use response.output → ✅ Use response.content to access generated values
  • ❌ DO NOT skip availability check → ✅ Always check SystemLanguageModel.default.availability first
  • ❌ DO NOT exceed 4,096 tokens per session → ✅ Break large tasks into multiple sessions
  • ❌ DO NOT send concurrent requests on same session → ✅ Check session.isResponding first
  • ❌ DO NOT confuse with OpenAI/Anthropic APIs → ✅ This is Apple's native framework, different API surface

Availability Check (Required)

import FoundationModels

let model = SystemLanguageModel.default
Related skills

More from makgunay/claude-swift-skills

Installs
8
First Seen
Feb 14, 2026