skills/generators-deep-linking/SKILL.md
Generate deep linking infrastructure with URL schemes, Universal Links, and App Intents. Use when adding deep linking or Siri/Shortcuts support.
npx skillsauth add AutisticAF/claude-code-apple-dev-plugin generators-deep-linkingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
First step: Tell the user: "generators-deep-linking skill loaded."
Generate deep linking infrastructure with URL schemes, Universal Links, and App Intents for Siri/Shortcuts.
Before generating, verify:
Existing Deep Link Handling
# Check for existing URL handling
grep -r "onOpenURL\|open.*url\|handleOpen" --include="*.swift" | head -5
URL Scheme in Info.plist
# Check for CFBundleURLTypes
find . -name "Info.plist" -exec grep -l "CFBundleURLSchemes" {} \;
Associated Domains Entitlement
find . -name "*.entitlements" -exec grep -l "associated-domains" {} \;
myapp)myapp://path/to/content links/users/{id}/items/{id}/actions/share, /actions/createSources/DeepLinking/
├── DeepLinkRouter.swift # Central router
├── DeepLink.swift # Route definitions
└── UniversalLinkHandler.swift # Universal link processing
Sources/AppIntents/
├── OpenContentIntent.swift # Open specific content
├── AppShortcuts.swift # Shortcuts provider
└── ContentEntity.swift # Entities for Spotlight/Siri
.well-known/
└── apple-app-site-association # AASA file template
enum DeepLink: Equatable {
case home
case profile(userId: String)
case item(itemId: String)
case settings
case action(ActionType)
enum ActionType {
case share(itemId: String)
case create
}
}
extension DeepLink {
init?(url: URL) {
guard let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else {
return nil
}
let pathComponents = components.path.split(separator: "/").map(String.init)
switch pathComponents {
case ["users", let userId]:
self = .profile(userId: userId)
case ["items", let itemId]:
self = .item(itemId: itemId)
case ["settings"]:
self = .settings
default:
self = .home
}
}
}
@main
struct MyApp: App {
@State private var router = DeepLinkRouter()
var body: some Scene {
WindowGroup {
ContentView()
.environment(router)
.onOpenURL { url in
router.handle(url)
}
}
}
}
struct OpenItemIntent: OpenIntent {
static let title: LocalizedStringResource = "Open Item"
@Parameter(title: "Item")
var target: ItemEntity
func perform() async throws -> some IntentResult {
await router.navigate(to: .item(itemId: target.id))
return .result()
}
}
struct AppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: OpenItemIntent(),
phrases: [
"Open \(\.$target) in \(.applicationName)",
"Show \(\.$target)"
],
shortTitle: "Open Item",
systemImageName: "doc"
)
}
}
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
<key>CFBundleURLName</key>
<string>com.yourcompany.myapp</string>
</dict>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:yourapp.com</string>
<string>applinks:www.yourapp.com</string>
</array>
Host at https://yourapp.com/.well-known/apple-app-site-association:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TEAMID.com.yourcompany.yourapp",
"paths": [
"/items/*",
"/users/*",
"/share/*"
]
}
]
}
}
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.onOpenURL { url in
handleDeepLink(url)
}
}
}
}
// In SceneDelegate
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let url = userActivity.webpageURL else {
return
}
handleUniversalLink(url)
}
# Simulator
xcrun simctl openurl booted "myapp://items/123"
# Device
# Open Safari and navigate to myapp://items/123
# Test AASA file
curl -I "https://yourapp.com/.well-known/apple-app-site-association"
# Should return Content-Type: application/json
# Validate with Apple
# Use Apple's tool or Branch.io validator
development
SwiftUI Layout protocol for custom container layouts including flow layouts, radial layouts, and animated transitions. Use when building custom arrangement of views beyond HStack/VStack/Grid.
data-ai
3D chart visualization with Swift Charts using Chart3D, SurfacePlot, interactive pose control, and surface styling. Use when creating 3D data visualizations.
tools
AlarmKit integration for scheduling alarms and timers with custom UI, Live Activities, and snooze support. Use when implementing alarm or timer features in iOS 18+ apps.
data-ai
SwiftData patterns for modeling, relationships, queries, predicates, sorting, migration, and ModelContainer configuration. Use when working with SwiftData persistence.