coreml

Integrate Core ML models into iOS apps for on-device inference.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill coreml-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coreml
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-ios-skills/skills/coreml
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill coreml-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers integrate and optimize Core ML models in iOS apps so they can load models efficiently, run reliable predictions, and tune compute performance without fragile boilerplate.

Core Features & Use Cases

  • Model loading & deployment: Load .mlmodelc/.mlpackage, support async loading and runtime compilation, and choose practical deployment strategies (bundle vs on-demand resources).
  • Prediction workflows: Run predictions using auto-generated typed classes or dynamic MLFeatureProvider, including async and batch inference patterns.
  • Performance and correctness tooling: Configure MLModelConfiguration compute units (CPU/GPU/Neural Engine), use MLComputePlan for per-operation device dispatch insight, and handle memory lifecycle safely.
  • Data & preprocessing: Convert images to CVPixelBuffer, work with MLMultiArray, and use MLTensor (iOS 18+) for modern preprocessing pipelines.
  • Vision integration: Use Vision (CoreMLRequest iOS 18+ or VNCoreMLRequest) to get correct image preprocessing and run image models end-to-end.

Quick Start

Use the coreml skill to integrate Core ML inference into an iOS app by loading a compiled model asynchronously, configuring compute units, and running predictions from a CVPixelBuffer input.

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 a Core ML model asynchronously in iOS?

To load and run Core ML models asynchronously, use Swift Core ML APIs to load compiled `.mlmodelc` or `.mlpackage` files and execute predictions via typed auto-generated classes or MLFeatureProvider. This supports async, batch, and stateful workflows for reliable on-device inference.

What is the best way to configure Core ML compute units for CPU, GPU, or Neural Engine?

Configure Core ML compute units by setting options in MLModelConfiguration to target the CPU, GPU, or Neural Engine. You can use MLComputePlan for per-operation device dispatch profiling to optimize on-device machine learning performance and memory lifecycle.

How do I preprocess images for Core ML predictions using Vision integration?

Use Vision integration with VNCoreMLRequest or CoreMLRequest (iOS 18+) to handle image preprocessing end-to-end. This ensures correct data conversion from images to CVPixelBuffer before running predictions through your Core ML model.

Can I use MLTensor and MLMultiArray for advanced data handling in iOS 18?

Yes, you can use MLTensor (iOS 18+) for modern preprocessing pipelines and MLMultiArray for advanced tensor data handling. These Swift Core ML APIs support dynamic MLFeatureProvider inputs and stateful workflows for complex on-device inference.

Does on-device machine learning inference support runtime model compilation and on-demand resources?

On-device machine learning inference supports runtime compilation and practical deployment strategies including bundled models and on-demand resources. Async loading allows flexible integration of Core ML models into iOS applications without fragile boilerplate.