# Core ML

> Core ML is an open-source agent skill for ai models and llm tooling. Guides an agent through on-device ML in Apple apps with Core ML, Vision. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/core-ml
- **Repository:** https://github.com/rshankras/claude-code-apple-skills
- **GitHub stars:** 924
- **License:** MIT
- **Skill name:** core-ml
- **Collection:** https://github.com/rshankras/claude-code-apple-skills
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an agent add machine learning to iOS and macOS apps. It covers loading and running Core ML models, choosing between Apple's built-in Vision and NaturalLanguage frameworks and a custom model, and training models with Create ML. It also includes guidance on deciding whether Core ML or Foundation Models fits a task.

The skill walks the agent through a sequence of checks before writing code: it looks at the deployment target, searches the project for existing ML code or model files, and asks which capability and performance profile the user needs. It then supplies Swift patterns for compute unit selection, async prediction, batch processing and model compilation, plus Python coremltools recipes for Float16 and Int8 quantization, palettization and pruning.

It expects an Xcode project using Swift and can read, edit and search files and run shell commands. The bundled reference files hold architecture patterns and larger Swift templates for a model manager, a Vision pipeline and camera integration.

## When your agent uses it

> Core ML, Create ML, Vision framework, Natural Language framework, on-device ML integration. Use when user wants image classification, text analysis, object detection, sound classification, model optimization, or custom model integration. Covers Core ML vs Foundation Models decision.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/rshankras/claude-code-apple-skills/tree/HEAD/skills/core-ml)
- [Asks for: Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion](https://github.com/rshankras/claude-code-apple-skills/blob/HEAD/skills/core-ml/SKILL.md)
- [License: MIT](https://github.com/rshankras/claude-code-apple-skills/tree/HEAD/skills/core-ml)

## Features

- **Core ML decision guide:** Explains when to use Core ML, Vision, NaturalLanguage or Foundation Models for a given task.
- **Model loading and prediction:** Swift patterns for loading .mlmodel or .mlpackage files and running single or batch predictions.
- **Create ML training overview:** Dataset size guidance and training approaches for image, text, sound, tabular and object detection models.
- **Vision and NaturalLanguage recipes:** Code examples for OCR, face and pose detection, sentiment, language detection and named entities.
- **Model optimization steps:** Quantization, palettization and pruning recipes using coremltools with accuracy benchmarking advice.
- **Performance tuning:** Compute unit selection, async inference and install-time model compilation for responsive apps.

## Good for

- Classify product photos on-device in an iOS app
- Add OCR text recognition to a camera feature
- Run sentiment analysis on user reviews in Swift
- Train a custom image classifier with Create ML
- Shrink a PyTorch model to Float16 for mobile use
- Detect whether to use Core ML or Foundation Models for a feature

## Install

### Claude Code

This skill ships in the `apple-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add rshankras/claude-code-apple-skills
/plugin install apple-skills@indie-apple-stack
```

Or copy only this skill to `~/.claude/skills/core-ml`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/core-ml &&
cp -R "$tmp/skills/core-ml" ~/.claude/skills/core-ml &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/core-ml` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/core-ml` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/core-ml &&
cp -R "$tmp/skills/core-ml" ~/.agents/skills/core-ml &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/core-ml` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/core-ml` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/core-ml &&
cp -R "$tmp/skills/core-ml" ~/.cursor/skills/core-ml &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/core-ml` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/rshankras/claude-code-apple-skills.git --path skills/core-ml
```

Or copy the folder to `~/.gemini/skills/core-ml` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/core-ml`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/core-ml &&
cp -R "$tmp/skills/core-ml" ~/.copilot/skills/core-ml &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/core-ml` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git
```

Then copy `claude-code-apple-skills/skills/core-ml` into your agent's skills folder as `core-ml`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which platforms and tools does Core ML need?

It targets Apple platforms and Swift projects in Xcode. Its allowed tools include Read, Write, Edit, Glob, Grep, Bash and AskUserQuestion.

### Does Core ML change existing ML code in my project?

Before generating code it searches for existing Core ML, Vision or NaturalLanguage files and asks whether to extend, replace or add to them.

### Which Core ML and Vision versions does it cover?

It notes minimum requirements such as iOS 11 for Core ML and Vision and iOS 12 for NaturalLanguage, and it recommends Foundation Models only for iOS 26 and macOS 26 targets.

### Does Core ML run any scripts?

The skill itself includes no scripts. Its optimization examples are Python coremltools snippets that a developer would run separately.

### How do I install Core ML in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/core-ml to use it in all your projects, or to .claude/skills/core-ml in one project. Or install the apple-skills plugin, which includes it: /plugin marketplace add rshankras/claude-code-apple-skills, then /plugin install apple-skills@indie-apple-stack.

### Does Core ML run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Core ML?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Core ML?

The closest alternatives to Core ML are Apple intelligence, Foundation models, Axiom AI, Axiom vision and Mac design.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Apple intelligence](https://ai-powered.com/skills/apple-intelligence): Apple intelligence is an open-source agent skill for developer tools.
- [Foundation models](https://ai-powered.com/skills/foundation-models): Foundation models is an open-source agent skill for developer tools.
- [Axiom AI](https://ai-powered.com/skills/axiom-ai-charleswiltgen-2): Axiom AI is an open-source agent skill for developer tools.
- [Axiom vision](https://ai-powered.com/skills/axiom-vision-charleswiltgen): Axiom vision is an open-source agent skill for developer tools.
- [Mac design](https://ai-powered.com/skills/mac-design): Mac design is an open-source agent skill for developer tools.
- [API AI augmented](https://ai-powered.com/skills/api-ai-augmented): API AI augmented is an open-source agent skill for ai models and llm tooling.
- [App intents](https://ai-powered.com/skills/app-intents): App intents is an open-source agent skill for developer tools.
- [Developing genkit js](https://ai-powered.com/skills/developing-genkit-js): Developing genkit js is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/core-ml
