core-ml

core-ml is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 54 tokens per session (3,514 once invoked), scanned A, original, MIT.

A guide to adding machine learning to Apple-platform apps using Core ML, Vision, Natural Language, and Create ML. Core ML runs trained models in an app, while the other frameworks handle tasks such as image and text analysis.

In plain words
What is it for?
Use it for image classification, object or sound detection, text processing, camera analysis, custom model training, and model optimization.
Why use it?
It helps you choose the right Apple framework, connect a model to an Xcode project, and prepare models to run on a device.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

not rated 710repo +15 1mo ago A scan Socket: passSnyk: warnSkillSpector: pass 54 tokens original MIT

Good fit Use it for image classification, object or sound detection, text processing, camera analysis, custom model training, and model optimization.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/core-ml
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rshankras/claude-code-apple-skills --skill core-ml
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for core-ml

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/core-ml.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/core-ml)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/core-ml"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/core-ml.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk warn 27 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.03514
Opus 5 $0.00027 $0.01757
Sonnet 5 $0.00011 $0.00703
Haiku 4.5 $0.00005 $0.00351

Measured 8d ago against content hash d12d9afd65b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

core-ml scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/core-ml/SKILL.md · 406 lines

How it starts

The opening of the file, as written. The whole thing — 406 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Core ML Skills

Combined advisory, generator, and workflow skill for integrating machine learning into Apple platform apps. Covers Core ML model integration, Vision framework image analysis, NaturalLanguage framework text processing, Create ML training, and on-device model optimization.

When This Skill Activates

Use this skill when the user:

  • Wants to add ML capabilities to their app
  • Needs to integrate a Core ML model (.mlmodel) into an Xcode project
  • Wants to use the Vision framework for image analysis (faces, text recognition, body pose, object detection)
  • Wants to use the NaturalLanguage framework for text processing (sentiment, entities, language detection)
  • Needs to train a custom model with Create ML
  • Wants to optimize a model for on-device use (quantization, pruning, palettization)
  • Needs to choose between Core ML and Foundation Models (Apple Intelligence)
  • Asks about image classification, object detection, sound classification, or tabular data prediction
  • Wants real-time camera + ML processing

Decision Guide: Core ML vs Foundation Models

Before generating code, determine which framework is appropriate.

Use Foundation Models (Apple Intelligence) When:

  • You need general-purpose text generation, summarization, or conversational AI
  • Target is iOS 26+ / macOS 26+ (Foundation Models requires Apple Silicon + latest OS)
  • The task is open-ended language understanding or generation
  • You want @Generable structured output from natural language
  • See apple-intelligence/foundation-models/ skill for implementation

Use Core ML When:

  • You need specialized ML: image classification, object detection, sound classification, custom regression/classification
  • You have a trained model (.mlmodel, .mlpackage) or plan to train one
  • You need broad device support (iOS 14+ / macOS 11+)
  • The task requires domain-specific predictions (medical imaging, product recognition, custom NLP)
  • Performance-critical inference on Neural Engine or GPU

Use Vision Framework When (No Custom Model Needed):

  • Image classification using Apple's built-in models
  • Face detection and facial landmark analysis
  • Text recognition (OCR) with VNRecognizeTextRequest
  • Body and hand pose detection
  • Barcode and QR code scanning
  • Image similarity and saliency detection
  • Horizon detection, rectangle detection

Read the full file on GitHub · 406 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 406 lines · 54 tokens per session scan A d12d9afd65b3

Subscribe to this mod's changes

core-ml is a skill published in the GitHub repository rshankras/claude-code-apple-skills (710 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 3,514 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.