skills/apple-foundation-models/SKILL.md
Build Apple Intelligence features with Foundation Models and Image Playground on iOS 26+, iPadOS 26+, macOS 26+, Mac Catalyst 26+, and visionOS 26+. Use when implementing SystemLanguageModel, LanguageModelSession, guided generation with @Generable/@Guide, tool calling, streaming responses, prompt design, safety and guardrail handling, model availability checks, content tagging, context-window limits, local on-device inference, routing to larger-model paths, adapters, and ImagePlayground/ImageCreator APIs. Covers model capabilities and limitations, structured output, error handling, and SwiftUI integration patterns.
npx skillsauth add jakerains/agentskills apple-foundation-modelsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implement reliable Apple Intelligence features with Apple's on-device text and image generation APIs across all supported platforms.
The on-device model is ~3B parameters with a 4,096-token context window. It excels at summarization, extraction, classification, tagging, composition, and revision. It cannot reliably do:
Before writing any code, check references/model-capabilities-and-limits.md to confirm the task is within the model's capabilities. If it is not, design an escalation path (tool, backend model, or user disclosure).
| Capability | Key API | Reference |
|-----------|---------|-----------|
| Text generation (basic) | LanguageModelSession.respond(to:) | references/foundation-models-framework.md |
| Streaming output | session.streamResponse(to:) | references/foundation-models-framework.md |
| Structured output | @Generable, @Guide, session.respond(to:generating:) | references/generable-and-guided-generation.md |
| Tool calling | Tool protocol, session with tools: | references/tool-calling.md |
| Prompt and instruction design | LanguageModelSession(instructions:) | references/prompt-design-and-safety.md |
| Safety and error handling | guardrailViolation, input sanitization | references/prompt-design-and-safety.md |
| Model capabilities check | Capability/limitation tables | references/model-capabilities-and-limits.md |
| Image generation | ImagePlayground, ImageCreator | references/image-playground.md |
| Testing and debugging | #Playground, session.transcript, Instruments | references/foundation-models-framework.md |
| Local vs cloud routing | GenerationPath enum pattern | references/routing-local-vs-bigger-model.md |
references/model-capabilities-and-limits.md. If it is not, design an escalation path before writing code.isAvailable and availability states, then design fallback UI for unavailable states.instructions: (developer-only). Keep prompts concise with length qualifiers. See references/prompt-design-and-safety.md.@Generable types for structured output. Use @Generable with @Guide constraints instead of asking the model to produce JSON. See references/generable-and-guided-generation.md.streamResponse(to:) instead of respond(to:) for any output the user sees. See the streaming section in references/foundation-models-framework.md.references/tool-calling.md.references/routing-local-vs-bigger-model.md.references/foundation-models-framework.mdreferences/model-capabilities-and-limits.mdreferences/generable-and-guided-generation.mdreferences/tool-calling.mdreferences/prompt-design-and-safety.mdreferences/image-playground.mdreferences/routing-local-vs-bigger-model.mdstreamResponse(to:) for any output displayed to the user. Reserve respond(to:) for background processing.@Generable for structured output, not JSON in prompts. The model uses constrained decoding with @Generable types, guaranteeing valid output. Prompt-based JSON is unreliable.development
Build durable workflows with Vercel Workflow DevKit using "use workflow" and "use step" directives. Use for long-running tasks, background jobs, AI agents, webhooks, scheduled tasks, retries, and workflow orchestration. Supports Next.js, Vite, Astro, Express, Fastify, Hono, Nitro, Nuxt, SvelteKit.
documentation
Automate changelog management, version bumping, release tracking, tags, and GitHub Releases. Sets up a changelog system (CHANGELOG.md, UI modal, version display) if none exists, or updates an existing one. Use when: updating changelog, bumping version, creating release entry, promoting [Unreleased], tagging, publishing GitHub Release notes, handling prerelease versions, setting up changelog, adding version display, managing semver, commit/push/release workflow. Triggers on: changelog, version bump, release notes, semver, CHANGELOG.md, release entry, what's new, patch/minor/major/prerelease bump, tag release, GitHub Release, update the changelog, release, new version.
development
Convert documentation websites, GitHub repositories, and PDFs into Claude AI skills. Use when creating Claude skills from docs, scraping documentation, packaging websites into skills, or converting repos/PDFs to Claude knowledge.
development
Generate professional shot lists from screenplays and scripts. Use when user uploads a screenplay (.fountain, .fdx, .txt, .pdf, .docx) or describes scenes for production planning. Parses scripts to extract scenes, helps determine camera setups, shot types, framing, and movement through collaborative discussion, then generates beautifully formatted PDF shot lists for production. Triggers include requests to create shot lists, plan shots, break down scripts for filming, or organize camera coverage.