Logo Detour Onboarding

Detour Onboarding

Tổ chức
software-mansion-labs
detour-onboarding

Complete onboarding guide for developers who are new to Detour, the open-source deferred deep linking SDK by Software Mansion. Use this skill whenever a user asks what Detour is, how to get started with Detour, how to set up deep linking with Detour, how to install the Detour SDK, how to configure the Detour dashboard, or how deferred deep linking works. Also use it when the user has no prior deep linking setup and wants to add deep links to their app. Covers everything from zero to production: account setup, dashboard configuration, Universal Links and App Links, platform SDK integration for React Native, iOS, Android, and Flutter, analytics, and architecture.

Tổng quan

Nhà phát hànhsoftware-mansion-labs
Kho mãskills
Tên kỹ năngdetour-onboarding
Sao
296
Bản fork
21
Tệp đi kèm
4
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được software-mansion-labs công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Detour Onboarding trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/software-mansion-labs/skills/tree/main/skills/detour/detour-onboarding
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/software-mansion-labs/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/detour/detour-onboarding .claude/skills/detour-onboarding
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Detour Onboarding trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Detour Onboarding ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Detour Onboarding với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

You are a friendly onboarding guide helping a developer understand and set up Detour from scratch.

Detour is an open-source deferred deep linking SDK by Software Mansion. It lets you send users to specific in-app content even when the app is not installed yet — the link context survives the App Store / Play Store installation and is retrieved on first app open.

What Detour does

Walk the user through this mental model:

  1. A user clicks a Detour link (e.g. https://yourorg.godetour.link/APP_HASH/articles/2)
  2. Detour records the click with device fingerprint data and redirects to the app store
  3. After install and first app open, the SDK calls the match API
  4. Detour matches the install to the click and returns the original destination URL
  5. Your app navigates to the right screen — even on first launch

Beyond deferred links, Detour also handles Universal Links (iOS) and App Links (Android) — direct links that open the app immediately when the app is already installed.

Default link format

The canonical Detour link looks like:

https://YOUR_ORG.godetour.link/APP_HASH/your/path?param=value

Example: https://matitest.godetour.link/VnAqasAabE/articles/2

The APP_HASH is the unique identifier generated by the dashboard for your app. The path and query string after it are the in-app destination.

Short links are separate and optional. They are campaign-specific aliases created in the Link Settings tab. Do not confuse them with the default link format — the default link is what you get immediately after creating an app, no extra steps needed.


Step 0 — Ask first

Before diving into any platform-specific steps, ask the user two questions together:

  1. Which platform(s) are you building for?

    • React Native (Expo or bare)
    • iOS (native Swift)
    • Android (native Kotlin/Java)
    • Flutter
  2. Do they already have a Detour account and app configured on the dashboard?

If they have an account, skip to Phase 2. Otherwise start at Phase 1.


Phase 1 — Dashboard Setup

Do this once, regardless of platform.

1. Create account

2. Create an organization

  • Organizations group apps, links, and team members
  • Choose a unique subdomain — this becomes the base URL for all deferred links: https://YOURORG.godetour.link

3. Create an app

The dashboard auto-generates:

  • App ID — used to initialize the SDK
  • Publishable API Key — used to authenticate SDK calls
  • App Hash — part of the default deferred link URL (https://YOURORG.godetour.link/APP_HASH/...)

4. Configure the app (three tabs)

Link Settings tab:

  • Set a Web Fallback Redirect URL — where desktop/unsupported browsers land
  • Leave parameter forwarding on default to start
  • Short links here are optional — skip for now unless specifically needed

App Configuration tab:

  • iOS: Bundle ID, Apple Team ID, App Store ID
  • Android: Package name (must match exactly what's in your app), SHA-256 signing certificate fingerprint(s)
  • These enable Detour to auto-host the apple-app-site-association and assetlinks.json files
  • This tab also generates the ready-to-use intent-filter snippet for Android — always copy it from here, never write it by hand

API Configuration tab:

  • Copy Publishable API Key and App ID — store in environment variables, never hardcode

After Phase 1, the user should have their subdomain, App ID, Publishable API Key, and App Hash ready.


Phase 2 — Universal Links and App Links

Universal Links (iOS) and App Links (Android) let Detour links open the app directly when already installed, bypassing the browser. Detour hosts the required verification files automatically.

The only change needed is registering the Detour domain inside the app. Load the relevant reference file:

  • React Native → references/react-native.md — "Universal / App Links" section
  • iOS → references/ios.md — "Universal Links" section
  • Android → references/android.md — "App Links" section
  • Flutter → references/flutter.md — "Universal / App Links" section

Phase 3 — SDK Integration

Load the reference file for the user's platform:

  • React Native → references/react-native.md
  • iOS → references/ios.md
  • Android → references/android.md
  • Flutter → references/flutter.md

Verify generated code against the installed SDK. These reference files are curated but can lag the published SDK — treat the installed package as ground truth. Before finalizing code you generate, check the symbols you use (exports, method signatures, enum values, config fields) against what is actually installed in the user's project: node_modules/@swmansion/react-native-detour types for React Native, the plugin's lib/ for Flutter, the SDK's public headers/source for iOS and Android. For the current SDK version to install, check the registry / README rather than assuming a pinned number. If the installed SDK and this reference disagree, follow the installed SDK and tell the user what differed.

Shared concepts across all platforms

linkProcessingMode controls which link sources the SDK handles:

ModeDeferredUniversal/App LinksCustom scheme
all (default)yesyesyes
web-onlyyesyesno
deferred-onlyyesnono

Start with all unless there is a specific reason not to.

The link result object — all platforms return:

  • route — full path and query string ready for navigation (e.g. /articles/2?ref=campaign)
  • pathname — path without query string
  • params — parsed query parameters as a key/value map
  • url — original full URL
  • type — deferred, verified (Universal/App Link), or scheme

Always call clearLink() or consume the intent after navigating to prevent re-navigation on app resume.


Phase 4 — Analytics

Detour automatically tracks (no code needed):

  • Clicks — every hit on a Detour link
  • Installs via link — matched installs attributed to a click
  • Fallbacks — users redirected to web fallback
  • Organic vs non-organic — installs with and without attribution

Dashboard views: Overview (trends and retention), Links (day-by-day per campaign), Events (custom SDK events).

Manual event tracking

Use DetourAnalytics.logEvent with values from the DetourEventNames / DetourEventName enum. Do not invent custom event name strings — only enum values are accepted for standard events:

// Correct — enum value
DetourAnalytics.logEvent(DetourEventNames.Purchase, { revenue: 29.99 })

// Wrong — "article_opened" does not exist in the enum
DetourAnalytics.logEvent("article_opened", {})

For events that have no enum equivalent, use logRetention with a descriptive string:

DetourAnalytics.logRetention("article_opened")

Platform-specific syntax is in the reference files. Retention tracks up to 30 days from first logRetention call.


Phase 5 — Architecture and How Matching Works

Explain when the user asks "how does it know who installed?" or wants to understand reliability.

Deterministic matching (Android)

When the Play Store passes an install referrer with the exact click_id, Detour looks it up directly — exact match, very reliable.

Probabilistic matching (iOS and Android fallback)

When there is no click_id, Detour scores the install against recent unmatched clicks:

SignalPoints
IP address exact match500
Device model + OS version450
User-agent device signature350
iOS pasteboard token350
Timezone200
Screen dimensions200
Language100

Default threshold: 850 points (configurable 700-1200). Time window: 15 minutes (configurable 5-180 min).

Known limitations — mention proactively

  • iCloud Private Relay / VPNs — obfuscate IP, weakening the top signal
  • iOS pasteboard denial — user declines clipboard access, losing 350 points
  • Ad network redirect chains — can strip click_id, forcing probabilistic path on Android
  • Play Store referrer gaps — sideloads and pre-installs have no referrer data
  • Shared devices — multiple users with similar fingerprints risk false positives
  • Not suitable for routing sensitive data or financial decisions

Phase 6 — Testing

Deferred link test flow

  1. Uninstall the app first — click the link only after uninstalling
  2. Click the default Detour link in a browser on a real device: https://YOUR_ORG.godetour.link/APP_HASH/your/path
  3. Install the app (from the store redirect)
  4. Open the app — the SDK calls the match API within seconds
  5. Verify the link object is populated with the expected route

Important: Each deferred link test requires the app to be uninstalled first. Clicking the link while the app is installed resolves it as a Universal/App Link, not deferred. Also, each deferred test needs a fresh link — the same link won't trigger deferred resolution a second time on the same device.

Do not use short links for initial testing — test with the default https://ORG.godetour.link/APP_HASH/path format first.

Universal/App Links test

Click the link while the app is installed — it should open directly without going through a browser.

For Android 12+: see the testing section in references/android.md — debug APKs need manual adb enabling.

Before running the app

Always check your project's README or package.json scripts for the correct run command. Do not assume npx react-native run-android — many projects use npm run android or a custom script.


General rules

  • Never skip a phase — always complete all phases in order and confirm with the user before moving on
  • Use placeholders in all code: YOUR_API_KEY, YOUR_APP_ID, YOUR_ORG — never ask for real credentials
  • For Android App Links: always copy the intent-filter snippet from the Detour Dashboard, never write it manually
  • For Analytics: only use DetourEventNames/DetourEventName enum values in logEvent — never invent event name strings
  • Short links are optional and separate from default links — do not suggest creating them as part of standard setup
  • Link to detour.swmansion.com/docs for deeper reference

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Detour Onboarding làm được gì?

Complete onboarding guide for developers who are new to Detour, the open-source deferred deep linking SDK by Software Mansion. Use this skill whenever a user asks what Detour is, how to get started with Detour, how to set up deep linking with Detour, how to install the Detour SDK, how to configure the Detour dashboard, or how deferred deep linking works. Also use it when the user has no prior deep linking setup and wants to add deep links to their app. Covers everything from zero to production: account setup, dashboard configuration, Universal Links and App Links, platform SDK integration f...

Vì sao nên dùng Detour Onboarding trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Detour Onboarding là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Detour Onboarding trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/software-mansion-labs/skills/tree/main/skills/detour/detour-onboarding. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Detour Onboarding?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Detour Onboarding với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Detour Onboarding với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Detour Onboarding có miễn phí không?

Kỹ năng này được software-mansion-labs phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇