App Intents Code Review
by @anderskev
Reviews App Intents code for intent structure, entities, shortcuts, and parameters. Use when reviewing code with import AppIntents, @AppIntent, AppEntity, Ap...
clawhub install app-intents-code-reviewπ About This Skill
name: app-intents-code-review description: Reviews App Intents code for intent structure, entities, shortcuts, and parameters. Use when reviewing code with import AppIntents, @AppIntent, AppEntity, AppShortcutsProvider, or @Parameter.
App Intents Code Review
Quick Reference
| Issue Type | Reference | |------------|-----------| | AppIntent protocol, perform(), return types | references/intent-structure.md | | AppEntity, EntityQuery, identifiers | references/entities.md | | AppShortcutsProvider, phrases, discovery | references/shortcuts.md | | @Parameter, validation, dynamic options | references/parameters.md |
Review Checklist
perform() marked with @MainActor if accessing UI/main thread resourcesperform() completes within 30-second timeout (no heavy downloads/processing)CustomLocalizedStringResourceConvertibleEntityQuery.entities(for:) handles missing identifiers gracefullyEntityStringQuery used if Siri voice input needed (not plain EntityQuery)suggestedEntities() returns reasonable defaults for disambiguationAppShortcut phrases include .applicationName parameter@Parameter has sensible defaults or uses requestValue()@IntentParameterDependency not used on iOS 16 targets (crashes)AppShortcuts.strings, not Localizable.stringsisDiscoverable = false for internal/widget-only intentsWhen to Load References
Review Questions
1. Does perform() handle timeout limits for long-running operations?
2. Are entity queries self-contained (no @Dependency injection in Siri context)?
3. Do phrases read naturally and include the app name?
4. Are SwiftData models passed by persistentModelID, not directly?
5. Would migrating from SiriKit break existing user shortcuts?
Hard gates (before reporting)
Complete in order for each finding you intend to report. Do not advance until the pass condition is satisfied.
1. Location artifact β The finding includes [FILE:LINE] (or a line range) copied from the current file contents; the path resolves in this repo.
2. Scope read β You read the full surrounding type: the AppIntent / AppEntity / EntityQuery / AppShortcutsProvider (or equivalent) that contains the flagged code, not only a diff hunk or snippet.
3. Platform or integration claim (only if the finding depends on minimum iOS, Swift Package vs app target, @IntentParameterDependency availability, SiriKit migration, or isDiscoverable / extension placement) β You name one concrete artifact you inspected (for example IPHONEOS_DEPLOYMENT_TARGET or target membership in the Xcode project, Package.swift platforms, entitlements, or where the intent file lives) or you drop or downgrade the finding to an open question.
4. Protocol β Pre-report steps in review-verification-protocol are satisfied for this item (no finding if they are not).
Use the issue format [FILE:LINE] ISSUE_TITLE for each reported finding. Hard gate 4 is the full pre-report checklist for this skillβs review type.