- name
SKILL.md
Файл навыка остаётся в репозитории издателя.
Вставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add rshankras/claude-code-apple-skills --skill app-intents -a cursor -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add rshankras/claude-code-apple-skills --skill app-intents -a claude-code -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add rshankras/claude-code-apple-skills --skill app-intents -a codex -yВставьте скопированную команду в терминал. Она установит этот SKILL.md в выбранного агента.
npx skills add rshankras/claude-code-apple-skills --skill app-intents -a grok -yОтправьте скопированное сообщение в чат Grok Bot. Бот загрузит этот SKILL.md с GitHub и добавит его к навыкам, общим для всех ваших ботов.
Install this skill: https://github.com/rshankras/claude-code-apple-skills/tree/HEAD/skills/apple-intelligence/app-intentsОт издателя
Build intents that expose your app's functionality to Siri, Shortcuts, Spotlight, and Apple Intelligence. Covers the full App Intents framework from basic actions through advanced features like interactive snippets, intent modes, visual intelligence integration, and Spotlight entity indexing.
What do you need?
|
+-- Expose an action to Siri/Shortcuts
| +-- Simple action, no UI needed
| | --> Basic AppIntent (intents-basics.md)
| +-- Needs to show UI or ask user questions
| | --> Intent Modes + Interactive Snippets (advanced-features.md)
| +-- Needs a predictable voice phrase
| --> App Shortcuts (intents-basics.md)
|
+-- Make content searchable
| +-- In Spotlight
| | --> IndexedEntity + @Property (entities-spotlight.md)
| +-- Runnable from Spotlight on Mac
| | --> parameterSummary visibility gates (entities-spotlight.md)
| +-- In Visual Intelligence
| | --> IntentValueQuery + SemanticContentDescriptor (advanced-features.md)
| +-- As onscreen entities for Siri/ChatGPT
| --> annotation APIs + EntityIdentifier (advanced-features.md)
|
+-- Let Siri execute intents from natural language
| --> App Schemas: @AppIntent(schema:) / @AssistantIntent (advanced-features.md)
|
+-- Feed entities to Apple Intelligence (Use Model action)
| --> AttributedString params + entity JSON + Find actions (entities-spotlight.md)
|
+-- Hand entities to other apps as content/files
| --> Transferable / FileEntity (entities-spotlight.md)
|
+-- Show rich results in Siri
| +-- Static display only
| | --> .result(view:) snippet (advanced-features.md)
| +-- Interactive buttons/controls
| | --> SnippetIntent protocol (advanced-features.md)
| +-- Custom spoken dialog
| --> IntentDialog(full:supporting:) (advanced-features.md)
|
+-- Present choices to the user
| --> requestChoice(between:) (advanced-features.md)
|
+-- Teach Siri from in-app UI actions
| --> IntentDonationManager (advanced-features.md)
|
+-- Share intents via Swift Package
--> AppIntentsPackage protocol (advanced-features.md)
Read the user's code or requirements to determine:
Based on the need, read from this directory:
Apply patterns from the reference files. Check for common mistakes (see Top Mistakes below).
apple-intelligence/visual-intelligence/apple-intelligence/foundation-models/generators/deep-linking/ skillThese are the most frequent errors when implementing App Intents.
// ❌ Wrong -- no title or description
struct MyIntent: AppIntent {
func perform() async throws -> some IntentResult {
return .result()
}
}
// ✅ Correct -- static title is required
struct MyIntent: AppIntent {
static var title: LocalizedStringResource = "Do Something"
static var description: IntentDescription = "Performs the action"
func perform() async throws -> some IntentResult {
return .result()
}
}
// ❌ Wrong -- entities updated but Spotlight not notified
func saveRecipe(_ recipe: Recipe) {
database.save(recipe)
}
// ✅ Correct -- reindex after mutations
func saveRecipe(_ recipe: Recipe) async throws {
database.save(recipe)
try await CSSearchableIndex.default().indexAppEntities()
}
// ❌ Wrong -- forces app to foreground for a simple toggle
struct ToggleFavoriteIntent: AppIntent {
static var title: LocalizedStringResource = "Toggle Favorite"
static var openAppWhenRun = true // Unnecessary
func perform() async throws -> some IntentResult {
toggleFavorite()
return .result()
}
}
// ✅ Correct -- runs silently in background
struct ToggleFavoriteIntent: AppIntent {
static var title: LocalizedStringResource = "Toggle Favorite"
static let supportedModes: IntentModes = .background
func perform() async throws -> some IntentResult {
toggleFavorite()
return .result()
}
}
// ❌ Wrong -- entity has no way to be queried
struct NoteEntity: AppEntity {
var id: String
var title: String
// Missing: static var defaultQuery
}
// ✅ Correct -- provides a query so Siri can resolve entities
struct NoteEntity: AppEntity {
var id: String
var title: String
static var defaultQuery = NoteEntityQuery()
// ... typeDisplayRepresentation, displayRepresentation
}
// ❌ Wrong -- indexing thousands of items at once blocks the main thread
func indexAll() async throws {
let allItems = database.fetchAll() // 50,000 items
try await CSSearchableIndex.default().indexAppEntities()
}
// ✅ Correct -- batch index and run off main thread
func indexAll() async throws {
try await CSSearchableIndex.default().indexAppEntities(
of: RecipeEntity.self
)
}
How to decide what to expose and how it should behave — from Apple's design sessions.
Before shipping App Intents integration:
AppIntent has a static var title and static var descriptionAppEntity has typeDisplayRepresentation, displayRepresentation, and defaultQuery@Parameter properties have descriptive titlesEntityStringQuery or EntityPropertyQueryIndexedEntity types call CSSearchableIndex.default().indexAppEntities() after data changes@Property fields used in indexing have indexingKey set\(.applicationName)SnippetIntent (not plain AppIntent)perform() never mutates state — mutations live in the button intents (WWDC25 275)parameterSummary includes every required parameter without a default — the Spotlight-on-Mac visibility gate (WWDC25 260)AttributedString, not String (Use Model rich text, WWDC25 260)perform() handles errors gracefully and returns meaningful dialogRules throughout the reference files carry inline attributions to these sessions:
~/Downloads/docs/AppIntents-Updates.md — read if present; skip silently if absent.App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence integration including intent modes, interactive snippets, visual intelligence, and entity indexing. Use when implementing Siri integr
---name: app-intentsdescription: App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence integration including intent modes…---# skills/apple-intelligence/app-intents/SKILL.mdОбзор
App Intents for Siri, Shortcuts, Spotlight, and Apple Intelligence integration including intent modes, interactive snippets, visual intelligence, and entity indexing. Use when implementing Siri integration, App Shortcuts, or Spotlight indexing.
FAQ
Скачайте skills/apple-intelligence/app-intents/SKILL.md у издателя или скопируйте путь и откройте репозиторий. PlugMCP только показывает навык в каталоге и не хранит файл.
Издатель хранит его в https://github.com/rshankras/claude-code-apple-skills.
Claude, Cursor, Codex и Grok Build могут читать SKILL.md, который вы добавляете из репозитория издателя. Grok Bot устанавливает его, когда вы отправляете в чат ссылку на папку навыка на GitHub.
| iOS 27 / macOS 27 |
| AppIntents |
| AppIntentsTesting framework | Xcode 26 cycle (WWDC26) | AppIntentsTesting |
@AssistantIntentadvanced-features.md |
| Update-intent "clear vs leave unchanged" | valueState (.set/.set(nil)/.unset) | advanced-features.md |
| Custom Siri dialog | IntentDialog(full:supporting:) | advanced-features.md |
| Donate in-app UI actions | IntentDonationManager | advanced-features.md |
| Shared-content confirmations | OwnershipProvidingEntity | advanced-features.md |
| Undo intent actions | UndoableIntent | advanced-features.md |
| Export entities as content/files | Transferable, FileEntity | entities-spotlight.md |
| Run from Spotlight on Mac | parameterSummary gates | entities-spotlight.md |
| Accept model-generated rich text | AttributedString parameters | entities-spotlight.md |