# coreml

This skill guides Swift integration of Core ML in iOS apps, from loading models to running predictions and choosing compute units.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3700 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/coreml/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/coreml

## What it does

The skill covers the Swift side of Core ML: loading `.mlmodel`, `.mlpackage`, and `.mlmodelc` files, then making predictions with Xcode-generated classes or `MLFeatureProvider`. It also discusses batch inference, `MLTensor`, Vision integration, and configuration for CPU, GPU, and Neural Engine.

Use it when building an iOS model pipeline or investigating inference performance. For large models, the guidance favors asynchronous loading. Models compiled at runtime should be cached, since compiling them again at every launch is a bug. Python-side conversion and model optimization belong to a separate skill, so this one focuses on app integration.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill coreml -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/coreml/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/coreml/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill coreml -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/coreml/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill coreml -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/coreml/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills coreml
```

2. **Manually: put the files in place**
- File: `.github/skills/coreml/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill coreml -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/coreml
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/coreml/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill coreml -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/coreml/SKILL.md

## When to use it
- load a Core ML model in an iOS app
- run predictions with generated model classes
- pass dynamic inputs through `MLFeatureProvider`
- choose CPU, GPU, or Neural Engine compute units
- process multiple inputs in a batch

## Example prompts
- Add a `.mlpackage` model to my iOS app and load it asynchronously.
- Configure `MLModelConfiguration` to use the Neural Engine.
- Review batch predictions for an array of images with Core ML.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
