Logo van App Intents

App Intents

Community
rshankras
app-intents

App Intents voor integratie met Siri, Shortcuts, Spotlight en Apple Intelligence, waaronder intentmodi, interactieve fragmenten, Visual Intelligence en het indexeren van entiteiten. Gebruik dit bij het implementeren van Siri-integratie, App Shortcuts of Spotlight-indexering.

Add to TypingMind

Overzicht

Uitgeverrshankras
Repositoryclaude-code-apple-skills
Skillnaamapp-intents
Sterren
744
Forks
70
Meegeleverde bestanden
3
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 3

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door rshankras op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill App Intents in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/apple-intelligence/app-intents
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git /tmp/claude-code-apple-skills
mkdir -p .claude/skills
cp -r /tmp/claude-code-apple-skills/skills/apple-intelligence/app-intents .claude/skills/app-intents
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel App Intents in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt App Intents automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is App Intents niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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.

When This Skill Activates

  • User wants to add Siri or Shortcuts integration
  • User asks about App Intents, AppIntent, or AppEntity
  • User needs Spotlight indexing for app content
  • User wants to create App Shortcuts with voice phrases
  • User is implementing interactive snippets for Siri results
  • User asks about intent modes (foreground, background)
  • User needs visual intelligence integration via App Intents
  • User wants onscreen entity support for Siri/ChatGPT
  • User asks about Swift package support for App Intents

Decision Tree

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)

API Availability

FeatureMinimum OSFramework
AppIntent protocoliOS 16 / macOS 13AppIntents
AppEntity protocoliOS 16 / macOS 13AppIntents
AppShortcutsProvideriOS 16 / macOS 13AppIntents
@Parameter macroiOS 16 / macOS 13AppIntents
IndexedEntity protocoliOS 18 / macOS 15AppIntents
@Property with indexingKeyiOS 18 / macOS 15AppIntents
Intent Modes (supportedModes)iOS 26 / macOS 26AppIntents
requestChoice(between:)iOS 26 / macOS 26AppIntents
@ComputedPropertyiOS 26 / macOS 26AppIntents
@DeferredPropertyiOS 26 / macOS 26AppIntents
SnippetIntent protocoliOS 26 / macOS 26AppIntents
AppIntentsPackage protocoliOS 26 / macOS 26AppIntents
Onscreen entities (.userActivity())iOS 26 / macOS 26AppIntents
@UnionValueiOS 18 / macOS 15AppIntents
Assistant Schemas (@AssistantIntent)iOS 18AppIntents
Transferable entities, FileEntityiOS 18 / macOS 15AppIntents
UndoableIntentiOS 26 / macOS 26AppIntents
App Schemas on @AppIntent(schema:)iOS 27 / macOS 27AppIntents
IntentDonationManager, OwnershipProvidingEntityiOS 27 / macOS 27AppIntents
AppIntentsTesting frameworkXcode 26 cycle (WWDC26)AppIntentsTesting

Quick Reference

TaskType/APIReference File
Define an actionAppIntent protocolintents-basics.md
Accept parameters@Parameter macrointents-basics.md
Create voice phrasesAppShortcutsProviderintents-basics.md
Define a data entityAppEntity protocolentities-spotlight.md
Index in SpotlightIndexedEntity protocolentities-spotlight.md
Mark indexable fields@Property(indexingKey:)entities-spotlight.md
Run in background/foregroundsupportedModesadvanced-features.md
Continue in foregroundcontinueInForeground()advanced-features.md
Show result UI.result(view:)advanced-features.md
Interactive result UISnippetIntent protocoladvanced-features.md
Present choicesrequestChoice(between:)advanced-features.md
Visual intelligence searchIntentValueQueryadvanced-features.md
Onscreen entity association.userActivity() modifieradvanced-features.md
Computed/deferred properties@ComputedProperty, @DeferredPropertyadvanced-features.md
Share via packagesAppIntentsPackageadvanced-features.md
Make intents Siri-executable@AppIntent(schema:), @AssistantIntentadvanced-features.md
Update-intent "clear vs leave unchanged"valueState (.set/.set(nil)/.unset)advanced-features.md
Custom Siri dialogIntentDialog(full:supporting:)advanced-features.md
Donate in-app UI actionsIntentDonationManageradvanced-features.md
Shared-content confirmationsOwnershipProvidingEntityadvanced-features.md
Undo intent actionsUndoableIntentadvanced-features.md
Export entities as content/filesTransferable, FileEntityentities-spotlight.md
Run from Spotlight on MacparameterSummary gatesentities-spotlight.md
Accept model-generated rich textAttributedString parametersentities-spotlight.md

Process

1. Identify Integration Needs

Read the user's code or requirements to determine:

  • What actions should be exposed to Siri/Shortcuts
  • What content should be searchable in Spotlight
  • Whether interactive snippets are needed for Siri results
  • Whether the intent needs foreground UI or can run in background
  • Target platform and minimum OS version

2. Load Relevant Reference Files

Based on the need, read from this directory:

  • intents-basics.md -- AppIntent protocol, @Parameter, perform(), App Shortcuts
  • entities-spotlight.md -- AppEntity, IndexedEntity, Spotlight indexing, @Property
  • advanced-features.md -- Intent modes, interactive snippets, visual intelligence, onscreen entities, choices, packages

3. Review or Implement

Apply patterns from the reference files. Check for common mistakes (see Top Mistakes below).

4. Cross-Reference

  • For Visual Intelligence camera search, see apple-intelligence/visual-intelligence/
  • For Foundation Models on-device LLM, see apple-intelligence/foundation-models/
  • For deep linking from intents, see generators/deep-linking/ skill

Top Mistakes

These are the most frequent errors when implementing App Intents.

1. Missing static metadata

swift
// ❌ 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()
    }
}

2. Forgetting to index entities after changes

swift
// ❌ 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()
}

3. Using foreground intent for background-safe work

swift
// ❌ 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()
    }
}

4. Not providing EntityStringQuery for entities

swift
// ❌ 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
}

5. Returning too many Spotlight results

swift
// ❌ 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
    )
}

Design Guidelines

How to decide what to expose and how it should behave — from Apple's design sessions.

App Shortcuts (WWDC22)

  • Pick self-contained, straightforward features completable without the app in focus.
  • Hard cap is 10 App Shortcuts; aim for 2–5 high-quality ones.
  • Invocation phrase: brief, memorable, and must include the app name — provide natural synonym variants per language ("Start a run" / "Begin a run").
  • At most one dynamic parameter per phrase; values must come from a finite, front-of-mind list, ordered by recency/frequency — the first value becomes the top Spotlight suggestion.
  • Three dialog flows: Parameter Confirmation (assume the likely value, confirm it), Disambiguation (short list that teaches the available values), Intent Confirmation only for consequential actions (financial, destructive, high-risk).
  • Snippet visuals: semitranslucent material + vibrant label colors — never opaque backgrounds.
  • Suppress spoken dialog when the snippet fully communicates the result, but keep the dialog complete for voice-only contexts (AirPods, CarPlay).
  • Surface in-app education right before or after the user performs the action they'd repeat — that's when the phrase sticks.

What deserves to be an intent (WWDC24)

  • "Anything your app does should be an app intent." Scope by task, not by a feature checklist.
  • Start from fundamental verbs — Create, Open, Search — then specialize.
  • Consolidate near-duplicates into one flexible intent with parameters ("Start Workout" with a workout-type parameter, not five separate intents).
  • Intents represent tasks, never UI gestures — "save the draft", not "tap the save button".
  • Live Activity and audio apps should expose background read-intents (current state, now playing), not just actions.
  • Parameter summaries must read as complete sentences for every possible value.
  • Make parameters optional by default so the intent runs immediately with no follow-up questions; binary states default to a toggle rather than explicit on/off.
  • Intents that end in the UI get an "Open When Run" toggle, default on — users composing shortcuts may want to suppress it.

Interactive snippet design (WWDC25)

  • Max content height 340pt — beyond that is clipped, not scrolled.
  • Use larger-than-default type; snippets are glanced at from a distance.
  • Show only essential info — link into the app for anything more.
  • Use ContainerRelativeShape for margins that adapt to the snippet's corner radius.
  • Vibrant brand backgrounds are fine, but check contrast for distance viewing.
  • Two types: Result (outcome + Done button) vs Confirmation (action-verb button like "Order"); Confirmation → Result is the canonical flow.
  • The snippet must be self-sufficient even if Siri dialog is never shown or heard.

Review Checklist

Before shipping App Intents integration:

  • Every AppIntent has a static var title and static var description
  • Every AppEntity has typeDisplayRepresentation, displayRepresentation, and defaultQuery
  • @Parameter properties have descriptive titles
  • Entities used in Shortcuts have EntityStringQuery or EntityPropertyQuery
  • IndexedEntity types call CSSearchableIndex.default().indexAppEntities() after data changes
  • @Property fields used in indexing have indexingKey set
  • App Shortcuts have clear, natural-language phrases with \(.applicationName)
  • Intent modes match the actual work: background for data ops, foreground for UI
  • Interactive snippets use SnippetIntent (not plain AppIntent)
  • SnippetIntent 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)
  • Text-accepting parameters use AttributedString, not String (Use Model rich text, WWDC25 260)
  • perform() handles errors gracefully and returns meaningful dialog
  • Intents are tested in the order: AppIntentsTesting → Shortcuts → Spotlight → Siri (WWDC26 240)
  • Deep links from entity results navigate to the correct screen

WWDC Session References

Rules throughout the reference files carry inline attributions to these sessions:

SessionCovers
WWDC24 10133 — Bring your app to SiriAssistant Schemas, 12 iOS 18 domains, semantic search
WWDC24 10210 — Bring your app's core features to usersCore doctrine: intents, entities, queries, reuse across surfaces
WWDC24 10134 — App Intents framework additionsIndexedEntity, Transferable, FileEntity, @UnionValue
WWDC24 10176 — Design App Intents for system experiencesScope + parameter design rules, Open When Run
WWDC25 244 — Get to know App IntentsProtocol shapes, metadata extraction, ID contract, packaging
WWDC25 275 — Advances in App IntentsSnippetIntent, intent modes, undo, onscreen entities
WWDC25 260 — Develop for Shortcuts and SpotlightUse Model action, Find actions, Mac Spotlight gates
WWDC26 240 — Build intelligent Siri experiences with App SchemasUnified schema macros, testing ladder
WWDC26 343 — Advanced App Intents features for SiriDialogs, donations, ownership, annotation APIs
WWDC26 344 — Code-along: Make your app available to SiriCanonical integration sequence, valueState

References

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill App Intents?

App Intents voor integratie met Siri, Shortcuts, Spotlight en Apple Intelligence, waaronder intentmodi, interactieve fragmenten, Visual Intelligence en het indexeren van entiteiten. Gebruik dit bij het implementeren van Siri-integratie, App Shortcuts of Spotlight-indexering.

Waarom App Intents gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. App Intents bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik App Intents in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/apple-intelligence/app-intents. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen App Intents gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met App Intents gebruiken?

Zoveel als je wilt. Je kunt App Intents gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill App Intents gratis?

Ja. Deze skill is door rshankras op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇