一键导入
app-intents-pro
Use when adding App Intents — exposing app actions to Siri, Shortcuts, and Spotlight with AppIntent, parameters, AppEntity, and App Shortcuts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding App Intents — exposing app actions to Siri, Shortcuts, and Spotlight with AppIntent, parameters, AppEntity, and App Shortcuts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when writing, reviewing, or refactoring SwiftUI code — covers modern state management (@Observable), NavigationStack, layout, performance, and accessibility for iOS 26 / Swift 6.
Use when working with Core Data — modeling entities, NSPersistentContainer setup, background contexts, fetch requests, batch operations, and migrations.
Use when making SwiftUI/UIKit apps accessible — VoiceOver labels and traits, Dynamic Type, color contrast, Reduce Motion, and accessibility testing.
Use when structuring an iOS app — feature modularization, MVVM with @Observable, dependency injection, navigation routing, and layering for testability.
Use when writing or reviewing core Swift — choosing value vs reference types, handling optionals, error handling, generics, protocols, and following Swift API design guidelines.
Use when diagnosing or fixing performance — SwiftUI render cost, memory and retain cycles, slow lists, launch time, and using Instruments.
| name | app-intents-pro |
| description | Use when adding App Intents — exposing app actions to Siri, Shortcuts, and Spotlight with AppIntent, parameters, AppEntity, and App Shortcuts. |
| license | MIT |
| metadata | {"author":"Lax Rajpurohit","version":"1.0.0"} |
Expose app actions to the system: Siri, Shortcuts, Spotlight, widgets, and controls.
AppIntents for app actions.AppEntity types for parameters/results.AppShortcuts for zero-setup Siri phrases.Trigger: /app-intents-pro.
AppShortcuts so users get Siri phrases without manual setup.import AppIntents
struct AddTaskIntent: AppIntent {
static let title: LocalizedStringResource = "Add Task"
static let description = IntentDescription("Creates a new task.")
@Parameter(title: "Title") var taskTitle: String
func perform() async throws -> some IntentResult & ProvidesDialog {
try await TaskStore.shared.add(title: taskTitle)
return .result(dialog: "Added “\(taskTitle)”.")
}
}
title/description are required and user-visible.perform() is async throws — call your real model, don't duplicate logic.❌ Untyped, no prompt
@Parameter var value: String // Siri can't elicit it well
✅
@Parameter(title: "Due date") var dueDate: Date
@Parameter(title: "Priority") var priority: Priority // an AppEnum
AppEnum for fixed choices:
enum Priority: String, AppEnum {
case low, normal, high
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Priority"
static let caseDisplayRepresentations: [Priority: DisplayRepresentation] =
[.low: "Low", .normal: "Normal", .high: "High"]
}
struct TaskEntity: AppEntity, Identifiable {
let id: UUID
let title: String
static let typeDisplayRepresentation: TypeDisplayRepresentation = "Task"
var displayRepresentation: DisplayRepresentation { .init(title: "\(title)") }
static var defaultQuery = TaskQuery()
}
struct TaskQuery: EntityQuery {
func entities(for ids: [UUID]) async throws -> [TaskEntity] { /* fetch */ }
func suggestedEntities() async throws -> [TaskEntity] { /* recents */ }
}
struct TasksShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(intent: AddTaskIntent(),
phrases: ["Add a task in \(.applicationName)"],
shortTitle: "Add Task",
systemImageName: "plus.circle")
}
}
Always include \(.applicationName) in at least one phrase.
perform() instead of calling the model.String parameters where Date/AppEnum/AppEntity fit.AppShortcutsProvider, so users get no Siri phrases.\(.applicationName).EntityQuery without suggestedEntities().Per issue: file:line, rule, before/after. Flag intents that bypass the model layer first.