Install
$ agentstack add skill-makgunay-claude-swift-skills-app-intents ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
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 →About
AppIntents — Siri, Shortcuts & Spotlight
Critical Constraints
- ❌ DO NOT use old SiriKit
INIntent→ ✅ UseAppIntentprotocol - ❌ DO NOT use
NSUserActivityalone for Spotlight → ✅ UseIndexedEntity+CSSearchableIndex.default().indexAppEntities() - ❌ DO NOT hardcode foreground-only intents → ✅ Use
supportedModesfor 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.
- Author: makgunay
- Source: makgunay/claude-swift-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.