设计与 UI
阅读完整来源 ↗
app-intents
App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence integration including intent modes, interactive snippets, visual intelligence, and entity indexing. Use when implementing Siri integration, App Shortcuts, or Spotlight indexing.
rshankras · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add rshankras/claude-code-apple-skills --skill app-intents技能说明
name: app-intents description: App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence integration including intent modes, interactive snippets, visual intelligence, and entity indexing. Use when implementing Siri integration, App Shortcuts, or Spotlight indexing. allowed-tools: [Read, Glob, Grep] last_verified: 2026-07-16 review_by: 2027-06-22 os_version: iOS 27 / macOS 27
App Intents
Build intents that expose your app's functionality to Siri, Shortcuts, Spotlight, and Apple Intelligence. Covers the full App Intents framework from basic actions through advanced features like interactive snippets, intent modes, visual intelligence integration, and Spotlight entity indexing.
When This Skill Activates
- User wants to add Siri or Shortcuts integration
- User asks about App Intents, AppIntent, or AppEntity
- User needs Spotlight indexing for app content
- User wants to create App Shortcuts with voice phrases
- User is implementing interactive snippets for Siri results
- User asks about intent modes (foreground, background)
- User needs visual intelligence integration via App Intents
- User wants onscreen entity support for Siri/ChatGPT
- User asks about Swift package support for App Intents
Decision Tree
What do you need?
|
+-- Expose an action to Siri/Shortcuts
| +-- Simple action, no UI needed
| | --> Basic AppIntent (intents-basics.md)
| +-- Needs to show UI or ask user questions
| | --> Intent Modes + Interactive Snippets (advanced-features.md)
| +-- Needs a predictable voice phrase
| --> App Shortcuts (intents-basics.md)
|
+-- Make content searchable
| +-- In Spotlight
| | --> IndexedEntity + @Property (entities-spotlight.md)
| +-- Runnable from Spotlight on Mac
| | --> parameterSummary visibility gates (entities-spotlight.md)
| +-- In Visual Intelligence
| | --> IntentValueQuery + SemanticContentDescriptor (advanced-features.md)
| +-- As onscreen entities for Siri/ChatGPT
| --> annotation APIs + EntityIdentifier (advanced-features.md)
|
+-- Let Siri execute intents from natural language
| --> App Schemas: @AppIntent(schema:) / @AssistantIntent (advanced-features.md)
|
+-- Feed entities to Apple Intelligence (Use Model action)
| --> AttributedString params + entity JSON + Find actions (entities-spotlight.md)
|
+-- Hand entities to other apps as content/files
| --> Transferable / FileEntity (entities-spotlight.md)
|
+-- Show rich results in Siri
| +-- Static display only
| | --> .result(view:) snippet (advanced-features.md)
| +-- Interactive buttons/controls
| | --> SnippetIntent protocol (advanced-features.md)
| +-- Custom spoken dialog
| --> IntentDialog(full:supporting:) (advanced-features.md)
|
+-- Present choices to the user
| --> requestChoice(between:) (advanced-features.md)
|
+-- Teach Siri from in-app UI actions
| --> IntentDonationManager (advanced-features.md)
|
+-- Share intents via Swift Package
--> AppIntentsPackage protocol (advanced-features.md)
API Availability
| Feature | Minimum OS | Framework |
|---|---|---|
AppIntent protocol | iOS 16 / macOS 13 | AppIntents |
AppEntity protocol | iOS 16 / macOS 13 | AppIntents |
AppShortcutsProvider | iOS 16 / macOS 13 | AppIntents |
@Parameter macro | iOS 16 / macOS 13 | AppIntents |
IndexedEntity protocol | iOS 18 / macOS 15 | AppIntents |
@Property with indexingKey | iOS 18 / macOS 15 | AppIntents |
Intent Modes (supportedModes) | iOS 26 / macOS 26 | AppIntents |
requestChoice(between:) | iOS 26 / macOS 26 | AppIntents |
@ComputedProperty | iOS 26 / macOS 26 | AppIntents |
@DeferredProperty | iOS 26 / macOS 26 | AppIntents |
SnippetIntent protocol | iOS 26 / macOS 26 | AppIntents |
AppIntentsPackage protocol | iOS 26 / macOS 26 | AppIntents |
Onscreen entities (.userActivity()) | iOS 26 / macOS 26 | AppIntents |
@UnionValue | iOS 18 / macOS 15 | AppIntents |
Assistant Schemas (@AssistantIntent) | iOS 18 | AppIntents |
Transferable entities, FileEntity | iOS 18 / macOS 15 | AppIntents |
UndoableIntent | iOS 26 / macOS 26 | AppIntents |
App Schemas on @AppIntent(schema:) | iOS 27 / macOS 27 | AppIntents |
IntentDonationManager, OwnershipProvidingEntity | iOS 27 / macOS 27 | AppIntents |
| AppIntentsTesting framework | Xcode 26 cycle (WWDC26) | AppIntentsTesting |
Quick Reference
| Task | Type/API | Reference File |
|---|---|---|
| Define an action | AppIntent protocol | intents-basics.md |
| Accept parameters | @Parameter macro | intents-basics.md |
| Create voice phrases | AppShortcutsProvider | intents-basics.md |
| Define a data entity | AppEntity protocol | entities-spotlight.md |
| Index in Spotlight | IndexedEntity protocol | entities-spotlight.md |
| Mark indexable fields | @Property(indexingKey:) | entities-spotlight.md |
| Run in background/foreground | supportedModes | advanced-features.md |
| Continue in foreground | continueInForeground() | advanced-features.md |
| Show result UI | .result(view:) | advanced-features.md |
| Interactive result UI | SnippetIntent protocol | advanced-features.md |
| Present choices | requestChoice(between:) | advanced-features.md |
| Visual intelligence search | IntentValueQuery | advanced-features.md |
| Onscreen entity association | .userActivity() modifier | advanced-features.md |
| Computed/deferred properties | @ComputedProperty, @DeferredProperty | advanced-features.md |
| Share via packages | AppIntentsPackage | advanced-features.md |
| Make intents Siri-executable | @AppIntent(schema:), @AssistantIntent | advanced-features.md |
| Update-intent "clear vs leave unchanged" | valueState (.set/.set(nil)/.unset) | advanced-features.md |
| Custom Siri dialog | IntentDialog(full:supporting:) | advanced-features.md |
| Donate in-app UI actions | `IntentDonat |