一键导入
apple-foundation-models
Use this skill when working with Apple's Foundation Models framework for on-device AI and LLM capabilities in iOS/macOS apps
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill when working with Apple's Foundation Models framework for on-device AI and LLM capabilities in iOS/macOS apps
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert guidance for building watchOS apps with SwiftUI, WidgetKit complications, notifications, Siri/App Intents, HealthKit, and WatchKit runtime management. Use this skill whenever the user asks about Apple Watch development, watchOS features, complications, watch faces, Smart Stack, Always On, double-tap, Action button (Ultra), background sessions, Extended Runtime Sessions, independent watch apps, or watchOS-specific APIs. Trigger for ClockKit to WidgetKit migration, watchOS UI patterns, multiple watch sizes, and accessibility. Also use for SwiftUI questions in a watchOS context.
CarPlay framework for iOS in-car applications — audio, communication, navigation, parking, EV charging, quick food ordering, fueling, driving task, public safety, and voice-based conversational apps. Includes widgets, live activities, CarPlay Ultra, and instrument cluster support.
Guide for building CarPlay quick-ordering apps (food ordering, pickup, etc.) using the CarPlay framework. Use this skill whenever the user wants to build a CarPlay ordering app, integrate CarPlay templates for food/drink/pickup ordering, work with CPPointOfInterestTemplate, CPListTemplate, CPTabBarTemplate, or CPInterfaceController for ordering workflows. Also trigger when the user mentions CarPlay entitlements, Live Activities with CarPlay ordering, or push notification updates for order status. Covers the full lifecycle: entitlement setup, template hierarchy, map-based POI selection, order placement, Live Activity integration, and push token management.
Use this skill whenever the user wants to create, configure, implement, debug, or learn about Apple App Clips for iOS apps. Triggers include: any mention of 'App Clip', 'app clip', 'App Clip Code', 'invocation URL', 'App Clip experience', lightweight app, instant app experience, or demo version of an iOS app. Also use when the user asks about sharing data between an App Clip and a full app, configuring App Clip experiences in App Store Connect, App Clip size limits, responding to invocations, Smart App Banners for App Clips, NFC-integrated codes, or App Clip to full app transitions. Use this skill even if the user just mentions wanting a "lightweight version" or "instant experience" for their iOS app — they likely need an App Clip. Do NOT use for general iOS development unrelated to App Clips, Android Instant Apps, or Progressive Web Apps.
Reference skill for Apple's CoreLocation framework in Swift/SwiftUI. Use this skill whenever the user works with location services, GPS, geofencing, beacon ranging, geocoding, compass headings, or any CLLocationManager-related code on iOS, macOS, watchOS, or visionOS. Trigger on mentions of: CoreLocation, CLLocationManager, CLLocation, location permissions, geofencing, CLMonitor, iBeacon, CLGeocoder, reverse geocoding, background location updates, "When In Use" / "Always" authorization, CLLocationUpdate, live updates, significant location changes, or any location-related Info.plist keys like NSLocationWhenInUseUsageDescription.
Comprehensive reference for Apple's Tap to Pay on iPhone — the ProximityReader framework, PSP integration, entitlement workflow, marketing guidelines, and regional availability. Use this skill whenever the user asks about implementing contactless payments on iPhone, the ProximityReader API, Tap to Pay entitlements, NFC payment acceptance, loyalty card reading via NFC, payment service provider (PSP) selection for Tap to Pay, or merchant-facing payment app development. Also trigger when the user mentions "Tap to Pay", "TTP", "softPOS", "iPhone as terminal", "contactless payment acceptance", or building an app that accepts card-present payments on iPhone without external hardware.
| name | apple-foundation-models |
| description | Use this skill when working with Apple's Foundation Models framework for on-device AI and LLM capabilities in iOS/macOS apps |
| version | 1.0.0 |
Use this skill when you need help with:
This skill covers iOS 26.0+, iPadOS 26.0+, macOS 26.0+, and visionOS 26.0+.
Use this skill when working with Apple's Foundation Models framework for on-device AI and LLM capabilities in iOS/macOS apps. Covers SystemLanguageModel, LanguageModelSession, guided generation, tool calling, and prompting patterns.
TranscriptTranscript.EntryTranscript.ResponseTranscript.ResponseFormatTranscript.SegmentTranscript.StructuredSegmentFoundationModelsGenerationIDSystemLanguageModelSystemLanguageModel.AdapterSystemLanguageModel.GuardrailsSystemLanguageModel.UseCaseSystemLanguageModel.AvailabilityDynamicGenerationSchemaGenerableGenerationGuideGenerationSchemaGuideLanguageModelFeedbackInstructionsInstructionsBuilderInstructionsRepresentableLanguageModelSessionLanguageModelSession.GenerationErrorLanguageModelSession.ToolCallErrorPromptPromptBuilderPromptRepresentableTranscript.InstructionsTranscript.PromptToolAll models run entirely on-device, ensuring privacy and offline capability.
See the references/ directory for detailed API documentation organized by category:
references/advanced.md - Advancedreferences/api_reference.md - Api Referencereferences/getting_started.md - Getting Startedreferences/guided_generation.md - Guided Generationreferences/localization.md - Localizationreferences/prompting.md - Promptingreferences/tool_calling.md - Tool Callinglet model = SystemLanguageModel(useCase: .general)
let session = LanguageModelSession(model: model)
let response = try await session.respond(to: Prompt("Your question"))
struct Recipe: Generable {
let title: String
let ingredients: [String]
}
let recipe = try await session.respond(
generating: Recipe.self,
prompt: Prompt("Create a pasta recipe")
)
struct WeatherTool: Tool {
func call(arguments: String) async throws -> String {
// Fetch weather data
}
}
let session = LanguageModelSession(
model: model,
tools: [WeatherTool()]
)
For complete API details, see the categorized documentation in the references/ directory.