Designs private on-device AI for Apple platforms using Foundation Models, Core ML, MLX Swift, or llama.cpp. Helps select local LLM runtimes, handle model conversion/compression, and route Core ML prediction code.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Architect and deploy private on-device machine learning and LLMs on Apple Silicon. Covers framework selection between Apple Foundation Models, Core ML, MLX Swift, and llama.cpp, plus model optimization and quantization.
Scope Boundary: Swift-side Core ML inference and model caching live in
coreml. This skill owns backend selection, architecture, model conversion, and LLM runtimes.
| Framework | Best For | Pros | Constraints |
|---|---|---|---|
Apple Foundation Models (iOS 26+; iOS 27 adds images, Private Cloud Compute, custom LanguageModel) | Text generation, structured output, tool calling | Zero app download footprint, native system UI integration | Requires Apple Intelligence eligible device |
| Core AI (iOS 27+) | Running your own models in Swift; LLMs through a Foundation Models session | Memory-safe Swift API, specialization cache, Neural Engine/GPU/CPU selection | iOS 27 only; background Neural Engine needs an entitlement |
| Core ML | Computer vision, audio, classification, custom transformer models | Best Neural Engine offload, lowest power consumption | Fixed compute graph; slower autoregressive text generation |
| MLX Swift | Custom open-weights LLMs/VLMs (Llama, Mistral, Gemma) | Full control over model architecture and generation parameters | Consumes user storage and unified RAM (high memory pressure) |
| llama.cpp | Cross-platform C++ runtime, CPU fallback | Broadest quantization support (GGUF), battle-tested | Higher power usage than Neural Engine pipelines |
Leverage system-provided generative models on iOS 26+ without bundling model weights:
import FoundationModels
let session = LanguageModelSession()
let response = try await session.respond(to: "Summarize today's highlights in 3 bullet points.")
print(response.text)
Use @Generable to extract structured data directly from model prompts.
iOS 27 keeps the same LanguageModelSession API but lets you swap the model: SystemLanguageModel, PrivateCloudComputeLanguageModel (server model, managed entitlement, quota), CoreAILanguageModel (your own exported weights), or any custom LanguageModel. It also adds image Attachment prompts and DynamicProfile for switching model, tools, and instructions mid-session. Gate with #available(iOS 27, *). Details: Foundation Models in iOS 27.
Convert PyTorch and Hugging Face models using Python coremltools:
import coremltools as ct
import torch
model = MyPyTorchModel().eval()
traced = torch.jit.trace(model, torch.randn(1, 3, 224, 224))
mlmodel = ct.convert(
traced,
inputs=[ct.TensorType(name="input", shape=(1, 3, 224, 224))],
compute_units=ct.ComputeUnit.ALL
)
mlmodel.save("Model.mlpackage")
Run open-source LLMs leveraging Apple Silicon unified memory:
import MLXLLM
let model = try await LLMModelFactory.shared.load(modelName: "mlx-community/Llama-3.2-3B-Instruct-4bit")
let output = try await model.generate(prompt: "Explain relativity in simple terms.")
coremltools.optimize.coreml to reduce memory bandwidth bottlenecks.#available(iOS 27, *) and keep the iOS 26 path.MLComputePlan or Instruments@Generable, tool calling, prompt designLanguageModel protocol, Private Cloud Compute, multimodal, Dynamic Profiles, Core AI in a sessionevals/evals.json (opens in a new tab)references/core-ai.md (opens in a new tab)references/coreml-conversion.md (opens in a new tab)references/coreml-optimization.md (opens in a new tab)references/foundation-models-ios27.md (opens in a new tab)references/foundation-models.md (opens in a new tab)references/mlx-swift.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/all-ios-skills:apple-on-device-aifrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skills95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.Other plugins' skills for the same job