app-intents-expert-skill
Scannednpx machina-cli add skill rudrankriyam/App-Intents-Agent-Skill/app-intents-expert-skill --openclawApp Intents Expert Skill
Expert guidance for the App Intents framework on iOS 26+. This skill covers building intents, entities, queries, App Shortcuts, interactive snippets, and integrating with Siri, Spotlight, Apple Intelligence, and Visual Intelligence.
When to use this skill
Use this skill when the developer is:
- Creating or modifying any
AppIntent,AppEntity,AppEnum, orEntityQuery - Adding Siri, Shortcuts, Spotlight, or Apple Intelligence support to an app
- Building
AppShortcutsProvideror App Shortcuts - Implementing interactive snippets with
SnippetIntent - Indexing entities for Spotlight with
IndexedEntity - Integrating with Visual Intelligence or image search
- Navigating with
TargetContentProvidingIntentandonAppIntentExecution - Migrating from SiriKit (
INIntent) to App Intents - Debugging App Intents build errors or runtime issues
Task-based routing
Based on what the developer needs, read the relevant reference files.
"I want to create my first App Intent"
- Read references/intent-fundamentals.md
- Then references/shortcuts-provider.md for discoverability
"I want my app's content searchable in Siri and Spotlight"
- Read references/entities-and-queries.md
- Then references/spotlight-indexing.md
- Then references/siri-integration.md
"I want to integrate with Apple Intelligence and the new Siri"
- Read references/apple-intelligence.md
- Then references/siri-integration.md
- Then references/intent-fundamentals.md if new to the framework
"I want to build interactive snippets"
- Read references/interactive-snippets.md
- Then references/intent-fundamentals.md if not familiar with intents
"I want to add Shortcuts and Siri phrases to my app"
"I want to structure my app around App Intents"
- Read references/intent-driven-architecture.md
- Then references/entities-and-queries.md
- Then references/intent-fundamentals.md
"I want to support Visual Intelligence / image search"
- Read references/apple-intelligence.md — image search section
- Then references/entities-and-queries.md
"I'm migrating from SiriKit"
"I need to test my App Intents"
"I'm hitting build errors or runtime issues"
Quick-reference checklists
Minimum viable App Intent
- Create a struct conforming to
AppIntent - Add a
static let title: LocalizedStringResource - Implement
func perform() async throws -> some IntentResult - Add
@Parameterfor any inputs - Add a
ParameterSummaryfor all required parameters - Set
supportedModesif the intent should foreground the app
Minimum viable App Entity
- Create a struct conforming to
AppEntity - Add a persistent, unique
idproperty - Add
@Propertyor@ComputedPropertyfor each exposed property - Provide
typeDisplayRepresentationanddisplayRepresentation - Create an
EntityQuerywithentities(for:)method - Set
static let defaultQueryon the entity - Register data dependencies with
AppDependencyManager
Minimum viable App Shortcut
- Create an
AppShortcutsProviderwithstatic var appShortcuts - Create
AppShortcutinstances with intent, phrases, shortTitle, systemImageName - Every phrase must include
\(.applicationName) - At most one
@Parameterper phrase - Call
updateAppShortcutParameters()when suggested entities change
Making an entity Spotlight-searchable
- Conform entity to
IndexedEntity - Add
indexingKeyparameter to@Propertyattributes - Donate entities using the framework's indexing APIs
- Implement an
OpenIntentso tapping results navigates to the entity
Adding interactive snippets (iOS 26+)
- Create a struct conforming to
SnippetIntent - Mark all view-driving variables as
@Parameter - Return
.result(view:)fromperform() - Use
Button(intent:)orToggle(intent:)in the snippet view - Return
ShowsSnippetIntentfrom the parent intent - Do NOT mutate app state in the snippet intent's perform method
Key decision tree
Which protocol should my intent conform to?
Is it a basic action?
→ AppIntent
Does it open your app to show content?
→ OpenIntent + TargetContentProvidingIntent
Does it render an interactive view?
→ SnippetIntent
Should it support undo?
→ UndoableIntent
Does it match an Apple Intelligence domain?
→ Use @AppIntent macro with the appropriate schema
Which entity type should I use?
Is the set of values fixed and known at compile time?
→ AppEnum
Is the set of values dynamic?
→ AppEntity
Do I need Spotlight indexing?
→ AppEntity + IndexedEntity
Do I need image search / Visual Intelligence?
→ AppEntity + Transferable + OpenIntent
Which query type should I use?
Can all entities fit in memory?
→ EnumerableEntityQuery
Do I need text-based search?
→ EntityStringQuery
Do I need filtering by properties?
→ EntityPropertyQuery
Do I only need lookup by ID?
→ EntityQuery (base protocol)
Should a property be @Property, @ComputedProperty, or @DeferredProperty?
Is the value stored on the entity struct?
→ @Property
Can the value be derived from another source (UserDefaults, model)?
→ @ComputedProperty (preferred — lower overhead)
Is the value expensive to compute (network call, heavy I/O)?
→ @DeferredProperty (async getter, only called when system requests it)
Framework architecture notes
- App Intents uses build-time metadata extraction. Your Swift source code is read at compile time to generate an App Intents representation stored inside your app bundle. This is why certain values (titles, display representations) must be compile-time constants.
- The system reads this metadata without running your app. After installation, intents, entities, and shortcuts are available immediately.
- Each target in your app is processed independently. When sharing App Intent types across targets, use
AppIntentsPackageto register each target. - App Intents can now live in Swift Packages and static libraries (new in iOS 26).
- Register dependencies with
AppDependencyManager.shared.add { }as early as possible in your app's lifecycle (typically in theApp.init()).
Source
git clone https://github.com/rudrankriyam/App-Intents-Agent-Skill/blob/main/app-intents-expert-skill/SKILL.mdView on GitHub Overview
Provides expert guidance for designing and implementing App Intents on iOS 26+. Learn to model AppIntent, AppEntity, AppEnum, and EntityQuery, wire in App Shortcuts, and build interactive snippets. It also covers indexing for Spotlight, integration with Visual Intelligence, and migration from SiriKit.
How This Skill Works
The skill uses task-based routing to map your goal to the relevant reference guides (intent fundamentals, shortcuts provider, entities and queries, spotlight indexing, siri integration, interactive snippets, and migration). Following the recommended sequence helps you implement, test, and debug App Intents across Siri, Shortcuts, Spotlight, and Apple Intelligence.
When to Use It
- Creating or modifying AppIntent, AppEntity, AppEnum, or EntityQuery
- Adding Siri, Shortcuts, Spotlight, or Apple Intelligence support to an app
- Building AppShortcutsProvider or implementing interactive SnippetIntent
- Indexing content for Spotlight with IndexedEntity or integrating with Visual Intelligence
- Migrating from SiriKit or debugging App Intents build/runtime issues
Quick Start
- Step 1: Identify core types: AppIntent, AppEntity, AppEnum, and a basic EntityQuery
- Step 2: Implement AppShortcutsProvider and SnippetIntent for shortcuts and snippets
- Step 3: Test across Siri, Shortcuts, Spotlight indexing, and migration scenarios; iterate on feedback
Best Practices
- Define AppIntent, AppEntity, and AppEnum up front with clear naming and payload design
- Use EntityQuery for efficient data retrieval and robust matching
- Leverage AppShortcutsProvider and SnippetIntent to maximize discoverability and interactivity
- Index important entities with IndexedEntity for Spotlight and consider Visual Intelligence for image-based results
- Follow migration steps from SiriKit, validate onAppIntentExecution, and use thorough on-device testing
Example Use Cases
- Add Siri Shortcuts to a notes app using AppIntent and AppShortcutsProvider
- Model a product catalog with AppEntity/Enum and expose results to Spotlight via IndexedEntity
- Create interactive recipe snippets with SnippetIntent and SiriTipView
- Migrate a messaging app from SiriKit by replacing INIntent flows with AppIntent and onAppIntentExecution
- Enable image search with Visual Intelligence and test end-to-end intent flows