/apple-foundation-models:apple-foundation-models-skillfrom apple-foundation-models
Develop, debug, or review Swift code using Apple's FoundationModels framework (OS 26/27+). Covers LanguageModelSession, SystemLanguageModel, @Generable, @Guide, Tool, streaming, transcripts, prompt attachments, dynamic profiles, session properties, Private Cloud Compute, and custom providers.
Ships in apple-foundation-models. 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.
Use this skill as a focused router for the public FoundationModels API. Preserve the request's deployment target and distinguish OS 26 APIs from OS 27 additions in code and explanations.
SystemLanguageModel.availability or PrivateCloudComputeLanguageModel.availability before creating a session with that Apple-provided model. A custom LanguageModel must expose readiness through its own design.LanguageModelSession in @State or an actor-isolated owner; never create it as a local value in an event handler.respond call and every ResponseStream iteration in do/catch. On OS 27, distinguish LanguageModelError, model-specific errors, LanguageModelSession.Error, and LanguageModelSession.ToolCallError; use deprecated LanguageModelSession.GenerationError only for OS 26 compatibility..exceededContextWindowSize.@Generable only on structs and enums. Match each @Guide constraint to the property's type.Tool.call(arguments:) as async throws; propagate failures instead of suppressing them with try?.DispatchQueue.main.async as a substitute for isolation.prewarm(promptPrefix:) during idle time, not immediately before generation.SystemLanguageModel.contextSize and try await PrivateCloudComputeLanguageModel.contextSize rather than copying a token limit into control flow. Apple's on-device model documentation currently specifies a 4,096-token session context window.FoundationModels-specific integration constraints.references/_index.md (opens in a new tab)references/concurrency.md (opens in a new tab)references/custom-language-model-provider.md (opens in a new tab)references/dynamic-profiles.md (opens in a new tab)references/error-handling.md (opens in a new tab)references/generation-options.md (opens in a new tab)references/glossary.md (opens in a new tab)references/guided-generation.md (opens in a new tab)references/os-27-api-changes.md (opens in a new tab)references/performance.md (opens in a new tab)references/private-cloud-compute.md (opens in a new tab)references/prompt-attachments.md (opens in a new tab)references/prompting-techniques.md (opens in a new tab)references/session-lifecycle.md (opens in a new tab)references/session-properties.md (opens in a new tab)references/streaming.md (opens in a new tab)references/symbol-index.md (opens in a new tab)references/system-language-model.md (opens in a new tab)references/tool-calling.md (opens in a new tab)references/transcripts.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (alessiorubicini/apple-foundation-models-agent-skill) — no native marketplace selected
npx claudepluginhub p/alessiorubicini-apple-foundation-modelsOther plugins' skills for the same job