coreml — Claude Code skill for Core ML integration
This skill guides Swift integration of Core ML in iOS apps, from loading models to running predictions and choosing compute units.
npx skills add dpearson2699/swift-ios-skills --skill coreml -a claude-codeWhat coreml 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.
What it helps with
- 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 for the agent
- Add a
.mlpackagemodel to my iOS app and load it asynchronously. - Configure
MLModelConfigurationto use the Neural Engine. - Review batch predictions for an array of images with Core ML.
How to install coreml
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill coreml -a claude-code2Manually: put the files in place
~/.claude/skills/coreml/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/coreml/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill coreml -a codex2Manually: put the files in place
.agents/skills/coreml/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill coreml -a cursor2Manually: put the files in place
.cursor/skills/coreml/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills coreml2Manually: put the files in place
.github/skills/coreml/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill coreml -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/coremlManually: put the files in place
.devin/skills/coreml/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill coreml -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about coreml
How do I install coreml in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill coreml -a claude-code. The skill file is placed at ~/.claude/skills/coreml/SKILL.md.
What does the coreml skill do?
It guides Swift integration of Core ML in iOS apps, including model loading, inference, and compute-unit configuration.
Should I cache a model compiled at runtime?
Yes. The skill says to keep the compiled model so the app does not compile it again at every launch.