/app:app-intent-driven-developmentfrom app
Designs iOS features with App Intents as the primary action path, then reuses them across Siri, Shortcuts, widgets, Live Activities, and SwiftUI views. Covers AppEntity, metadata, prompting, and view-reuse patterns.
Ships in app. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Design features with a system surface as App Intents first, then reuse those intents across Siri, Shortcuts, widgets, Controls, and SwiftUI views so automation and UI share one action path.
This skill covers evergreen App Intents architecture and best practices. For iOS 26 / iOS 27 additions (SnippetIntent, Visual Intelligence IntentValueQuery, IndexedEntityQuery, RelevantEntities, SyncableEntity/EntityOwnership, LongRunningIntent, SystemShortcut, AppIntentsTesting, @ComputedProperty/@DeferredProperty), use app-intents-whats-new-27. For iOS 27.3 Siri model integration (@AppIntent(.tool), @AppEntity(.generable), Skills.skillsbundle), use siri-app-integration and siri-evaluations.
AppEntity.id values and AppEnum string raw values. Renaming, removing, or renumbering any of those (or changing a URLRepresentable* path) breaks saved shortcuts and donations. AppShortcut phrases are a separate contract for spoken Siri invocation and Spotlight display: renaming or removing a phrase breaks voice triggers. Adding is safe; breaking edits must be flagged explicitly and never performed silently.AppShortcutsProvider), propose reviewing one area at a time with choices, or break a whole-codebase review into sections with a checklist.Read a reference when its topic is in play:
references/queries-and-entities.md: EntityIdentifierConvertible (<= 4096 chars), @Property visibility, EntityStringQuery, EnumerableEntityQuery, and EntityPropertyQuery (QueryProperties, SortingOptions, comparators, manual filter/sort/limit execution).references/enums-parameters-and-summaries.md: AppEnum string-persisted raw values and caseDisplayRepresentations fatalError, @IntentParameterDependency, ParameterSummary DSL (When, operator enums, Switch/Case/DefaultCase, % auto-escaping), and factoring (AppEnum vs AppEntity vs plain @Parameter).references/execution-dependencies-and-errors.md: Nonisolated perform(), retry/idempotency around needsValueError/AppIntentError.restartPerform, requestConfirmation, @Dependency (AppDependencyManager.shared in App.init(), placement restrictions, Sendable), and thrown CustomLocalizedStringResourceConvertible / AppIntentError errors.references/shortcuts-donation-and-localization.md: AppShortcut phrases (INAlternativeAppNames, Bool.IntentDisplayName, 10-shortcut / ~1,000-phrase caps, AppShortcuts.xcstrings), IntentDonationManager, PredictableIntent, and source-literal localization (TypeDisplayRepresentation.numericFormat).references/url-representation-and-opening.md: OpenIntent, OpenURLIntent (.result(opensIntent:) / OpensIntent), and URLRepresentableIntent / URLRepresentableEntity / URLRepresentableEnum (applinks: universal links).references/configuration-intents.md: Parameter-only WidgetConfigurationIntent and ControlConfigurationIntent (no perform()), and SetValueIntent for Control toggles.An action earns an App Intent when it needs a system surface, e.g. Siri, Shortcuts, App Shortcuts, Spotlight, widgets, Controls, the Action button, Focus filters, or Live Activities (an open set).
principle-foundational-thinking).AppEntity snapshots; use AppEnum only for compile-time fixed sets and plain @Parameter (String, Int, Bool, Date, Measurement) for free-form values.principle-reuse-before-building).AppEntity inside another unless the system needs the relationship.import AppIntents
struct TaskEntity: AppEntity, Identifiable {
let id: UUID
@Property(title: "Title")
var title: String
@Property(title: "Complete")
var isComplete: Bool
init(id: UUID, title: String, isComplete: Bool) {
self.id = id
self.title = title
self.isComplete = isComplete
}
nonisolated static var typeDisplayRepresentation: TypeDisplayRepresentation {
"Task"
}
nonisolated static var defaultQuery: TaskQuery {
TaskQuery()
}
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(
title: "\(title)",
subtitle: isComplete ? "Completed" : "Open",
image: .init(systemName: isComplete ? "checkmark.circle.fill" : "circle")
)
}
}
struct TaskQuery: EntityQuery {
@Dependency private var store: TaskStore
func entities(for identifiers: [TaskEntity.ID]) async throws -> [TaskEntity] {
try await store.fetch(ids: identifiers) // single batched fetch; omit missing IDs
}
func suggestedEntities() async throws -> [TaskEntity] {
try await store.fetchRecent(limit: 20)
}
}
AppEntity as a system boundary, not a persistence object. Resolve the entity's stable id in the live ModelContext or store when mutating (principle-hide-representations).id: Never derive id from an array index, row position, display name, or device-local identifier (such as Photos localIdentifier or local DB row IDs). Custom EntityIdentifierConvertible strings must be <= 4096 characters.@Property visibility: Only @Property-wrapped members on AppEntity are visible to Find intents, EntityPropertyQuery, and parameter display. Plain stored properties are invisible to the system (valid only for internal displayRepresentation inputs).entities(for:) and missing IDs: Fetch [ID] in one batch (no N+1 loop). Return only records that still exist; omit unresolved identifiers without substituting a nearby record and without throwing. The system then treats the value as unavailable, so the intent reports the missing item or prompts for a new choice instead of mutating another record (principle-parse-at-the-boundary).suggestedEntities() default trap: EntityQuery.suggestedEntities() defaults to [], which yields an empty parameter picker. Implement a fast, bounded, context-scoped suggestedEntities().references/queries-and-entities.md): Use EntityStringQuery for search (no automatic framework filtering), EnumerableEntityQuery only for small bounded catalogues, and EntityPropertyQuery for large stores (your query must apply comparators, mode, sortedBy, and limit itself).AppEnum contracts (references/enums-parameters-and-summaries.md): Assign explicit stable raw values (prefer String, never rely on implicit Int raw values or renumber/reorder shipped values — raw values are persisted by string). Give every case an entry in caseDisplayRepresentations (a missing entry compiles cleanly and traps with fatalError at runtime).import AppIntents
struct CompleteTaskIntent: AppIntent {
nonisolated static let title: LocalizedStringResource = "Complete Task"
nonisolated static let description = IntentDescription("Marks a task as done and returns the updated item.")
nonisolated static var supportedModes: IntentModes { .foreground }
@Parameter(title: "Task", requestValueDialog: "Which task should I complete?")
var task: TaskEntity
@Dependency private var store: TaskStore
init(task: TaskEntity) { self.task = task }
init() {}
func perform() async throws -> some IntentResult & ReturnsValue<TaskEntity> & ProvidesDialog {
let updated = try await store.complete(task.id)
return .result(value: updated, dialog: "Completed \(updated.title).")
}
nonisolated static var parameterSummary: some ParameterSummary {
Summary("Complete \(\.$task)")
}
}
references/execution-dependencies-and-errors.md): AppIntent is Sendable, not @MainActor. Never annotate the AppIntent struct @MainActor (causes Swift 6 #ConformanceIsolation errors on nonisolated static requirements). Keep perform() nonisolated and hop with await MainActor.run { } (or mark only perform() @MainActor when the body is entirely main-actor work). Mark static metadata nonisolated only if default actor isolation is MainActor.throw $param.needsValueError(_:) and AppIntentError.restartPerform abort and restart perform() from the top with no rollback. Resolve and validate every parameter before irreversible work, put destructive or irreversible side effects last (or make them idempotent), and never catch and swallow flow-control errors.try await requestConfirmation(...) immediately before destructive work. Never wrap requestConfirmation in try? or catch cancellation (doing so treats Cancel as Confirm).@Dependency rules (references/execution-dependencies-and-errors.md):
App.init() (or extension startup) via AppDependencyManager.shared.add(dependency:), never in .onAppear or view lifecycle (unregistered @Dependency crashes with fatalError on cold Siri/extension launch).@Dependency only on AppIntent, EntityQuery, and DynamicOptionsProvider — never on AppEntity or AppEnum (compiles but is unprepared at runtime).Sendable (for example @MainActor @Observable final class or actor; a plain @Observable final class is not Sendable).references/enums-parameters-and-summaries.md):
requestValueDialog (never substitute a guessed or remembered default). For non-optional AppEnum, the system auto-disambiguates with requestDisambiguationDialog when > 1 option exists and silently auto-assigns when == 1 option exists.try await $param.requestValue(_:) (inline, no restart), try await $param.requestDisambiguation(among:dialog:), or throw $param.needsValueError(_:) (restarts perform()), or explicitly define the nil behaviour. Avoid the deprecated synchronous requestValue(_:) -> Error overload.ParameterSummary is the Shortcuts editor allowlist and field-order source; use When or Switch/Case/DefaultCase for edit-time conditional visibility..result(...) factories (OpensIntent, not deprecated OpensAppIntent). Return entities while the metadata graph stays simple; a dialog-only .result(dialog:) is acceptable when returned entities complicate mutation metadata.ProvidesDialog for expected user-facing conflicts (such as "already completed") and normal success messages.CustomLocalizedStringResourceConvertible (iOS 16+) or throw prebuilt AppIntentError.PermissionRequired / UserActionRequired / Unrecoverable (iOS 18+, avoiding deprecated .unknown). Plain Error and LocalizedError are sanitised to a generic failure.supportedModes (.background, .foreground, or .foreground(.dynamic) with continueInForeground(_:alwaysConfirm:) / needsToContinueInForegroundError(_:alwaysConfirm:)). Adopt LiveActivityIntent for Live Activity updates without opening the app. openAppWhenRun is deprecated from iOS 26 (keep only for earlier deployment targets).Use DynamicOptionsProvider with @IntentParameterDependency for editor dropdowns and requestDisambiguation at runtime when a dependent parameter is required only for a specific choice:
@Parameter(title: "Resolution")
var resolution: StopResolution
@Parameter(title: "Benchmark Lap")
var benchmarkLap: BenchmarkLapEntity?
@MainActor
func perform() async throws -> some IntentResult & ProvidesDialog {
let run = try BenchmarkIntentStore.resolvedRun()
switch resolution {
case .saveAsBenchmark:
let lap = try await selectedBenchmarkLap(for: run)
try SaveDecisionModule.saveAsBenchmark(run: run, lapID: lap.id)
return .result(dialog: "Saved benchmark.")
case .saveRun:
try SaveDecisionModule.keepInHistory(run: run)
return .result(dialog: "Saved run.")
case .discardRun:
try SaveDecisionModule.discard(run: run)
return .result(dialog: "Discarded run.")
}
}
@MainActor
private func selectedBenchmarkLap(for run: BenchmarkRun) async throws -> BenchmarkLapEntity {
let candidates = try SaveDecisionModule.snapshot(for: run)
.candidates
.map(BenchmarkLapEntity.init)
if let benchmarkLap,
let current = candidates.first(where: { $0.id == benchmarkLap.id }) {
return current
}
return try await $benchmarkLap.requestDisambiguation(
among: candidates,
dialog: "Which lap should be saved as the benchmark?"
)
}
@IntentParameterDependency projection (guard let dep else { return [] }) and never read a key path not declared in @IntentParameterDependency(...) (runtime fatalError).id is still in that set; otherwise disambiguate again before mutating.Button(intent:) or Toggle(isOn:intent:) for direct, fire-and-forget actions where the system owns execution.callAsFunction(donate:) inside your own Button. Hold the Task in @State (single in-flight, cancel on .onDisappear, ignore cancellation errors; principle-narrow-state-lifetime).ModelContext before navigation; do not copy entity fields into SwiftData models..result(value:view:) (ShowsSnippetView) from a target/module shared by the app and intent. Pass resolved values directly (remove @Environment app objects and ModelContext fetches, because snippets render outside the app hierarchy). Keep returning the value alongside the snippet so downstream Shortcuts actions still receive it. .result(value:view:) snippets are static; interactive snippets require SnippetIntent on iOS 26+.import AppIntents
struct TimelineShortcuts: AppShortcutsProvider {
@AppShortcutsBuilder
nonisolated static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: CompleteTaskIntent(),
phrases: ["Complete task in \(.applicationName)"],
shortTitle: "Complete Task",
systemImageName: "checkmark.circle.fill"
)
}
nonisolated static var shortcutTileColor: ShortcutTileColor { .blue }
}
shortTitle and a compile-time string literal systemImageName (omitting them uses the deprecated iOS 17 initialiser). Include \(.applicationName) in every phrase or the runtime index silently drops it.AppShortcuts per app and ~1,000 expanded phrases per locale.TimelineShortcuts.updateAppShortcutParameters() at app launch and whenever dynamic option data changes (unnecessary for compile-time-fixed AppEnum phrases).references/shortcuts-donation-and-localization.md): Direct in-app actions are not auto-donated — call IntentDonationManager.shared.donate(intent:) (or donate(intent:result:)) after the in-app action succeeds, and delete stale donations when data is deleted. Never donate inside perform() (system runs are already donated; donating there double-counts). PredictableIntent supplies suggestion descriptions, not donations.LocalizedStringResource, IntentDialog, titles, and AppShortcut phrases so Xcode extracts keys (AppShortcuts.xcstrings for phrases). Interpolate proper nouns (DisplayRepresentation(title: "\(title)")) and counts into literal templates.references/configuration-intents.md): WidgetConfigurationIntent (iOS 17+) and ControlConfigurationIntent (iOS 18+) are parameter-only schemas; do not implement perform() to load widget data (WidgetKit passes resolved parameters to TimelineProvider without calling perform()). Use SetValueIntent for Control toggle actions.references/url-representation-and-opening.md): Use OpenIntent (or OpenURLIntent returned via .result(opensIntent:) — never UIApplication.shared.open(_:) inside perform()). Use URLRepresentableIntent/Entity/Enum for applinks: universal links only (leave perform() unimplemented so the protocol handles routing).Compilation is not enough; verify system-facing metadata (principle-prove-it-works):
xcodebuild build for the app target and confirm App Intents metadata extraction succeeds.Metadata.appintents/extract.actionsdata to confirm entities and parameters are present.ENABLE_DEBUG_DYLIB = NO.id scheme, or AppEnum raw values, instruct users to delete and re-add affected Shortcuts actions (saved actions hold old serialised tokens).AppEnum (fixed set), AppEntity + query (dynamic records), or plain @Parameter (free-form).@Dependency-injected Sendable services registered in App.init(); validate inputs and confirm before irreversible mutations.DynamicOptionsProvider + @IntentParameterDependency and runtime requestDisambiguation for context-scoped choices, plus ParameterSummary for editor visibility.AppShortcutsProvider, refresh dynamic parameters on launch and mutation, and donate direct in-app actions (never inside perform()).Button(intent:) or callAsFunction(donate:), and share snippet views cleanly.Metadata.appintents, installed simulator/device metadata, App Shortcuts Preview, and Shortcuts cache behaviour.references/configuration-intents.md (opens in a new tab)references/enums-parameters-and-summaries.md (opens in a new tab)references/execution-dependencies-and-errors.md (opens in a new tab)references/queries-and-entities.md (opens in a new tab)references/shortcuts-donation-and-localization.md (opens in a new tab)references/url-representation-and-opening.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
app-intents, ios-development, siri, shortcuts, widgets, swiftui
npx claudepluginhub mintuz/skills --plugin app19 skills in this plugin
/app-intents-whats-new-27New App Intents APIs, behaviors, and deprecations in iOS 26 and iOS 27 (and aligned OS releases). Use when adopting, migrating to, or asked about: supportedModes / IntentModes and the deprecated openAppWhenRun; continueInForeground; UndoableIntent; requestChoice; CancellableIntent; LongRunningIntent / performBackgroundTask; IntentExecutionTargets; SnippetIntent interactive snippets; Visual Intelligence with IntentValueQuery / SemanticContentDescriptor / @UnionValue; onscreen appEntityIdentifier; Spotlight with @ComputedProperty / @DeferredProperty(indexingKey:), IndexedEntityQuery, relatedAppEntityIdentifier; RelevantEntities; SyncableEntity / EntityOwnership; SystemShortcut / RunSystemShortcutIntent; EntityCollection; AppUnionValue; @AppIntent(schema:) schemas (replacing deprecated @AssistantIntent); AppIntentsTesting; or what's new in App Intents. For evergreen best practices, use the app-intents-specialist skill instead./app-resizabilityUse when an app's layout must adapt to a window that changes size while the app runs, or when an app must support more than one window. That includes being asked to make an app resizable or support a resizable window, a layout that breaks or does not adapt as the window resizes, and preparing or optimizing an app for the foldable iPhone Duo, split-screen multitasking, or Stage Manager. Modernizes the app by replacing legacy shared-state APIs with context-appropriate alternatives: mainScreen, interfaceOrientation, userInterfaceIdiom, application and scene lifecycle, and safe area insets./app-store-keyword-opsWHEN mining, auditing, or updating localized iOS App Store keywords with Astro competitor metrics; NOT for Android listings, release notes, or App Review submission; proposes only feature-relevant, locale-specific candidates with verified popularity and difficulty./app-store-scraperWHEN scraping iOS/macOS App Store data (apps, reviews, ratings, search); NOT for installing or testing apps; retrieves structured JSON data using iTunes/App Store APIs with curl and jq formatting
/asc-screenshotsWHEN uploading, replacing, or updating App Store screenshots or previews for a version or locale, whether or not the user names helm-asc; NOT for generating, framing, or designing the images; encodes the staging layout, locale mapping, sandbox path rules, and dry-run-first upload procedure.
/audit-xcode-security-settingsAudit and enable security-oriented Xcode build settings. Progressively enables compiler warnings, static analyzer checkers, and Enhanced Security features. Use when: user wants to secure their Xcode project, audit security settings, enable hardening, review security posture of build configuration, set up security-focused static analysis, enable static analysis, improve warning coverage, harden diagnostics, or catch more bugs at compile time in C/C++/Objective-C/Swift. SKIP: network security (TLS/ATS), code signing, privacy APIs.
Other plugins' skills for the same job