Local InferenceOpen SourceFreeActiveMachine-verified· intermediate · ~15 min setup

Validate an Apple Core AI export entry and skill plugin before you touch a Mac

Check a Core AI model registry entry and the agent-skill plugin manifest offline, so you know the export recipe is well-formed before spending an evening on macOS 27.

by Shilpa Mitra· verified today· v1.0.0

Run this workflow

CI-verified, 2/2 fixtures passing.

Build this with your agent

One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.

Intended Use

App builders deciding whether a model is a realistic on-device candidate before committing to the Apple toolchain. CI validates the deterministic spine with no Mac: a registry entry parses, its Hugging Face id is well-formed (org/name) and targets .aimodel, and the Claude Code plugin manifest is valid. Live HF resolution, the export, and the on-device run are fenced.

Not for

  • Any Hugging Face model, this is a curated, well-tested catalog with tested recipes, not a universal converter; run uv run coreai.model.registry --list-models to see what is actually covered
  • 2 billion iPhones, it requires macOS/iOS 27.0+ and Xcode 27.0+, so newest OS on newest hardware, not the global install base
  • Frontier-model capability, a phone has a handful of gigabytes of memory, so calibrate to small or quantized models, not Llama 70B
  • Contributing code, Apple is not accepting code PRs right now (they get closed); bug and model-request issues are open

The Stack

Tested Against

github.com/apple/coreai-models (2026-06)node@20

Side effects & data flow

Network
none, local only
Writes
./registry.json, ./marketplace.json
Credentials
none required

Prerequisites

  • For the fenced steps only: a Mac on macOS 27 + Xcode 27, plus uv (brew install uv)

Steps

  1. 1

    Validate the registry entry and the plugin manifest

    Before installing anything, check that the model registry entry is well-formed (a real org/name Hugging Face id targeting .aimodel) and that the agent-skill plugin manifest parses with a named plugin. CI does this offline. Resolving the id live and exporting need the Apple toolchain and are fenced.

    cat > registry.json <<'JSON'
    {
      "models": [
        {
          "id": "llama-3.2-1b-instruct",
          "hf_repo": "meta-llama/Llama-3.2-1B-Instruct",
          "format": ".aimodel",
          "recipe": "models/llama-3.2-1b/export.py"
        }
      ]
    }
    JSON
    cat > marketplace.json <<'JSON'
    {
      "name": "coreai-models",
      "owner": "apple",
      "plugins": [
        {
          "name": "coreai-skills",
          "source": "./",
          "description": "Skills that teach a coding agent to use Core AI"
        }
      ]
    }
    JSON
    node -e '
    const fs = require("fs");
    function bad(m) { console.error("BAD: " + m); process.exit(1); }
    const reg = JSON.parse(fs.readFileSync("registry.json", "utf8"));
    const models = reg.models || [];
    if (!models.length) bad("registry has no models");
    for (const m of models) {
      if (!m.id) bad("a model entry has no id");
      const repo = m.hf_repo || "";
      const parts = repo.split("/");
      if (parts.length !== 2 || !parts[0] || !parts[1] || repo.indexOf(" ") !== -1) bad("hf_repo is not a well-formed org/name id: " + m.id);
      if (m.format !== ".aimodel") bad("model " + m.id + " does not target .aimodel");
    }
    const mk = JSON.parse(fs.readFileSync("marketplace.json", "utf8"));
    if (!mk.name) bad("plugin manifest missing name");
    const plugins = mk.plugins || [];
    if (!plugins.length || !plugins[0].name) bad("plugin manifest has no named plugin");
    console.log("config OK: " + models.length + " registry model(s), hf ids well-formed, .aimodel target; plugin manifest " + mk.name + " exposes " + plugins[0].name);
    '
  2. 2

    Export and run on a Mac (the model step, not checked by CI)

    On macOS 27 with Xcode 27: install the plugin (/plugin marketplace add then /plugin install coreai-skills@coreai-models), run uv run coreai.model.registry --list-models, pick a small supported model, and walk the working-with-coreai skill to export a .aimodel and run it on-device. All fenced, it needs Apple silicon and the Core AI runtime.

Eval, 2 fixtures

Last passed: verified today
  • spine-okcontainstimeout 30s · max $0

    Expected: config OK: 1 registry model(s), hf ids well-formed, .aimodel target; plugin manifest coreai-models exposes coreai-skills

  • clean-exitexit_codetimeout 30s · max $0

    Expected: 0

Results

apple/coreai-models is Apple's official, end-to-end path from a Hugging Face model to a private, offline .aimodel feature in an iOS or macOS app: export recipes, Python authoring primitives, a Swift runtime, and agent skills. The real win is zero-cloud private inference. The real limit is that on-device means small or heavily quantized models, which is why a whole bundled skill is about compression.

Did this work for you?

Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.

Related workflows

Liked this workflow?

Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).