working-with-coreai

working-with-coreai is a skill for Claude Code from apple/coreai-models. It costs 91 tokens per session (2,310 once invoked), scanned A, original, BSD-3-Clause.

A guide for exporting PyTorch machine-learning models and running them on Apple devices such as iPhones, iPads, and Macs.

In plain words
What is it for?
Use it to export, compile, debug, and integrate PyTorch models with Apple’s Core AI runtime.
Why use it?
It explains the steps and relevant references for preparing models to run on Apple hardware.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the coreai-skills plugin — 3 skills shipped together

Good fit Use it to export, compile, debug, and integrate PyTorch models with Apple’s Core AI runtime.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apple/coreai-models/working-with-coreai
About the project

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.

apple/coreai-models · 2,209 stars · on GitHub

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 apple/coreai-models --skill working-with-coreai
Clone the repo
git clone --depth 1 https://github.com/apple/coreai-models

Made for: Claude Code.

Or install coreai-skills, the plugin that ships this one along with the rest of its 3 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 working-with-coreai

README.md
[![agentmods](https://agentmods.dev/badge/skills/apple/coreai-models/working-with-coreai/github.svg)](https://agentmods.dev/skills/apple/coreai-models/working-with-coreai)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for working-with-coreai

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,310 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
  • 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.00091 $0.02310
Opus 5.5 $0.00036 $0.00924
Sonnet 5.5 $0.00018 $0.00462
Haiku 4.5 $0.00009 $0.00231

Measured 24d ago against content hash 273be20d8976, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 24d 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/skills/working-with-coreai/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 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

Read the full file on GitHub · 199 lines

Files

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.

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. 24d ago Changed · -1 lines 273be20d8976
  2. 1mo ago First seen · 200 lines · 91 tokens per session scan A 2839d31ce268

Subscribe to this mod's changes

working-with-coreai is a skill published in the GitHub repository apple/coreai-models (2,209 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 91 tokens to every session and 2,310 once invoked, about $0.0004 per session on Opus 5.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.

Related

Other skills, from other repositories

ml-kit-genai-prompt-api

Analyzes Android codebases to implement ML Kit GenAI Prompt API. Use this skill to send natural language requests on-device to Gemini Nano, use structured output with Prompt API, implement prefix caching, optimize the current prompt, or apply best practices.".

android/skills · 57 tokens

litert-runtime

Configures and implements LiteRT (.tflite) on-device inference on Android in Kotlin using the CompiledModel API on CPU and GPU. Use this skill for any Android LiteRT or .tflite task, including Gradle setup, image classification or vision/audio/embedding helpers, TensorBuffer reuse, Bitmap preprocessing…

android/skills · 127 tokens

foundation-models-on-device

Apple FoundationModels framework for on-device LLM — text generation, guided generation with @Generable, tool calling, and snapshot streaming in iOS 26+.

hashgraph-online/awesome-codex-plugins · 38 tokens

axiom-ai

Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.

CharlesWiltgen/Axiom · 57 tokens

litert-lm

Creates an Android app that runs an open text LLM on the device, on the CPU or the GPU, with the LiteRT-LM Kotlin API. LiteRT-LM is the recommended replacement for the MediaPipe LLM Inference API (com.google.mediapipe:tasks-genai), which is in maintenance-only mode. Use this skill to build a new chat, summarization or…

google-ai-edge/litert-samples · 142 tokens

firebase-ai

Use when setting up firebaseai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

evanca/flutter-ai-rules · 30 tokens