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
API Availability
Quick Reference
Process
1. Identify Integration Needs
Read the user's code or requirements to determine:
- What actions should be exposed to Siri/Shortcuts
- What content should be searchable in Spotlight
- Whether interactive snippets are needed for Siri results
- Whether the intent needs foreground UI or can run in background
- Target platform and minimum OS version
2. Load Relevant Reference Files
Based on the need, read from this directory:
- intents-basics.md -- AppIntent protocol, @Parameter, perform(), App Shortcuts
- entities-spotlight.md -- AppEntity, IndexedEntity, Spotlight indexing, @Property
- advanced-features.md -- Intent modes, interactive snippets, visual intelligence, onscreen entities, choices, packages
3. Review or Implement
Apply patterns from the reference files. Check for common mistakes (see Top Mistakes below).
4. Cross-Reference
- For Visual Intelligence camera search, see
apple-intelligence/visual-intelligence/ - For Foundation Models on-device LLM, see
apple-intelligence/foundation-models/ - For deep linking from intents, see
generators/deep-linking/skill
Top Mistakes
These are the most frequent errors when implementing App Intents.
1. Missing static metadata
2. Forgetting to index entities after changes
3. Using foreground intent for background-safe work
4. Not providing EntityStringQuery for entities
5. Returning too many Spotlight results
Design Guidelines
How to decide what to expose and how it should behave — from Apple's design sessions.
App Shortcuts (WWDC22)
- Pick self-contained, straightforward features completable without the app in focus.
- Hard cap is 10 App Shortcuts; aim for 2–5 high-quality ones.
- Invocation phrase: brief, memorable, and must include the app name — provide natural synonym variants per language ("Start a run" / "Begin a run").
- At most one dynamic parameter per phrase; values must come from a finite, front-of-mind list, ordered by recency/frequency — the first value becomes the top Spotlight suggestion.
- Three dialog flows: Parameter Confirmation (assume the likely value, confirm it), Disambiguation (short list that teaches the available values), Intent Confirmation only for consequential actions (financial, destructive, high-risk).
- Snippet visuals: semitranslucent material + vibrant label colors — never opaque backgrounds.
- Suppress spoken dialog when the snippet fully communicates the result, but keep the dialog complete for voice-only contexts (AirPods, CarPlay).
- Surface in-app education right before or after the user performs the action they'd repeat — that's when the phrase sticks.
What deserves to be an intent (WWDC24)
- "Anything your app does should be an app intent." Scope by task, not by a feature checklist.
- Start from fundamental verbs — Create, Open, Search — then specialize.
- Consolidate near-duplicates into one flexible intent with parameters ("Start Workout" with a workout-type parameter, not five separate intents).
- Intents represent tasks, never UI gestures — "save the draft", not "tap the save button".
- Live Activity and audio apps should expose background read-intents (current state, now playing), not just actions.
- Parameter summaries must read as complete sentences for every possible value.
- Make parameters optional by default so the intent runs immediately with no follow-up questions; binary states default to a toggle rather than explicit on/off.
- Intents that end in the UI get an "Open When Run" toggle, default on — users composing shortcuts may want to suppress it.
Interactive snippet design (WWDC25)
- Max content height 340pt — beyond that is clipped, not scrolled.
- Use larger-than-default type; snippets are glanced at from a distance.
- Show only essential info — link into the app for anything more.
- Use ContainerRelativeShape for margins that adapt to the snippet's corner radius.
- Vibrant brand backgrounds are fine, but check contrast for distance viewing.
- Two types: Result (outcome + Done button) vs Confirmation (action-verb button like "Order"); Confirmation → Result is the canonical flow.
- The snippet must be self-sufficient even if Siri dialog is never shown or heard.
Review Checklist
Before shipping App Intents integration:
- Every
AppIntenthas astatic var titleandstatic var description - Every
AppEntityhastypeDisplayRepresentation,displayRepresentation, anddefaultQuery -
@Parameterproperties have descriptive titles - Entities used in Shortcuts have
EntityStringQueryorEntityPropertyQuery -
IndexedEntitytypes callCSSearchableIndex.default().indexAppEntities()after data changes -
@Propertyfields used in indexing haveindexingKeyset - App Shortcuts have clear, natural-language phrases with
\(.applicationName) - Intent modes match the actual work: background for data ops, foreground for UI
- Interactive snippets use
SnippetIntent(not plainAppIntent) - SnippetIntent
perform()never mutates state — mutations live in the button intents (WWDC25 275) -
parameterSummaryincludes every required parameter without a default — the Spotlight-on-Mac visibility gate (WWDC25 260) - Text-accepting parameters use
AttributedString, notString(Use Model rich text, WWDC25 260) -
perform()handles errors gracefully and returns meaningful dialog - Intents are tested in the order: AppIntentsTesting → Shortcuts → Spotlight → Siri (WWDC26 240)
- Deep links from entity results navigate to the correct screen
WWDC Session References
Rules throughout the reference files carry inline attributions to these sessions:
References
- App Intents framework
- Making your app's functionality available to Siri
- App Shortcuts
- IndexedEntity
- Spotlight integration
- Local captured doc (optional):
~/Downloads/docs/AppIntents-Updates.md— read if present; skip silently if absent.


