/ios-swift-skills:app-intents-widgetsfrom ios-swift-skills
Design, implement, debug, and verify stable App Intents and WidgetKit integrations including AppIntent, AppEntity, AppEnum, entity queries, AppShortcutsProvider, dependency injection, shared extension data, widget timelines, relevance, controls, Live Activity selection, deep links, handoff, confirmation, and privacy.
Ships in ios-swift-skills. 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.
Expose a thin, testable capability to the system, then add only the surfaces that improve the user journey. Intents execute outside ordinary screen assumptions; widgets render system-scheduled snapshots rather than miniature apps.
Do not write an intent or widget before identifying the executable targets, deployment floors, and shared capabilities.
xcodebuild -version
xcrun swiftc --version
xcodebuild -list -project App.xcodeproj
xcodebuild -showBuildSettings -project App.xcodeproj -target App \
| rg 'PRODUCT_BUNDLE_IDENTIFIER|APPLICATION_EXTENSION_API_ONLY|IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET|SWIFT_VERSION'
rg --files | rg '\.(entitlements|plist)$|Widget|Intent|Activity'
rg -n 'AppIntent|AppEntity|AppEnum|Entity(Query|StringQuery)|AppShortcutsProvider|TimelineProvider|ControlWidget|ActivityAttributes|onOpenURL|NSUserActivity'
Record the app, widget extension, shared framework/package, and test targets separately. Verify App Group and other entitlements in every executable that needs them. Read architecture, execution, and privacy before introducing shared state.
| User need | Stable surface | Minimum commonly relevant OS |
|---|---|---|
| Run an app action from Siri/Shortcuts/system UI | AppIntent | iOS 16 |
| Resolve app-owned content | AppEntity + EntityQuery/EntityStringQuery | iOS 16 |
| Offer a finite semantic choice | AppEnum | iOS 16 |
| Ship zero-setup phrases for core actions | AppShortcutsProvider | iOS 16 |
| Show scheduled glanceable snapshots | WidgetKit timeline widget | iOS 14 |
| Let the user configure a widget with App Intents | AppIntentConfiguration | iOS 17 |
| Add buttons/toggles to a widget | Interactive widget intent | iOS 17 |
| Offer a discrete or boolean system control | ControlWidget | iOS 18 |
| Display an ongoing, time-bounded event | ActivityKit Live Activity | iOS 16.1 |
Use the minimum that satisfies the request. A widget is not required for an App Shortcut, a configuration intent is not required for an interactive button, and a Live Activity is not a general background refresh mechanism. Read widgets and system-surface selection for the full decision flow.
AppEntity projection with a stable persistent ID and only system-relevant fields.EntityQuery; return a bounded, relevant suggestion set.EntityStringQuery only when text search adds value.AppEnum for small fixed choices, not database records.perform() validate, authorize, call one use case, and translate the result/dialog.\(.applicationName).Do not make a persistence model conform to AppEntity merely to reduce code. The entity is a system-facing value projection; the query rehydrates current data by ID.
Use the stable App Intents example for compile-checked syntax.
Register Sendable dependencies with AppDependencyManager in every executable context that can run the intent, then use @Dependency in the intent/query. Prefer actors or immutable Sendable services. Do not reach through a global UI singleton or construct a production database inside perform().
The app and widget extension are separate processes. Share durable values through an App Group container or another supported cross-process store; dependency injection alone does not share in-memory state. Make the shared schema/version explicit, protect sensitive files, and tolerate missing or stale data.
authenticationPolicy that matches the action and exposed data.requiresAuthentication can accept authentication on the originating trusted device; use requiresLocalDeviceAuthentication when protected data or services require the device executing the intent to be unlocked.perform(); a resolved entity can become stale.supportedModes to describe background/foreground behavior. For older deployment floors, preserve the supported pre-26 path and test both rather than assuming a runtime availability check changes protocol metadata.Confirmation is not a substitute for authorization. Authentication policy is not a substitute for checking whether the current account may mutate the selected object.
When the action needs richer UI, return or invoke a stable app route rather than duplicating the workflow in an intent or widget.
onOpenURL, scene routing, or equivalent coordinator.NSUserActivity for handoff/current-content continuity when another device or system experience should resume the same context.Create timeline entries that already contain everything the SwiftUI view needs. Perform reads/network work in the provider or main app, never in widget body. Return placeholder, snapshot, and timeline content quickly, and let WidgetKit schedule reloads. Call WidgetCenter reload APIs only after meaningful app-driven data changes; repeated reload requests are not guaranteed refresh timers.
Use an App Group for shared files/defaults/databases and configure it in both targets. Version shared data and handle a fresh/missing container. See the stable timeline example.
Treat entity display representations, suggestions, and widget snapshots as system-visible or cacheable metadata. Use a deliberately safe alias when names are private, keep placeholders generic, and mark sensitive widget content with SwiftUI privacy/redaction behavior appropriate to the supported families.
Use relevance only when time, location, or activity context genuinely predicts usefulness. Use a Control Widget only for a fast discrete/boolean action with a reliable current value and fallback. Use a Live Activity only for an ongoing event with a clear start, changing state, and end; always provide stale/end behavior. Do not add all three surfaces by default.
Compile the shared types in every consuming target. Test direct intent execution with injected fakes, then test Shortcuts discovery, suggested entities, authentication, confirmation, cancellation, and stale IDs on device.
For widgets, test placeholder/snapshot/timeline generation, every supported family, missing shared data, app-driven reload, offline state, and actual-device scheduling. For controls and Live Activities, test only on supported OS/device surfaces and verify a stable fallback.
Before adopting newer App Intents schemas or testing tools, check SDK availability and fallbacks against the project’s deployment targets and CI toolchain.
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)examples/AppIntentsExample.swift (opens in a new tab)examples/WidgetTimelineExample.swift (opens in a new tab)examples/prompts.md (opens in a new tab)references/architecture-and-privacy.md (opens in a new tab)references/os-27-beta-boundary.md (opens in a new tab)references/widgets-and-system-surfaces.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
app-intents, widgetkit, live-activity, siri-shortcuts, ios-extensions
npx claudepluginhub fal3/swift-apple-skills --plugin ios-swift-skills14 skills in this plugin
/apple-evaluationsBuild, review, and debug generative AI quality regression suites with Apple's Evaluations framework, including Evaluation, datasets, metrics, Swift Testing integration, calibrated model judges, and tool-call trajectories. Use when measuring an Apple-platform intelligence feature, comparing prompts or models, or diagnosing misleading evaluation results. Do not use for ordinary deterministic unit tests, UI automation, performance profiling alone, model training, or an unrelated vendor's evaluation framework./cross-platform-app-development-skillUse when one Swift/SwiftUI product intentionally targets two or more of iOS, iPadOS, Mac Catalyst, macOS, watchOS, tvOS, or visionOS and needs shared-domain design, adaptive UI, capability boundaries, navigation, input, scenes, storage, or conditional compilation. Do not use for a single-platform feature or for non-Apple cross-platform frameworks./ios-accessibility-skillUse when iOS or iPadOS accessibility design, implementation, review, or testing involves VoiceOver, Voice Control, Switch Control, Full Keyboard Access, Dynamic Type, contrast, motion, focus, media alternatives, or Assistive Access. Do not use for generic visual styling or platform-neutral UI work with no accessibility requirement./ios-animation-graphics-skillDesign, implement, debug, and review accessible Apple-platform animation and graphics with SwiftUI animation, Canvas, TimelineView, matched geometry, phase/keyframe animators, Core Animation, and Lottie. Use for motion design, custom drawing, transitions, particles, animated symbols, UIKit/AppKit bridging, Reduce Motion, and animation performance. Prefer native SwiftUI for app UI; use Core Animation or Lottie only when their capabilities are needed. Do not use this skill for SpriteKit/Metal game engines, video rendering, or image editing unless animation integration is the specific task./iphone-duo-designUse when designing, adapting, implementing, or auditing an iOS app for iPhone Duo, including resizing, folding, vertical bars, reserved regions, state continuity, multiple scenes, camera behavior, and accessibility. Produce evidence-based readiness findings with SDK gates and fallbacks. Do not use for generic iPhone work without Duo or adaptive-layout requirements, Android foldables, Microsoft Surface Duo, Google Duo, or claims of Apple certification./memory-leak-diagnosis-skillDiagnose, explain, and fix Swift and Apple-platform memory leaks, unexpected object retention, deinit failures, heap growth, retain cycles, runaway caches, task and AsyncSequence lifetimes, timer/delegate/closure ownership, jetsam, and ARC issues using Xcode Memory Graph and Instruments Allocations, Leaks, and VM tools. Use when objects do not deallocate, memory rises across repeated workflows, or weak/unowned and capture-list choices are unclear. Do not enable Zombies for leak measurement, call every temporary retention a leak, or use unowned without a proven lifetime invariant.Other plugins' skills for the same job