foundation-models-on-device
by affaan-mfoundation-models-on-device helps you build Apple FoundationModels features on iOS 26+ with on-device text generation, guided output with @Generable, tool calling, snapshot streaming, and availability checks for privacy-first apps.
This skill scores 78/100, which means it is a solid listing candidate for directory users who want a practical on-device Apple FoundationModels guide. The repository gives enough workflow content to justify installation, though users should still expect some platform-specific limits and no automated helper scripts.
- Clear activation target for Apple Intelligence on-device use cases, including text generation, structured output, tool calling, and streaming.
- Operational guidance is concrete: it includes availability checks and example Swift code rather than only high-level advice.
- Good instructional density with substantial body content and multiple workflow/constraint sections, which improves agent execution over a generic prompt.
- No install command, scripts, or support files, so adoption depends entirely on reading the markdown skill content.
- Scope is narrow to Apple FoundationModels on iOS 26+, so it is only useful for agents working in that specific environment.
Overview of foundation-models-on-device skill
What foundation-models-on-device does
The foundation-models-on-device skill helps you design and implement Apple FoundationModels features that run locally on iOS 26+. It is best for apps that need text generation, guided structured output with @Generable, tool calling, or snapshot streaming without sending user data to a cloud model.
Who should use it
Use the foundation-models-on-device skill if you are building an AI feature for iPhone or iPad and need privacy, offline resilience, or Apple Intelligence integration. It is a strong fit for product teams, iOS engineers, and backend-minded developers who want to understand the app-side contract before wiring in server logic.
What matters before adoption
The main decision point is device and OS support: this workflow depends on Apple Intelligence availability and the FoundationModels framework in iOS 26+. If you need broad device coverage, cloud fallback, or model-agnostic prompt tooling, this skill will only cover one part of the solution.
How to Use foundation-models-on-device skill
Install and open the right files
Install the foundation-models-on-device skill with:
npx skills add affaan-m/everything-claude-code --skill foundation-models-on-device
Start with SKILL.md, then read the whole file before editing code. This repo has no extra scripts or reference folders, so the skill content itself is the source of truth.
Turn a rough goal into a usable prompt
The foundation-models-on-device usage works best when you state the feature, the input shape, and the expected output shape. For example, ask for “a SwiftUI screen that checks availability, starts a session only when supported, and returns structured JSON-like output for a task note.” That is better than “add AI to my app,” because the skill is built around availability checks, session setup, structured generation, and streaming.
Map the skill to your implementation
For foundation-models-on-device for Backend Development, the useful mindset is contract-first: define what the app needs to generate, validate, or stream before you design surrounding APIs. If your app already has backend endpoints, decide whether the on-device model is for drafting, summarization, classification, or UI assistance, and keep the server role narrow.
Read these patterns first
Focus first on the skill’s core patterns: availability check, basic session flow, guided generation with @Generable, and tool calling. Those are the highest-signal parts of the foundation-models-on-device guide because they determine whether your code will run on eligible devices and whether the output stays structured enough for production use.
foundation-models-on-device skill FAQ
Is foundation-models-on-device only for iOS apps?
Yes, this skill is centered on Apple’s on-device FoundationModels framework, so it is primarily relevant to iOS 26+ app development. If you need web, Android, or server-side LLM support, use a different skill.
Do I need Apple Intelligence enabled?
Usually yes. One of the first checks in the foundation-models-on-device skill is model availability, because the feature can be unavailable if the device is not eligible, Apple Intelligence is off, or the model is still downloading.
How is this different from a normal prompt?
A normal prompt tells a model what to do. The foundation-models-on-device skill gives you the implementation path: when to activate, how to gate by availability, how to shape output with @Generable, and how to stream or call tools safely on-device.
Is it beginner-friendly?
It is beginner-friendly if you already know basic Swift or SwiftUI. It is less suitable if you are still learning app architecture, because the hard part is not prompting—it is integrating model availability, structured responses, and UI state correctly.
How to Improve foundation-models-on-device skill
Provide the exact job to be done
Better inputs produce better outputs. Instead of asking for generic “AI chat,” specify the user action and result, such as “summarize a note into three bullets,” “extract fields from a receipt,” or “draft a reply with tool access to calendar data.”
State your constraints up front
Mention the device target, minimum OS, whether you need offline behavior, and whether structured output is required. These constraints matter in foundation-models-on-device because they change whether the feature should be available at all and whether the implementation should use plain generation, @Generable, or tool calling.
Ask for the failure path, not just the happy path
The skill is strongest when you request availability handling, fallback UI, and input validation in the same pass. A good iteration prompt asks for “supported-device flow plus not-eligible, not-enabled, and not-ready states” so the result is shippable instead of demo-only.
Review generated code for model boundaries
The most common failure mode is assuming the on-device model can replace product logic. Use the skill to improve drafting, extraction, and UI assistance, then keep authorization, persistence, and critical business rules outside the model path.
