Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Other skills

duo-app-intents

App Intents on iPhone Duo: AppIntent, AppEntity with EntityStringQuery, OpenIntent with TargetContentProvidingIntent and onAppIntentExecution (UISceneAppIntent and AppIntentSceneDelegate in UIKit) to show the right item in the right pane or window, handlesExternalEvents to pick the window, intents that work with the phone closed (supportedModes .background, IntentDialog, ProvidesDialog, isVoiceOnly), onscreen awareness when two panes are visible (appEntityIdentifier, appEntityIdentifier(forSelectionType:), NSUserActivity), App Shortcuts (AppShortcutsProvider) and AppIntentsTesting runs on the Duo simulator in each pose. Use when an app adds Siri, Shortcuts, Spotlight or Apple Intelligence actions, when an intent opens the wrong pane or an extra window, or when an intent must work while the phone is closed.

Kimeur · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add Kimeur/duology --skill duo-app-intents

About this skill


name: duo-app-intents description: "App Intents on iPhone Duo: AppIntent, AppEntity with EntityStringQuery, OpenIntent with TargetContentProvidingIntent and onAppIntentExecution (UISceneAppIntent and AppIntentSceneDelegate in UIKit) to show the right item in the right pane or window, handlesExternalEvents to pick the window, intents that work with the phone closed (supportedModes .background, IntentDialog, ProvidesDialog, isVoiceOnly), onscreen awareness when two panes are visible (appEntityIdentifier, appEntityIdentifier(forSelectionType:), NSUserActivity), App Shortcuts (AppShortcutsProvider) and AppIntentsTesting runs on the Duo simulator in each pose. Use when an app adds Siri, Shortcuts, Spotlight or Apple Intelligence actions, when an intent opens the wrong pane or an extra window, or when an intent must work while the phone is closed." metadata: verified: "Xcode 27.1 (27A9275), iOS 27.1 simulator, device: no" sources: "https://github.com/Kimeur/duology/blob/main/reference/sources.md"

duo-app-intents

App Intents describe your app's actions and content to Siri, Shortcuts, Spotlight, widgets and Apple Intelligence (App Intents). On iPhone Duo an intent can arrive while the phone is closed, while two panes are on screen, or while two windows of your app share the inner display. This skill makes each intent land in the right place.

Load neighbours when the task needs them: duo-scenes (windows, Split View, the scene manifest), duo-continuity (window models that survive a fold), duo-intelligence (the summaries an intent can return), duo-system-surfaces (widgets and controls that run intents).

Labels: measured means we ran it on the iPhone Duo simulator (iOS 27.1) on 20 October 2026, with AppIntentsTesting driving the intents; see references/evidence.md. Unverified means we could not confirm it. Everything else comes from Apple's pages, linked inline. Full source list: reference/sources.md.

What Apple says, and what it doesn't

Apple's iPhone Duo pages and the six Duo Tech Talks don't mention App Intents. The Duo rules below join Apple's App Intents guides (Directing app intents to your app's scenes, Configuring the runtime behavior, Providing contextual cues) with Apple's Duo scene rules and our measurements.

Situation on iPhone DuoWhat happenedSource
OpenIntent with the phone closedonAppIntentExecution ran 0.9 to 1.7 s before perform(); the collapsed split view showed the notemeasured
The same with the phone openThe list and the note side by side, the row still visiblemeasured
A .background intent with the app behind another appperform() ran in the background mode; the scene stayed in the backgroundmeasured, closed and open
An OpenIntent with the app behindThe handler ran while the scene was still inactive, then the same window became active with the note; no new windowmeasured, closed and open
Notes on screen for SiriClosed: 1 (the open note). Open: 4 (three rows and the open note)measured
Two windows on the inner displayThe system routes by contentIdentifier to the window that prefers itApple's routing guide; unverified on Duo

Rules

  1. An intent changes a window's model, never a view. The model survives the fold; views get rebuilt (duo-continuity).
  2. Take the item as a parameter. Open, two notes can be on screen at once, in two panes or two windows. Never read "the selected note" inside perform().
  3. Open content with OpenIntent plus TargetContentProvidingIntent, and set the selection in onAppIntentExecution. The split view then does the right thing on each display.
  4. Route to an existing window; don't open a new one. Prefer the window that already shows the item with handlesExternalEvents(preferring:allowing:). New windows work only on the inner display (duo-scenes).
  5. Default to the background. An intent that answers in words works closed, open and in a pocket. Ask for the foreground only when the person must see something.
  6. Annotate each pane. The list with appEntityIdentifier(forSelectionType:identifier:), the open item with appEntityIdentifier(_:) or an NSUserActivity.
  7. Turn on multiple scenes. Apple's routing needs UIApplicationSupportsMultipleScenes set to YES, even with one scene (routing guide).
  8. Test each intent closed and open with AppIntentsTesting, then try it with Siri on a device.
  9. Gate below iOS 26. TargetContentProvidingIntent, onAppIntentExecution and supportedModes are iOS 26; the view annotations are iOS 18.4. iPhone Duo runs iOS 27.1, so this only matters for other iPhones: add the conformance in an @available(iOS 26.0, *) extension, mark supportedModes @available(iOS 26.0, *), and wrap the modifiers in if #available.

1. An entity and its query

import AppIntents
import Observation

struct Note: Identifiable, Hashable, Sendable {
    let id: UUID
    var title: String
    var body: String
}

/// One store for the whole app, shared by every window and by the intents.
@MainActor @Observable
final class NoteLibrary {
    static let shared = NoteLibrary()
    var notes: [Note] = []
    func note(_ id: Note.ID?) -> Note? { notes.first { $0.id == id } }
}

struct NoteEntity: AppEntity {
    static let typeDisplayRepresentation: TypeDisplayRepresentation = "Note"
    sta
Read the complete source ↗