/app:local-ai-modelsfrom app
Guides iOS on-device AI with Foundation Models and MLX Swift: framework selection, compatibility gates, session/streaming patterns, memory awareness, and device-proof verification plans.
Ships in app. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
On-device AI in iOS apps with Apple's Foundation Models framework and MLX Swift.
SystemLanguageModel.default.availability before you create a session, and show a fallback UI for each unavailable state: .modelNotReady (for example, a download in progress), .appleIntelligenceNotEnabled (disabled in Settings), and .deviceNotEligible (hardware cannot run the model).isResponding is true, reject or queue the new send; never call the session, so GenerationError.concurrentRequests never occurs in normal use. Stop and teardown cancel the owned task and await it before a new send starts. Check Task.checkCancellation() while consuming the stream. Commit a transcript turn only when the response completes (principle-separate-before-serializing-shared-state).LanguageModelSession across completed turns; keep partial streaming text separate from committed history.@Observable owner the load state, the loaded model, and generation. For a multi-gigabyte download: ask for consent, default to Wi-Fi, make it resumable, and keep the feature in an explicit "not downloaded" state until the files are complete.principle-prove-it-works).supportsLocale(_:) for each user locale. Treat an unsupported locale as an unavailable state; never work around it with a prompt instruction such as "answer in ". For a supported locale, put the locale in the session instructions, not in each prompt. Test each locale branch on a physical device set to that locale.@Generable type and call respond(to:generating:); never parse free text with regular expressions. For an app action the model needs, implement the Foundation Models Tool protocol with @Generable arguments and pass the tool when you create the session. The session invokes the tool; the view never calls the service on the model's behalf. A tool error surfaces from the session call as LanguageModelSession.ToolCallError: catch it and show the user a normal failure state, never a crash or an empty result.| Topic | Guide |
|---|---|
| Framework comparison and selection | framework-selection.md |
| Topic | Guide |
|---|---|
| Setup and configuration | foundation-models/setup.md |
| Chat patterns and conversations | foundation-models/chat-patterns.md |
| Topic | Guide |
|---|---|
| Setup and configuration | mlx-swift/setup.md |
| Chat patterns with custom models | mlx-swift/chat-patterns.md |
| Vision Language Models (VLMs) | mlx-swift/vision-patterns.md |
| Tool calling, embeddings, structured gen | mlx-swift/advanced-patterns.md |
| Model quantization with MLX-LM | mlx-swift/quantization.md |
| Topic | Guide |
|---|---|
| Best practices and optimization | shared/best-practices.md |
| Error handling and recovery | shared/error-handling.md |
| Testing strategies | shared/testing.md |
Is Foundation Models available on every OS version and device the feature
must support (iOS 26 or later, Apple Intelligence-capable hardware)?
├── No → Can a suitable MLX model meet the same device floor?
│ ├── Yes → MLX Swift (prove memory, latency, and output on that floor)
│ └── No → The requirements are infeasible; change the support contract
└── Yes → Do you need VLMs, image generation, or custom models?
├── Yes → MLX Swift (references/mlx-swift/)
└── No → Foundation Models (references/foundation-models/)
New to on-device AI?
└── Start with Foundation Models:
1. Read framework-selection.md
2. Follow foundation-models/setup.md
3. Implement foundation-models/chat-patterns.md
Need advanced features?
└── Use MLX Swift:
1. Read framework-selection.md
2. Follow mlx-swift/setup.md
3. Choose pattern:
- Chat: mlx-swift/chat-patterns.md
- Vision: mlx-swift/vision-patterns.md
- Advanced: mlx-swift/advanced-patterns.md
Is this model shared across features?
├── Yes → Create @Observable service in app/services/
└── No → Is it feature-specific?
├── Yes → Create @Observable class in feature/
└── No → Load inline with @State (simple cases only)
Foundation Models:
└── Reuse LanguageModelSession for context
(references/foundation-models/chat-patterns.md #multi-turn)
MLX Swift:
└── Implement custom context management
(references/mlx-swift/chat-patterns.md)
What's the use case?
Factual answers (summaries, facts)
└── temperature: 0.1-0.3
Balanced (chat, Q&A)
└── temperature: 0.6-0.8
Creative (storytelling, ideas)
└── temperature: 0.9-1.2
See references/shared/best-practices.md for details
references/foundation-models/chat-patterns.md (opens in a new tab)references/foundation-models/setup.md (opens in a new tab)references/framework-selection.md (opens in a new tab)references/mlx-swift/advanced-patterns.md (opens in a new tab)references/mlx-swift/chat-patterns.md (opens in a new tab)references/mlx-swift/quantization.md (opens in a new tab)references/mlx-swift/setup.md (opens in a new tab)references/mlx-swift/vision-patterns.md (opens in a new tab)references/shared/best-practices.md (opens in a new tab)references/shared/error-handling.md (opens in a new tab)references/shared/testing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ios-ai, on-device-ml, foundation-models, mlx-swift, local-llm
npx claudepluginhub mintuz/skills --plugin app19 skills in this plugin
/app-intent-driven-developmentWHEN designing or debugging App Intent-first iOS features for Siri, Shortcuts, widgets, Live Activities, or reuse of an existing intent in SwiftUI; NOT for actions with no system surface; provides AppEntity, metadata, prompting, and view-reuse patterns./app-intents-whats-new-27New App Intents APIs, behaviors, and deprecations in iOS 26 and iOS 27 (and aligned OS releases). Use when adopting, migrating to, or asked about: supportedModes / IntentModes and the deprecated openAppWhenRun; continueInForeground; UndoableIntent; requestChoice; CancellableIntent; LongRunningIntent / performBackgroundTask; IntentExecutionTargets; SnippetIntent interactive snippets; Visual Intelligence with IntentValueQuery / SemanticContentDescriptor / @UnionValue; onscreen appEntityIdentifier; Spotlight with @ComputedProperty / @DeferredProperty(indexingKey:), IndexedEntityQuery, relatedAppEntityIdentifier; RelevantEntities; SyncableEntity / EntityOwnership; SystemShortcut / RunSystemShortcutIntent; EntityCollection; AppUnionValue; @AppIntent(schema:) schemas (replacing deprecated @AssistantIntent); AppIntentsTesting; or what's new in App Intents. For evergreen best practices, use the app-intents-specialist skill instead./app-resizabilityUse when an app's layout must adapt to a window that changes size while the app runs, or when an app must support more than one window. That includes being asked to make an app resizable or support a resizable window, a layout that breaks or does not adapt as the window resizes, and preparing or optimizing an app for the foldable iPhone Duo, split-screen multitasking, or Stage Manager. Modernizes the app by replacing legacy shared-state APIs with context-appropriate alternatives: mainScreen, interfaceOrientation, userInterfaceIdiom, application and scene lifecycle, and safe area insets./app-store-keyword-opsWHEN mining, auditing, or updating localized iOS App Store keywords with Astro competitor metrics; NOT for Android listings, release notes, or App Review submission; proposes only feature-relevant, locale-specific candidates with verified popularity and difficulty./app-store-scraperWHEN scraping iOS/macOS App Store data (apps, reviews, ratings, search); NOT for installing or testing apps; retrieves structured JSON data using iTunes/App Store APIs with curl and jq formatting
/asc-screenshotsWHEN uploading, replacing, or updating App Store screenshots or previews for a version or locale, whether or not the user names helm-asc; NOT for generating, framing, or designing the images; encodes the staging layout, locale mapping, sandbox path rules, and dry-run-first upload procedure.
Other plugins' skills for the same job