Loading...
Loading...
Writes and reviews Swift App Intents code that exposes app actions and data to Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence. Use when adding AppIntent, AppEntity, OpenIntent, AppShortcutsProvider, EntityQuery, Focus Filters, AssistantEntity/AssistantIntent schemas, or when wiring SwiftData/networked data into intents.
npx skill4agent add n0an/app-intents-agent-skill app-intentsperform()references/fundamentals.mdreferences/parameters.mdreferences/entities.mdAppShortcutsProviderreferences/shortcuts-and-siri.mdOpenIntentreferences/open-and-snippet-intents.mdreferences/dependencies.mdIndexedEntityreferences/spotlight.md@AssistantEntity@AssistantIntentreferences/assistant-schemas.mdreferences/testing-intents.mdreferences/anti-patterns.mdreferences/fundamentals.mdperform()references/shortcuts-and-siri.mdreferences/parameters.md@Parameterreferences/entities.mdreferences/entities.mdAppEntityIndexedEntity@Propertyreferences/spotlight.mdreferences/shortcuts-and-siri.mdreferences/open-and-snippet-intents.mdSnippetIntentButton(intent:)references/fundamentals.mdreferences/open-and-snippet-intents.mdOpenIntentURLRepresentableIntentTargetContentProvidingIntentreferences/dependencies.mdreferences/assistant-schemas.mdreferences/entities.md@PropertyTransferablereferences/assistant-schemas.mdIntentValueQuerySemanticContentDescriptor@UnionValuereferences/entities.mdTransferableOpenIntentreferences/open-and-snippet-intents.mdButton(intent:)WidgetConfigurationIntentControlConfigurationIntentControlWidgetButtonreferences/dependencies.mdreferences/fundamentals.mdreferences/dependencies.md@DependencyAppIntentsPackagereferences/entities.mdreferences/testing-intents.md@Dependencyreferences/anti-patterns.mdGeneric action?
→ AppIntent
Opens the app to a specific entity?
→ OpenIntent (+ TargetContentProvidingIntent on iOS)
Renders an interactive view only, no business logic?
→ SnippetIntent
Needs to bring the app forward conditionally?
→ AppIntent with supportedModes (iOS 26+)
→ or ForegroundContinuableIntent (iOS 17-18)
Deletes entities with standard confirmation?
→ DeleteIntent
Routes a search query into the app?
→ ShowInAppSearchResultsIntent
Backs widget configuration?
→ WidgetConfigurationIntent (empty conformance, no perform)
Backs a Control Center control?
→ ControlConfigurationIntent
Has a universal-link URL representation?
→ URLRepresentableIntent + OpenIntent (no perform needed)
Matches an Apple Intelligence domain?
→ AppIntent + @AppIntent(schema: .domain.action)Fixed set known at compile time?
→ AppEnum
Dynamic data with a persistent id?
→ AppEntity
Entity must appear in Spotlight?
→ AppEntity + IndexedEntity
Entity IS a file (scan, voice memo, exported image)?
→ FileEntity
Computed / aggregated data with no stable id?
→ TransientAppEntity
Needs Apple Intelligence schema awareness?
→ AppEntity + @AppEntity(schema: .domain.type)
Supports cross-app sharing?
→ AppEntity + TransferableSmall fixed set, enumerable?
→ EnumerableEntityQuery (also gets a basic Find intent)
Large dataset, searchable by name?
→ EntityQuery + EntityStringQuery
Many queryable properties, user should build predicates?
→ EntityPropertyQuery (auto-generates Find intent with comparators + sort)
Simple id-only lookup, no search?
→ UniqueIDEntityQuery
Visual intelligence / image search?
→ IntentValueQuery + SemanticContentDescriptorStored on the entity struct, should appear in Shortcuts/Find/summary?
→ @Property
Derived from an underlying model object (cheap to compute)?
→ @ComputedProperty (preferred over @Property for wrappers around models)
Derived AND should be indexed in Spotlight?
→ @ComputedProperty(indexingKey: \.keyName)
Expensive to compute (network, ML inference, heavy query)?
→ @DeferredProperty (async getter, only runs when system asks)
Internal to the entity, not shown anywhere?
→ plain stored property (no wrapper)IndexedEntityOpenIntent@AssistantEntity@AssistantIntent@ModelAppEntityAppEntitySendable@ModelstructModelContextModelContextModelContainerAppShortcutsProvider\(.applicationName)@Query@QueryViewFetchDescriptorModelContextperform()@DependencyApp.init()AppDependencyManager.shared.add(dependency:)String(format:)LocalizedStringResource^[\(count) item](inflect: true)AttributedStringOpenIntentAppIntent & ShowsSnippetViewAppIntent & ShowsSnippetIntentSnippetIntentButton(intent:)static let isDiscoverable: Bool = falseWidgetCenter.shared.reloadAllTimelines()perform()Button(intent:)UserDefaults(suiteName:)ModelContainerUserDefaults.standard@DependencyYourShortcutsProvider.updateAppShortcutParameters()EnumerableEntityQueryEntityQueryEntityStringQueryEntityPropertyQueryentities(for identifiers:)@Property@ComputedPropertyTransientAppEntityAppEntityURLRepresentableEntityURLRepresentableIntentperform().userActivity(_:element:)TransferableSnippetIntent.perform()reload()perform()AppShortcutsupportedModescontinueInForegroundForegroundContinuableIntentneedsToContinueInForegroundErrorAttributedStringStringAppModelContainerAppDependencyManager.shared.add(...)init().task.onAppearLocalizedStringResourceinflect: true@ModelAppEntitySendable// Before
extension Article: AppEntity { ... }
// After
struct ArticleEntity: AppEntity {
var id: UUID
var title: String
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Article"
static let defaultQuery = ArticleEntityQuery()
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(title: "\(title)")
}
}\(.applicationName)// Before
AppShortcut(intent: OpenArticleIntent(), phrases: ["Open an article"], ...)
// After
AppShortcut(intent: OpenArticleIntent(), phrases: ["Open an article in \(.applicationName)"], ...)ArticleAppEntity\(.applicationName)references/fundamentals.mdAppIntentperform()IntentResultProvidesDialogReturnsValueShowsSnippetViewOpensIntentreferences/parameters.md@Parameter@AppEnumreferences/entities.mdAppEntityIndexedEntityEnumerableEntityQueryEntityQueryEntityStringQueryUniqueIDEntityQueryreferences/shortcuts-and-siri.mdAppShortcutsProvider\(.applicationName)shortcutTileColorSiriTipViewShortcutsLinkreferences/open-and-snippet-intents.mdOpenIntentShowsSnippetViewreferences/dependencies.md@DependencyAppDependencyManagerModelContainerModelContextreferences/spotlight.mdIndexedEntityCSSearchableIndexattributeSetreferences/assistant-schemas.md@AssistantEntity@AssistantIntentreferences/testing-intents.md@DependencyAppDependencyManagerreferences/anti-patterns.md