npx claudepluginhub mintuz/claude-plugins --plugin appThis skill uses the workspace's default tool permissions.
Design features as App Intents first, then reuse those intents across Shortcuts, widgets, and SwiftUI views so automation and UI stay in lockstep.
Implement App Intents to expose iOS app actions and entities to Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence.
References App Intents for iOS apps to integrate with Siri, Apple Intelligence, Shortcuts, Spotlight, Focus, widgets, and Visual Intelligence; covers AppIntent, AppEntity, parameters, queries, background tasks, auth, debugging.
Reviews App Intents code for intent structure, entities, shortcuts, parameters, perform() timeouts, entity queries, phrases, and best practices like @MainActor and localization. Use with import AppIntents or @AppIntent.
Share bugs, ideas, or general feedback.
Design features as App Intents first, then reuse those intents across Shortcuts, widgets, and SwiftUI views so automation and UI stay in lockstep.
AppEntity so intents, widgets, and the app share one source of truth.DisplayRepresentation, typeDisplayRepresentation, and icons so Siri/Shortcuts can render rich cards without opening the app.EntityQuery must be quick and cancellable; avoid blocking the main actor.import AppIntents
struct TaskEntity: AppEntity, Identifiable {
static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "Task")
static let defaultQuery = TaskQuery()
let id: UUID
let title: String
let isComplete: Bool
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(
title: title,
subtitle: isComplete ? "Completed" : "Open",
image: .init(systemName: isComplete ? "checkmark.circle.fill" : "circle")
)
}
}
struct TaskQuery: EntityQuery {
func entities(for identifiers: [UUID]) async throws -> [TaskEntity] {
try await TaskStore.shared.fetch(ids: identifiers) // fast path
}
func suggestedEntities() async throws -> [TaskEntity] {
try await TaskStore.shared.fetchRecent()
}
}
Key points: stable identifier, meaningful representation, and fast queries that avoid launching heavy app flows.
import AppIntents
struct CompleteTaskIntent: AppIntent {
static let title: LocalizedStringResource = "Complete Task"
static let description = IntentDescription("Marks a task as done and returns the updated item.")
@Parameter(title: "Task", requestValueDialog: "Which task should I complete?")
var task: TaskEntity
// Used so we can call the intent from SwiftUI using .perform()
init(task: TaskEntity) { self.task = task }
@MainActor
func perform() async throws -> some IntentResult & ReturnsValue<TaskEntity> {
let updated = try await TaskStore.shared.complete(task.id)
return .result(value: updated)
}
static var parameterSummary: some ParameterSummary {
Summary("Complete \(\.$task)")
}
}
requestValueDialog to make Siri prompts natural.@MainActor only if you must touch UI-bound objects; otherwise keep work off the main actor.AppIntentButton to invoke intents directly from views.import AppIntents
import SwiftUI
struct EventRow: View {
let event: EventEntity
var body: some View {
HStack {
Text(event.name)
Spacer()
AppIntentButton(intent: UndoLastEventOccuranceIntent(event: event)) {
Label("Undo", systemImage: "arrow.uturn.backward")
}
}
}
}
perform (e.g., to show progress or handle errors):import AppIntents
import SwiftUI
struct EventRow: View {
@Environment(\.intentExecutor) private var executor
@State private var isWorking = false
@State private var error: Error?
let event: EventEntity
var body: some View {
HStack {
Text(event.name)
Spacer()
Button {
Task {
isWorking = true
defer { isWorking = false }
do {
try await executor.perform(UndoLastEventOccuranceIntent(event: event))
} catch {
self.error = error
}
}
} label: {
if isWorking {
ProgressView()
} else {
Label("Undo", systemImage: "arrow.uturn.backward")
}
}
}
.alert("Undo failed", isPresented: .init(
get: { error != nil },
set: { if !$0 { error = nil } }
)) {
Button("OK", role: .cancel) { error = nil }
} message: {
Text(error?.localizedDescription ?? "Unknown error")
}
}
}
AppEntity with DisplayRepresentation and EntityQuery.AppIntent that calls shared services; avoid duplicate data access layers inside the intent.LocalizedStringResource) to keep Siri responses natural in all supported languages.id, typeDisplayRepresentation, and rich displayRepresentation.requestValueDialog.