apple-foundation-models

apple-foundation-models is a skill for Claude Code from markdavidgan/apple-dev-skills. It costs 101 tokens per session (1,725 once invoked), scanned A, original, MIT.

A guide to adding Apple's on-device language model to an app through the Foundation Models framework. The model can work offline and keep the input on the device, but it is intended for focused tasks rather than broad, authoritative answers.

In plain words
What is it for?
Use it for summarising, classifying, tagging, extracting structured information, rewriting text, generating short content, or routing requests on iOS 26 and macOS 26.
Why use it?
It helps developers choose suitable on-device AI tasks and handle operating-system availability and changing framework details correctly.

Skill for Claude Code

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

Part of the apple-dev-skills plugin — 62 skills, 25 commands, 7 agents shipped together

Good fit Use it for summarising, classifying, tagging, extracting structured information, rewriting text, generating short content, or routing requests on iOS 26 and macOS 26.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/markdavidgan/apple-dev-skills/apple-foundation-models
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 markdavidgan/apple-dev-skills --skill apple-foundation-models
Clone the repo
git clone --depth 1 https://github.com/markdavidgan/apple-dev-skills

Made for: Claude Code.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 62 skills, 25 commands, 7 agents.

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 apple-foundation-models

README.md
[![agentmods](https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/apple-foundation-models.svg)](https://agentmods.dev/skills/markdavidgan/apple-dev-skills/apple-foundation-models)
Your own site
<a href="https://agentmods.dev/skills/markdavidgan/apple-dev-skills/apple-foundation-models"><img src="https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/apple-foundation-models.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,725 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.
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.00101 $0.01725
Opus 5 $0.00051 $0.00863
Sonnet 5 $0.00020 $0.00345
Haiku 4.5 $0.00010 $0.00172

Measured 7d ago against content hash 6896693db669, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

apple-foundation-models 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 7d 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.

platforms/claude/skills/apple-foundation-models/SKILL.md · 182 lines

How it starts

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

Apple Foundation Models (On-Device AI)

Build private, offline, no-cost AI features on Apple's on-device foundation model (iOS 26 / macOS 26 / Apple Intelligence), via import FoundationModels. The model runs on-device: zero server cost, works offline, data never leaves the device.

Verify signatures as you go. This framework is new and evolving. Use the apple-docs MCP (check_availability for OS/version gating, get_symbol for exact API shapes, list_framework FoundationModels) before committing to a signature. The patterns below are stable; treat specific initializer/parameter names as "confirm against live docs," in the spirit of ios26-api-reference.


Right-sizing: what this model is (and isn't)

The on-device model is a small (~3B-class) language model, not a frontier chatbot.

Great at: summarization, classification, tagging, extraction, rewriting, short-form generation, structured output from unstructured text, semantic routing.

Not for: authoritative world knowledge, math/code reasoning at scale, long documents beyond the context window, anything where a confident hallucination is unacceptable. For those, call a server model — don't force the on-device model past its weight class.

If a task needs world facts, ground it: pass the facts in the prompt (retrieval), don't expect the model to know them.


1. Gate on availability — always

The model is absent on ineligible devices, when Apple Intelligence is off, or while assets download. Check before showing any AI UI.

import FoundationModels

let model = SystemLanguageModel.default

switch model.availability {
case .available:
    // show the feature
case .unavailable(let reason):
    // .deviceNotEligible, .appleIntelligenceNotEnabled, .modelNotReady — degrade gracefully
    break
}

Never assume availability. Provide a non-AI fallback path for every AI feature (older devices, EU/region/enterprise restrictions, model still downloading).


Read the full file on GitHub · 182 lines

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. 7d ago First seen · 182 lines · 101 tokens per session scan A 6896693db669

Subscribe to this mod's changes

apple-foundation-models is a skill published in the GitHub repository markdavidgan/apple-dev-skills (5 stars, last pushed 9d ago), licensed MIT. It adds 101 tokens to every session and 1,725 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-31.

Related

Other skills, from other repositories

asc-revenuecat-catalog-sync

Reconcile App Store Connect subscriptions and in-app purchases with RevenueCat products, entitlements, offerings, and packages using asc and RevenueCat MCP. Use when setting up or syncing subscription catalogs across ASC and RevenueCat.

rorkai/app-store-connect-cli-skills · 51 tokens

asc-localize-metadata

Automatically translate and sync App Store metadata (description, keywords, what's new, subtitle) to multiple languages using LLM translation and asc CLI. Use when asked to localize an app's App Store listing, translate app descriptions, or add new languages to App Store Connect.

rorkai/app-store-connect-cli-skills · 60 tokens

asc-shots-pipeline

Orchestrate iOS screenshot automation with xcodebuild/simctl for build-run, AXe for UI actions, JSON settings and plan files, Koubou-based framing (asc screenshots frame), and screenshot upload (asc screenshots upload). Use when users ask for automated screenshot capture, AXe-driven simulator flows, frame composition…

rorkai/app-store-connect-cli-skills · 79 tokens

asc-metadata-sync

Sync, validate, and apply App Store metadata with the current asc canonical metadata workflow. Use when updating metadata, localizations, keywords, or migrating legacy fastlane metadata.

rorkai/app-store-connect-cli-skills · 39 tokens

asc-release-flow

Orchestrate App Store releases with asc, including staging a version, uploading or building an artifact, publishing, and submitting for review. Use when the user wants to prepare or execute a release. Keep Game Center item preparation in this skill; route other readiness failures, stuck submissions, cancellation, and…

rorkai/app-store-connect-cli-skills · 71 tokens

asc-submission-health

Diagnose App Store submission blockers and operate review health with asc, including readiness validation, repair routing, status monitoring, cancellation, and retry decisions. Use when validation fails, a version is not in a valid state, review status is unclear or stuck, or a failed submission must be repaired and…

rorkai/app-store-connect-cli-skills · 82 tokens