foundation-models

Enable offline AI summarization, extraction, and classification on Apple devices.

223|21|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/johnrogers/claude-swift-engineering --skill foundation-models-johnrogers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: foundation-models
Source: https://github.com/johnrogers/claude-swift-engineering/tree/main/plugins/swift-engineering/skills/foundation-models
Command: npx skills add https://github.com/johnrogers/claude-swift-engineering --skill foundation-models-johnrogers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Running advanced NLP tasks like summarization, extraction, and classification entirely offline on Apple devices, preserving privacy and reducing latency.

Core Features & Use Cases

  • On-device NLP: perform summarization, extraction, and classification without network access.
  • Deterministic outputs with @Generable for typed, structured results in Swift.
  • Streaming-ready workflows for progressive feedback and batch processing.

Quick Start

Run a local Foundation Models workflow to summarize a given text without network access.

Frequently Asked Questions about foundation-models

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

FAQPage Schema
How do I run on-device text summarization in Swift without network access?

On-device summarization in Swift uses Foundation Models APIs with a LanguageModelSession to process text offline. You apply the @Generable output pattern to receive typed, deterministic results without any network connection.

What is the @Generable pattern in Foundation Models for structured data extraction?

The @Generable pattern structures extracted data into typed Swift properties for deterministic results. It maps language model outputs directly into defined Swift types for reliable offline extraction and classification.

Does Foundation Models support iOS 26 on-device AI workflows for privacy-preserving NLP?

Foundation Models supports iOS 26+ and macOS 26+ for privacy-preserving on-device AI workflows. It runs summarization, extraction, and classification tasks entirely offline to protect user data.

Can I use Foundation Models for offline text classification on macOS 26?

You can use Foundation Models for offline text classification on macOS 26+ through a LanguageModelSession. The @Generable output pattern ensures classification results are typed and deterministic.

What are the limitations of on-device AI with Foundation Models for offline workflows?

On-device AI with Foundation Models requires iOS 26+ or macOS 26+ and relies entirely on local device hardware. Offline workflows are constrained by device capacity for summarization, extraction, and classification tasks.