Core AI Models is a toolkit for exporting AI models, creating model components in Python, and running exported models in macOS and iOS apps through Swift utilities. It is for developers building on-device AI applications with Core AI. Its catalogue skills and plugin help coding agents work with the model export and runtime tooling.
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.
npx agentmods add skills/apple/coreai-models/working-with-coreainpx skills add apple/coreai-models --skill working-with-coreaigit clone --depth 1 https://github.com/apple/coreai-modelsWrote 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.
[](https://agentmods.dev/skills/apple/coreai-models/working-with-coreai)<a href="https://agentmods.dev/skills/apple/coreai-models/working-with-coreai"><img src="https://agentmods.dev/badge/skills/apple/coreai-models/working-with-coreai.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.02313 |
| Opus 5 | $0.00046 | $0.01156 |
| Sonnet 5 | $0.00018 | $0.00463 |
| Haiku 4.5 | $0.00009 | $0.00231 |
Grade A, and why
working-with-coreai 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working with Core AI
Deploy PyTorch models on Apple silicon: export with coreai-torch, compile with coreai-build, run with the Core AI runtime (Swift or Python).
Related skills: Skill("coreai-skills:model-authoring") (Neural Engine and GPU authoring patterns, use when re-structuring model architecture) | Skill("coreai-skills:model-compression-exploration") (quantization/palettization sweeps — use when exploring compression tradeoffs)
Documentation and reference material
The Core AI toolchain has extensive documentation. Use these as reference — do not read all pages upfront. Instead, consult the relevant docs when you need specifics about a particular step.
| Resource | What it covers | When to consult |
|---|---|---|
| coreai-torch | TorchConverter API, externalization, composite ops, custom lowerings, Metal kernels, debugging | Export questions, API details, custom op registration |
| CoreAI framework | AIModel, InferenceFunction, NDArray, specialization, caching | Swift runtime API, on-device integration |
| coreai-build (AOT compilation) | Ahead-of-time compilation flags and options | Compilation questions |
| coreai Python API | Python runtime: AIModel, InferenceFunction, NDArray, state management | Python runtime questions |
| coreai-models repo | Export recipes, Swift runtime utilities, reusable primitives | Export patterns, running models, reference implementations |
guidance.md |
Platform and general guidance: use cases, model sizing, compression strategy | Resolving decisions around platform targeting, model sizing, and compression strategy |
What ships with it
1 file 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.
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.
- 6d ago First seen · 200 lines · 91 tokens per session scan A 2839d31ce268
working-with-coreai is a skill published in the GitHub repository apple/coreai-models (2,053 stars, last pushed today), licensed BSD-3-Clause. It adds 91 tokens to every session and 2,313 once invoked, about $0.0005 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.
Other skills, from other repositories
firebase-ai
Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.
frontend-a11y
Accessibility patterns for React and Next.js — semantic HTML, ARIA attributes, form labeling, keyboard navigation, focus management, and screen reader support. Use when building any interactive UI component or form.
maui-essentials-ai
Adopt Microsoft.Maui.Essentials.AI for local/on-device MAUI AI. USE FOR: Apple Intelligence chat, IChatClient, iOS/macOS/Mac Catalyst 26+ checks, fallback UI, NLEmbeddingGenerator, local tool invocation, privacy/offline UX. DO NOT USE FOR: source-generated tools, cloud-only AI, UI debugging.
foundation-models
On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling.
visual-intelligence
Integrate your app with iOS Visual Intelligence for camera-based search and object recognition. Use when adding visual search capabilities.
core-ml
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.