foundation-models

Integrate on-device LLM text generation and tool calling via Apple's Foundation Models framework.

603|51|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill foundation-models-rshankras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models
Source: https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/apple-intelligence/foundation-models
Command: npx skills add https://github.com/rshankras/claude-code-apple-skills --skill foundation-models-rshankras

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables developers to integrate powerful on-device Large Language Models (LLMs) directly into their applications, offering privacy-preserving AI features without relying on external servers.

Core Features & Use Cases

  • On-Device LLM Integration: Leverage Apple's Foundation Models framework for text generation, structured data extraction, and tool calling directly on the user's device.
  • Privacy-Preserving AI: Process sensitive data locally, enhancing user privacy and security.
  • Use Case: Build an intelligent assistant within your app that can summarize user-provided text, answer questions based on local data, or even call custom tools to perform actions, all while keeping the data on the device.

Quick Start

Use the foundation-models skill to generate a recipe suggestion for a quick pasta dish.

Frequently Asked Questions about foundation-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate on-device LLM capabilities into my SwiftUI app?

On-device LLM integration is achieved by using Apple's Foundation Models framework to facilitate local text generation, structured data output, and tool calling directly within your SwiftUI application.

What's the best way to generate structured data from a local language model?

Generating structured data from a local language model is handled by using @Generable types within the Foundation Models framework to parse and extract structured output directly on the user's device.

Does the Foundation Models framework support multi-turn conversations with context management?

Yes, multi-turn conversations are supported by the Foundation Models framework, which provides built-in context management to maintain state and history for continuous AI-driven interactions on-device.

Can I process sensitive user data locally for generative AI without relying on external servers?

Processing sensitive user data locally is fully supported, as the Foundation Models framework runs generative AI operations completely on-device, preserving user privacy without requiring external server calls.

How do I implement dynamic tool calling for an on-device AI assistant?

Dynamic tool calling for an on-device AI assistant is implemented through the Foundation Models framework, enabling the local LLM to trigger custom app functions and perform actions based on user requests.