Skip to content
SwiftSkills

App Intents, Siri and Shortcuts with AI agents: skills, workflow and tests for Claude Code, Cursor and Codex

Load an App Intents skill, such as Sdefendre's or n0an's, so the agent uses current APIs. Have it map actions to Apple's App Schemas, add App Shortcuts and test with App Intents Testing (iOS 27) in a UI test target. Shortcuts, Spotlight and Siri still need a human on a device.

Last updated:

This page is about App Intents, Siri and Shortcuts work with a coding agent: which skill to load, how the agent should build intents, and what it can and cannot verify. For general SwiftUI skills, see Best Claude Code skills for SwiftUI. For XCUITest beyond App Intents, see iOS UI testing with AI agents.

Why agents get App Intents wrong

The n0an skill's README lists mistakes agents make because App Intents "has changed significantly across iOS 16, 17, 18, 26, and the 27 releases":

  • making a SwiftData @Model class conform to AppEntity, which no longer compiles under Swift 6 because AppEntity requires Sendable

  • using SwiftUI @Query inside an intent, "which silently does nothing because intents aren't views"

  • forgetting \(.applicationName) in Siri phrases, which fails the AppShortcutsProvider macro at build time

  • reaching for older SiriKit APIs when App Intents covers the use case

Apple's own framing explains why this matters: the App Intents framework makes your app's actions and content "discoverable by Apple Intelligence" and system features like Siri, Spotlight, Shortcuts and widgets, and the compiler generates the information those features need from your intents, entities and app enums.

App Intents skills and tools compared

Skill / toolFocus (from README)iOS 27 and App Intents TestingAgents named in READMEInstall (from README)License★ (24 Oct)Last push
Apple App Intents Skill (Sdefendre)Map app actions to App Schemas or custom intents; entities, App Shortcuts, Spotlight, onscreen context; FieldNotes sample appSample targets iOS 27 (Notes schemas); four test "gates" incl. App Intents Testing and device workflowsClaude Code, Codex, OpenClawgit clone https://github.com/Sdefendre/apple-app-intents-skill.git + python3 scripts/install.py --agent claude (or --agent codex)MIT91 Oct 2026
App Intents (n0an)API-by-API patterns for intents, entities, queries, snippets, Shortcuts/Siri, widgets; ~40 anti-patternsCovers iOS 27 additions incl. LongRunningIntent, EntityCollection, AppIntentsTestingClaude Code, Codex, Gemini, Cursornpx skills add https://github.com/n0an/App-Intents-Agent-Skill --skill app-intentsMIT3826 Sep 2026
app-intents-27 in Apple Platforms 27 Skills (hechen)Siri AI on the 27 releases: App Schemas, indexed entities, view annotations, transferable contentWritten for 27; separate App Intents Testing acceptance referenceClaude Code, Cursor, Codex and othersnpx skills add hechen/apple-platforms-27-skills --skill '*' (README: install all eight together)MIT227 Sep 2026
app-intents-widgets in fal3 skills (fal3)App Intents plus WidgetKit, controls, Live Activity selection, shared extension dataCompiles against stable Xcode 26.6; treats OS 27 schemas and testing frameworks as betaCodex, Claude Code, Cursor (install paths)git clone https://github.com/fal3/claude-skills-collection.git + python3 scripts/install_skills.py --dest "$HOME/.agents/skills" --skill app-intents-widgetsMIT1913 Oct 2026
app-intents in Claude Code Apple skills (rshankras)Siri, Shortcuts, Spotlight indexing, interactive snippets, intent modes, visual intelligence; part of an apple-intelligence groupFront matter: iOS 27 / macOS 27, last verified 16 Jul 2026; mentions App Intents TestingClaude Code/plugin marketplace add rshankras/claude-code-apple-skills + /plugin install apple-skills@indie-apple-stackMIT82824 Jul 2026 ⚠
Axint (agenticempire)MCP server and CLI: runs the real Xcode build and tests; checks App Intents, App Shortcuts providers, WidgetKit; can compile TypeScript intent definitions to SwiftTracks Xcode 27 / App Intents changes in its compatibility docAny MCP clientnpx -y -p @axint/compiler axint-mcp (MCP) · npx -y -p @axint/compiler axint prove --dir /path/to/MyAppApache-2.01823 Oct 2026
DualIntent (NagaYu)Swift macro: one function becomes an App Intent and an MCP toolExample verifies the Siri/Shortcuts path with App Intents Testing; iOS 16+Any MCP client (MCP side)Swift Package: .package(url: "https://github.com/NagaYu/DualIntent.git", from: "0.1.0")MIT14 Jul 2026 ⚠

⚠ = no push for more than 4 weeks. Axint sends source-free telemetry by default; its SECURITY.md documents axint telemetry opt-out.

Which one to pick:

  • Building Siri AI features on iOS 27: start with Sdefendre's skill. It maps each capability to a schema or a custom intent and keeps "what can actually be verified" separate.

  • Fixing or reviewing existing App Intents code: n0an's skill. It is the most detailed API reference and works with Cursor via the skills CLI.

  • Already using rshankras's Claude Code plugin: its app-intents skill comes with it; check the 16 Jul verification date against Apple's current docs.

  • Already using hechen's iOS 27 pack: its app-intents-27 skill is enough for schemas and testing; you install the whole pack.

  • Still shipping with Xcode 26: fal3's app-intents-widgets stays on stable APIs and covers widgets and controls in the same skill.

  • Want a check the agent cannot talk its way past: Axint runs the real build and tests and returns findings to the agent.

  • Want the same function callable by Siri and by Claude: DualIntent.

Invoking the skill in each agent

  • Claude Code: /app-intents (n0an) or /apple-app-intents (Sdefendre), according to the READMEs. Skills also trigger from natural language, for example "Use the App Intents skill to review my Shortcuts integration in this project."

  • Codex: $app-intents (n0an) or $apple-app-intents (Sdefendre).

  • Cursor: install with the skills CLI and pick Cursor when prompted (n0an, hechen), or copy into .cursor/skills (fal3's install table). Sdefendre's installer takes --skills-dir for other agents.

A prompt from Sdefendre's README that sets the right expectations: "Map each capability to the current supported App Schema or a custom intent. Include entity queries, persistence, App Shortcuts, and tests. Explain which Siri capabilities can actually be verified on my SDK and device."

The workflow: from action to Siri

  1. Pick the action and the entity. Apple recommends one intent per unique action, with parameters for variants (one "play music" intent, not separate song and album intents).

  2. Use a schema where one fits. Apple: apply system-defined schemas whenever possible with the AppIntent(schema:), AppEntity(schema:) and AppEnum(schema:) macros; schemas are what Siri AI uses to match actions to everyday phrases. If no schema fits, keep a custom intent. hechen's skill tells the agent not to invent a schema; Sdefendre's checks semantic fit and required schema groups first.

  3. Make content findable. Apple's Apple Intelligence checklist: index entities in Spotlight, make entities Transferable, adopt schemas, associate entities with views for onscreen context, and donate actions.

  4. Add App Shortcuts. You define them in code with AppShortcutsProvider; Apple says they are available as soon as someone installs the app, without registering them yourself. SiriTipView and ShortcutsLink surface them in your UI.

  5. Test through the system, not only perform(). See the next section.

Testing App Intents with an agent

Apple's App Intents Testing framework (iOS 27.0+) runs intents, entities, enums and queries out-of-process, "the same way Siri or Shortcuts perform them". Apple's setup rules:

  • Tests go in a UI testing bundle, not a unit test target, with the same code signing team as the app.

  • You create IntentDefinitions(bundleIdentifier:) and look up intents, entities and enums by string name, so the test target does not import the app.

  • Apple also documents chaining intents, spotlightQuery(_:) for Spotlight indexing, viewAnnotations() for onscreen entities, and test-only setup intents marked isDiscoverable = false inside #if DEBUG.

swift

let app = XCUIApplication()
var definitions: IntentDefinitions!

override func setUp() async throws {
    app.launch()
    definitions = IntentDefinitions(bundleIdentifier: "com.example.my-app")
}

(Apple's setup example from "Testing your App Intents code".)

Because these tests live in a UI testing bundle, the agent runs them like any UI test, for example xcodebuild test -scheme MyApp -destination '<simulator or device>' -only-testing:MyAppUITests. Business logic stays in XCTest or Swift Testing, as Apple notes.

What the agent can verify, and what needs you

CheckWhoSource
Build, macro expansion, App Intents metadata extractionAgent (xcodebuild, or Axint)Sdefendre skill: keep extraction diagnostics, don't suppress them
Logic in perform() and servicesAgent (XCTest / Swift Testing)Apple
Intents, queries, chaining, Spotlight, annotations out-of-processAgent (App Intents Testing, iOS 27)Apple
Intent appears in the Shortcuts Action Library; parameter summary "reads like a natural sentence"You, in the Shortcuts appApple: code-level tests can't verify awkward phrasing
Spotlight finds entities and opens the right sceneYou, on a physical deviceApple: indexing "doesn't always match Simulator"
Siri end-to-end with real phrases, onscreen context, voice-only, every languageYouApple; Sdefendre: Siri needs an eligible device, OS, enabled services and supported language/region

For the physical-device part, see Testing on a real iPhone with AI agents.

FAQ

Is there an App Intents skill for Claude Code?
Yes. Sdefendre's Apple App Intents Skill and n0an's App Intents skill both target Claude Code and Codex; n0an's also names Cursor and Gemini. hechen's Apple Platforms 27 Skills and rshankras's Claude Code Apple skills each include an App Intents skill, and fal3's collection has app-intents-widgets for stable Xcode 26.
Can Cursor write App Intents code?
Yes, with a skill loaded. n0an's App Intents and hechen's iOS 27 pack install into Cursor with the skills CLI, and fal3's README documents .cursor/skills as the Cursor path. n0an's README says that without one, agents often reach for older SiriKit APIs or patterns that no longer compile under Swift 6.
How do I test App Intents from the command line?
Use Apple's App Intents Testing framework, available from iOS 27. Tests live in a UI testing bundle with the same signing team as the app, look up intents by name through IntentDefinitions, and run out-of-process like Siri and Shortcuts. The agent runs them with xcodebuild test.
Can an AI agent test Siri?
Not end to end. Apple's verification guide ends with testing real phrases through Siri, including onscreen context, voice-only use and every supported language. Apple also says Spotlight indexing should be validated on a physical device. The agent can cover builds, logic and App Intents Testing.
What are App Schemas and should the agent use them?
App Schemas are system-defined schemas from Apple's app schema domains, applied with the AppIntent(schema:), AppEntity(schema:) and AppEnum(schema:) macros. Apple says to adopt them whenever possible because Siri AI uses them to match actions to everyday phrases. If none fits, keep a custom intent.