ios-ai

Route Foundation Models and on-device AI tasks with LanguageModelSession and @Generable.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill ios-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ios-ai
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/ios-ai
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill ios-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates guidance for implementing Apple Intelligence and Foundation Models on iOS, including on-device AI, LanguageModelSession, @Generable, and tool protocol patterns. It helps with debugging AI generation issues and iOS 26 on-device AI integration.

Core Features & Use Cases

  • Routing patterns for Foundation Models work, API references, and diagnostics
  • LanguageModelSession basics and on-device AI
  • @Generable structured output and Tool protocol usage
  • Streaming generation and dynamic schemas
  • Debugging AI generation issues across devices

Quick Start

Use the ios-ai skill to implement an Apple Intelligence feature locally, for example: "Set up a LanguageModelSession to run a Foundation Model locally and enable @Generable structured output."

Frequently Asked Questions about ios-ai

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

FAQPage Schema
How do I implement Foundation Models and on-device AI on iOS?

Foundation Models on iOS run locally via LanguageModelSession, which executes on-device AI without server calls. Set up a LanguageModelSession to initialize a model, then use @Generable for structured output and the Tool protocol to route specific tasks, enabling streaming generation and dynamic schema evolution.

What is @Generable and how do I use it for structured output?

@Generable is an annotation for declaring structured output schemas in Foundation Models on iOS. Apply @Generable to your data model, pass it to LanguageModelSession, and the model returns type-safe JSON matching your schema, eliminating manual parsing and validation.

How do I debug AI generation issues on iOS devices?

Debug AI generation by routing Foundation Models work through decision-tree logic that categorizes failures into diagnostic buckets—schema mismatches, streaming interrupts, or device constraints. Use dedicated endpoints and API references to trace where generation fails, then adjust LanguageModelSession parameters or schema definitions.

Can I use the Tool protocol with Foundation Models on iOS?

Yes. The Tool protocol integrates with Foundation Models via LanguageModelSession, allowing you to define tool functions that the model calls during generation. Tools receive structured input from @Generable schemas and return results that the model uses to refine outputs.

What's the difference between streaming and non-streaming generation in on-device AI?

Streaming generation outputs tokens incrementally as the model produces them, reducing perceived latency and enabling cancellation. Non-streaming waits for the complete response. LanguageModelSession supports both; choose streaming for interactive UI and non-streaming when you need the full result before proceeding.

Do I need iOS 26 or later to run Foundation Models locally?

iOS 26 on-device AI capabilities require iOS 26 or later. Earlier versions may support LanguageModelSession with server-backed models, but local Foundation Models execution and dynamic schema evolution are iOS 26 features.