coreml

Load and run Core ML models on-device in Swift iOS apps.

1|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Borisserz/FoodTracker --skill coreml-borisserz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coreml
Source: https://github.com/Borisserz/FoodTracker/tree/main/.agents/skills/coreml
Command: npx skills add https://github.com/Borisserz/FoodTracker --skill coreml-borisserz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers need a clear, end-to-end guide to integrating Core ML models on-device in Swift-based iOS apps, including loading, configuration, prediction, and deployment considerations.

Core Features & Use Cases

  • Loading models (.mlmodel, .mlpackage, .mlmodelc) and using auto-generated classes or MLFeatureProvider for predictions.
  • Configuring compute units (CPU, GPU, Neural Engine) and profiling performance with MLComputePlan.
  • Building multi-model pipelines and Vision/Core ML integrations for on-device inference.

Quick Start

Load a Core ML model into an iOS project and run a first prediction to verify the integration.

Frequently Asked Questions about coreml

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

FAQPage Schema
How do I load and run Core ML models for on-device prediction in Swift?

To run Core ML on-device predictions in Swift, load .mlmodel, .mlpackage, or .mlmodelc formats using auto-generated classes or MLFeatureProvider. You can then configure compute units via MLModelConfiguration before executing inference directly within your iOS application.

How does MLComputePlan work for profiling Core ML model performance?

MLComputePlan analyzes Core ML model execution to profile performance by evaluating the configured compute units. It helps developers assess deployment strategies and understand inference costs before running predictions on the device's CPU, GPU, or Neural Engine.

Can I use Vision framework integration with Core ML for multi-model pipelines in iOS 14+?

Yes, you can build multi-model pipelines in iOS 14+ and Swift 6.x by integrating the Vision framework with Core ML. This combination enables efficient on-device inference workflows and image processing tasks using your deployed models.

What's the best way to configure compute units when loading an .mlpackage model in Swift?

The best way to configure compute units for an .mlpackage model is using MLModelConfiguration. This allows you to selectively target the CPU, GPU, or Neural Engine to optimize on-device inference performance based on your specific deployment requirements.

Does Core ML support both .mlmodel and .mlpackage formats for on-device inference?

Yes, Core ML supports loading .mlmodel, .mlpackage, and compiled .mlmodelc formats for on-device inference. You can execute predictions using either auto-generated Swift classes or the MLFeatureProvider interface.

Why do I need MLFeatureProvider instead of auto-generated classes for Core ML predictions?

MLFeatureProvider is needed for Core ML predictions when building dynamic multi-model pipelines or handling inputs not covered by auto-generated classes. It provides a flexible interface to manage feature inputs and outputs for on-device inference execution.