capacitor-deep-linking
Implements and debugs deep links in Capacitor apps - custom URL schemes, iOS Universal Links (apple-app-site-association, Associated Domains entitlement)…
Skill by Cap-go
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cap-go-capacitor-deep-linking
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 4
capacitorjs.com· found in codecodeload.github.com· found in install commanddeveloper.android.com· found in codedeveloper.apple.com· found in code
Files it touches
~/.claude/skills/capacitor-deep-linking
What's inside
- Skill name
capacitor-deep-linking- Description
- Implements and debugs deep links in Capacitor apps - custom URL schemes, iOS Universal Links (apple-app-site-association, Associated Domains entitlement), Android App Links (assetlinks.json, autoVerify), and routing via @capacitor/app `appUrlOpen` + `App.getLaunchUrl()`. Covers the Capacitor 8.5+ UIScene change where AppDelegate `application(_:open:options:)` and `continue userActivity` stop being called and custom handling must move to SceneDelegate, plus cold vs warm launch testing. Use when links open Safari/Chrome instead of the app, `appUrlOpen` never fires, the launch URL is lost on cold start, or OAuth redirects do not return to the app. Do not use for the full UIScene migration (capacitor-uiscene-migration), push notification taps (capacitor-push-notifications), or social login plugin setup (capacitor-plugins).
- License
- MIT
- Instructions
- 149 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (6)
- SKILL.md
- metadata.json
- android-app-links.md · references/
- ios-scene-delegate.md · references/
- ios-universal-links.md · references/
- routing-patterns.md · references/
SKILL.md (first lines)
# Deep Linking in Capacitor
Route custom-scheme links, iOS Universal Links, and Android App Links into the web app.
## When to Use
TRIGGER when:
- Adding `myapp://` schemes, Universal Links, or App Links to a Capacitor app
- Links open the browser instead of the app, or open the app but land on the home page
- `appUrlOpen` fires on warm open but the URL is missing on cold launch (or the reverse)
- Deep links broke after updating to Capacitor 8.5+ / adopting `SceneDelegate.swift`
- OAuth / magic-link / payment redirects must come back into the app
- `adb shell pm get-app-links` shows `none` or `1024` instead of `verified`
Do not use:
- Full AppDelegate -> SceneDelegate migration of an app: `capacitor-uiscene-migration`
- Notification tap routing: `capacitor-push-notifications`
- Native log capture while debugging: `ios-android-logs`
- Sign in with Apple / Google plugin config: `capacitor-plugins`
## Link Types
| Type | Platform | Format | Needs hosted file | Verified ownership |
|------|----------|--------|-------------------|--------------------|
| Custom scheme | both | `myapp://product/123` | no | no (any app can claim it) |
| Universal Links | iOS | `https://example.com/product/123` | `/.well-known/apple-app-site-association` | yes |
| App Links | Android 6+ | `https://example.com/product/123` | `/.well-known/assetlinks.json` | yes |
Prefer verified https links for anything security-sensitive (OAuth, magic links). Custom schemes can be hijacked by another app.
## Workflow
1. **Inspect first.** Read `capacitor.config.*`, `ios/App/App/Info.plist`, `ios/App/App/*.entitlements`, `ios/App/App/AppDelegate.swift`, `ios/App/App/SceneDelegate.swift` (if present), `android/app/src/main/AndroidManifest.xml`, and the `@capacitor/app` version in `package.json`.
2. **Decide the iOS lifecycle path.**
- `UIApplicationSceneManifest` present in Info.plist (Capacitor 8.5+ template or migrated app) -> URL events arrive in `SceneDelegate`. Any custom code in AppDelegate `application(_:open:options:)` or `application(_:continue:restorationHandler:)` is dead code. See [references/ios-scene-delegate.md](references/ios-scene-delegate.md).
- No scene manifest -> AppDelegate path still works on 8.5 core, but Xcode 27 / Capacitor 9 require the scene lifecycle. Hand the migration to `capacitor-uiscene-migration`.
3. **Install** `@capacitor/app` (`npm install @capacitor/app && npx cap sync`).
4. **Register the JS handler once, at app bootstrap** (before the router renders), using both `appUrlOpen` and `getLaunchUrl()`. See below.
5. **Configure platforms**: custom scheme (Info.plist `CFBundleURLTypes`, Android `<intent-filter>`), then verified links per platform:
- iOS Universal Links: [references/ios-universal-links.md](references/ios-universal-links.md)
- Android App Links: [references/android-app-links.md](references/android-app-links.md)
6. **Route** in the framework router: [references/routing-patterns.md](references/routing-patterns.md) (React, Vue, Angular, OAuth callbacks, deferred links).
7. **Verify** with the cold/warm matrix below on a real device.
Only load a reference when its topic is in play.
## JS Handler (the part every app needs)
```typescript
import { App, type URLOpenListenerEvent } from '@capacitor/app';
let lastHandled: string | undefined;
function route(rawUrl: string) {
if (rawUrl === lastHandled) return; // cold start can deliver the same URL to both paths
lastHandled = rawUrl;
const url = new URL(rawUrl);
// myapp://product/123 -> host "product", pathname "/123"
// https://example.com/product/123 -> pathname "/product/123"
const path = url.protocol.startsWith('http')
? url.pathname
: `/${url.host}${url.pathname}`;
router.navigate(path + url.search); // your router
}
export async function initDeepLinks() {
await App.addListener('appUrlOpen', (event: URLOpenListenerEvent) => route(event.url));
const launch = await App.getLaunchUrl(); // resolves undefined or { url }
if (launch?.url) route(launch.url);
}
```
Traps:
- Custom scheme URLs parse with the first segment as `host`, not `pathname`. Normalize both forms as above.
- Register the listener at bootstrap, not inside a lazily loaded page. A listener added after the event fired never sees it; `getLaunchUrl()` is the fallback for cold start.
- Wrap state updates from the listener in your framework's zone/run loop (Angular `NgZone.run`) or navigation silently does nothing.
- Dedupe: on cold start the URL can be reachable via both `getLaunchUrl()` and `appUrlOpen`.
- Validate and allow-list paths before navigating; a deep link is untrusted input.
## Custom Scheme Config
iOS `ios/App/App/Info.plist`:
```xml
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.example.app</string>
<key>CFBundleURLSchemes</key>
<array><string>myapp</string></array>
</dict>
</array>
```
Android `AndroidManifest.xml`, inside the existing `MainActivity` (keep the template's `android:launchMode="singleTask"` so warm opens reuse the activity):
```xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myapp" />
</intent-filter>
```
## Verification
Run every row on a physical device (Universal Links do not work reliably from the Simulator address bar; tap from Notes/Messages instead).
| Scenario | iOS | Android |
|----------|-----|---------|
| Custom scheme, warm | `xcrun simctl openurl booted "myapp://product/123"` | `adb shell am start -W -a android.intent.action.VIEW -d "myapp://product/123" com.example.app` |
| Custom scheme, cold | kill app, then same command | `adb shell am force-stop com.example.app`, then same command |
| Verified link, warm | tap `https://example.com/product/123` in Notes | `adb shell am start -W -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://example.com/product/123"` |
| Verified link, cold | swipe app away, tap link | force-stop, then same command |
| Ownership check | `curl -sI https://example.com/.well-known/apple-app-site-association` (200, no redirect) | `adb shell pm get-app-links com.example.app` shows `verified` |
Pass criteria: each case lands on the right route, `appUrlOpen` logs once, and on cold start `getLaunchUrl()` returns the URL. After a Capacitor 8.5 scene migration, re-run the full matrix: cold launch takes a different native path (`scene(_:willConnectTo:options:)`) than warm open (`scene(_:openURLContexts:)` / `scene(_:continue:)`).From Cap-go/capgo-skills, MIT.
More from Cap-go/capgo-skills
- 0.674score
capacitor-push-notifications
Cap-go
Sets up and debugs remote push in Capacitor apps with @capacitor/push-notifications (FCM on Android, APNs on iOS), or Capgo alternatives…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-accessibility
Cap-go
Makes Capacitor apps work with VoiceOver, TalkBack, Dynamic Type / Android font scale, Switch Control, hardware keyboards, Reduce Motion and Increase Contrast.
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-mcp
Cap-go
Connect AI agents (Claude Code, Claude Desktop, Cursor, VS Code, Cline, Codex) to Capacitor and Ionic tooling over Model Context Protocol.
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-offline-first
Cap-go
Designs and implements offline-first data in Capacitor apps - local SQLite source of truth with @capgo/capacitor-fast-sql (`FastSQL.connect`…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-plugin-spm-support
Cap-go
Adds Swift Package Manager support to an existing Capacitor plugin repository so apps using CapApp-SPM can consume it after CocoaPods Trunk goes read-only…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
cocoapods-to-spm
Cap-go
Migrates an existing Capacitor iOS app from CocoaPods to Swift Package Manager (SPM) before CocoaPods Trunk goes read-only (expected December 2, 2026).
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-testing
Cap-go
Testing guide for Capacitor apps and plugins.
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-best-practices
Cap-go
Review and set up Capacitor apps against current best practices (Capacitor 8.5 stable, 9 alpha via `@next`).
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-plugins
Cap-go
Pick, install, and wire up Capacitor plugins for native features (camera, filesystem, geolocation, biometrics, in-app purchases, social login, SQLite…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-app-intents
Cap-go
Exposes Capacitor app features to Siri, Shortcuts, Spotlight, the Action button, Apple Intelligence, widgets and controls with native App Intents in…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-splash-screen
Cap-go
Configures and debugs launch splash screens in Capacitor apps with @capacitor/splash-screen and @capacitor/assets - `launchAutoHide`, `SplashScreen.hide()`…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-performance
Cap-go
Diagnoses and fixes performance problems specific to Capacitor apps - slow cold start or long splash, white screen after camera/backgrounding (WKWebView…
SkillAFreshness: A★ 73Claude Code +9
Signals
- Stars
- 73
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Oct 11, 2026 (17 days ago)
- Last release
- Oct 11, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Cap-go/capgo-skills
- Website
- capgo.app
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Cap-go
- 0.674score
capacitor-best-practices
Cap-go
Review and set up Capacitor apps against current best practices (Capacitor 8.5 stable, 9 alpha via `@next`).
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-plugins
Cap-go
Pick, install, and wire up Capacitor plugins for native features (camera, filesystem, geolocation, biometrics, in-app purchases, social login, SQLite…
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-testing
Cap-go
Testing guide for Capacitor apps and plugins.
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
cocoapods-to-spm
Cap-go
Migrates an existing Capacitor iOS app from CocoaPods to Swift Package Manager (SPM) before CocoaPods Trunk goes read-only (expected December 2, 2026).
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-mcp
Cap-go
Connect AI agents (Claude Code, Claude Desktop, Cursor, VS Code, Cline, Codex) to Capacitor and Ionic tooling over Model Context Protocol.
SkillAFreshness: A★ 73Claude Code +9 - 0.674score
capacitor-app-intents
Cap-go
Exposes Capacitor app features to Siri, Shortcuts, Spotlight, the Action button, Apple Intelligence, widgets and controls with native App Intents in…
SkillAFreshness: A★ 73Claude Code +9
Cite this page
capacitor-deep-linking skill. Agent Mart. https://agentmart.dev/skills/cap-go-capacitor-deep-linking (last updated 2026-10-24)