AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

App Intents

skill-makgunay-claude-swift-skills-app-intents · by makgunay

AppIntents framework for Siri, Shortcuts, Spotlight, and Visual Intelligence integration. Covers AppIntent protocol, OpenIntent for deep linking, intent modes (.background, .foreground(.dynamic), .foreground(.deferred)), continueInForeground API, @ComputedProperty and @DeferredProperty macros, IndexedEntity for Spotlight with CSSearchableItemAttributeSet, interactive snippets (SnippetIntent), App…

No reviews yet
0 installs
39 views
0.0% view→install

Install

$ agentstack add skill-makgunay-claude-swift-skills-app-intents

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-makgunay-claude-swift-skills-app-intents)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
7mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of App Intents? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

AppIntents — Siri, Shortcuts & Spotlight

Critical Constraints

  • ❌ DO NOT use old SiriKit INIntent → ✅ Use AppIntent protocol
  • ❌ DO NOT use NSUserActivity alone for Spotlight → ✅ Use IndexedEntity + CSSearchableIndex.default().indexAppEntities()
  • ❌ DO NOT hardcode foreground-only intents → ✅ Use supportedModes for flexible execution

Basic App Intent

import AppIntents

struct FindNearestLandmarkIntent: AppIntent {
    static var title: LocalizedStringResource = "Find Nearest Landmark"

    @Parameter(title: "Category")
    var category: String?

    func perform() async throws -> some IntentResult {
        let landmark = await findNearestLandmark(category: category)
        return .result(value: landmark)
    }
}

Intent Modes (Background/Foreground Control)

struct GetCrowdStatusIntent: AppIntent {
    static let supportedModes: IntentModes = [.background, .foreground(.dynamic)]

    func perform() async throws -> some ReturnsValue & ProvidesDialog {
        guard await modelData.isOpen(landmark) else {
            return .result(value: 0, dialog: "Currently closed.")
        }
        if systemContext.currentMode.canContinueInForeground {
            do {
                try await continueInForeground(alwaysConfirm: false)
                await navigator.navigateToCrowdStatus(landmark)
            } catch { }
        }
        let status = await modelData.getCrowdStatus(landmark)
        return .result(value: status, dialog: "Crowd level: \(status)")
    }
}

Mode combinations:

  • [.background, .foreground] — foreground default, background fallback
  • [.background, .foreground(.dynamic)] — background default, can request foreground
  • [.background, .foreground(.deferred)] — background first, guaranteed foreground later

Property Macros

struct LandmarkEntity: IndexedEntity {
    // Computed — reads from source of truth
    @ComputedProperty
    var isFavorite: Bool { UserDefaults.standard.favorites.contains(id) }

    // Deferred — expensive, fetched only when requested
    @DeferredProperty
    var crowdStatus: Int {
        get async throws { await modelData.getCrowdStatus(self) }
    }
}

Spotlight Integration

struct LandmarkEntity: AppEntity, IndexedEntity {
    static var typeDisplayRepresentation = TypeDisplayRepresentation(
        name: "Landmark", systemImage: "mountain.2"
    )
    var id: String
    var name: String
    var displayRepresentation: DisplayRepresentation {
        DisplayRepresentation(title: "\(name)", image: .init(systemName: "mountain.2"))
    }

    var searchableAttributes: CSSearchableItemAttributeSet {
        let attrs = CSSearchableItemAttributeSet()
        attrs.title = name
        return attrs
    }
}

// Index entities
try await CSSearchableIndex.default().indexAppEntities(landmarks, priority: .normal)

// Remove from index
try await CSSearchableIndex.default().deleteAppEntities(identifiedBy: [id], ofType: LandmarkEntity.self)

Interactive Snippets

struct LandmarkSnippetIntent: SnippetIntent {
    @Parameter var landmark: LandmarkEntity

    var snippet: some View {
        VStack {
            Text(landmark.name).font(.headline)
            HStack {
                Button("Add to Favorites") { }
                Button("Search Tickets") { }
            }
        }.padding()
    }
}

App Shortcuts

struct AppShortcuts: AppShortcutsProvider {
    static var appShortcuts: [AppShortcut] {
        AppShortcut(
            intent: FindNearestLandmarkIntent(),
            phrases: ["Find the closest landmark with \(.applicationName)"],
            systemImageName: "location"
        )
    }
}

Swift Package Support

// In framework
public struct LandmarksKitPackage: AppIntentsPackage { }

// In app target
struct LandmarksPackage: AppIntentsPackage {
    static var includedPackages: [any AppIntentsPackage.Type] {
        [LandmarksKitPackage.self]
    }
}

References

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.