A collection of Agent Skills for building iOS/macOS applications with Apple's Foundation Models framework (Apple Intelligence). These skills are designed for zero-friction AI-assisted development with on-device models.
Skills follow the Agent Skills format.
This project is directly inspired by:
- Foundation-Models-Framework-Example by @rudrankriyam — a comprehensive example project for Apple's Foundation Models framework
- Apple Foundation Models documentation — the official Apple developer reference
- apple-foundation-models-setup-availability - Check model availability and set up Foundation Models
- apple-foundation-models-session-patterns - Create sessions for single-turn and multi-turn conversations
- apple-foundation-models-streaming-chat-context - Stream responses and manage context window
- apple-foundation-models-token-budget-management - Count tokens and manage context budgets
- apple-foundation-models-structured-generation - Generate type-safe Swift structs with @Generable
- apple-foundation-models-dynamic-schemas - Build schemas dynamically at runtime
- apple-foundation-models-custom-tools - Build custom tools the model can call
- apple-foundation-models-system-tools - Use built-in system tools (weather, contacts, calendar)
- apple-foundation-models-health-assistant - HealthKit integration with custom tools
- apple-foundation-models-conversation-context-builder - Extract context and build continuation prompts
- apple-foundation-models-swiftdata-persistence - Persist conversations with SwiftData
- apple-foundation-models-error-recovery - Handle context overflow, refusals, rate limits
- apple-foundation-models-generation-tuning - Tune temperature, sampling, seeds, token limits
- apple-foundation-models-voice-assistant - Speech recognition and TTS integration
- apple-foundation-models-multilingual - Handle multiple languages
- apple-foundation-models-rag-pipeline - Retrieval-augmented generation with document indexing
- apple-foundation-models-app-patterns - MVVM architecture patterns
- apple-foundation-models-ui-design-system - Reusable UI components
- apple-foundation-models-siri-shortcuts-integration - Siri Shortcuts and App Intents
- apple-foundation-models-feedback-sentiment-api - Collect user feedback per response
- apple-foundation-models-playground-learning - Runnable learning examples
- apple-foundation-models-prompt-builder-patterns - @PromptBuilder composition patterns
npx skills add sambitcreate/Swift-Foundation-Models-SkillsThis installs all 22 skills to your local agent directories and works with 40+ AI coding agents (Claude Code, Cursor, Codex, Windsurf, and more).
Clone the repository and run the installer:
git clone https://github.com/sambitcreate/Swift-Foundation-Models-Skills.git
cd Swift-Foundation-Models-Skills
node bin/cli.jsThis copies all skills to:
~/.claude/skills/(Claude Code)~/.agents/skills/(OpenAI Agents / OpenAI Codex)
Skills are automatically available once installed. The agent will use them when relevant tasks are detected.
All skills support the "afm" trigger keyword:
"Use the apple-foundation-models-session-patterns skill"
"Use afm session-patterns"
"Use the afm structured-generation skill"
Examples:
Set up Foundation Models in my iOS app and check device availability
Create a streaming chat interface with context management
Build a custom tool that searches my app's database
Add SwiftData persistence for conversation history
Each skill contains:
skills/
└── apple-foundation-models-xxx/
├── SKILL.md - Instructions for the agent
├── agents/
│ └── openai.yaml - OpenAI agent configuration
└── references/
└── guide.md - Code examples and implementation details
- iOS/macOS: 26.0+
- Device: Apple Silicon with Apple Intelligence enabled
- Framework:
import FoundationModels
MIT