Sample run · React Native and Expo · Hilltop Shoes, a sample app
/ 02PROMPTS· COPY, PASTE, CHECK
Set up with AI: one prompt per framework
Open your project in Claude Code, Cursor or another AI coding tool and paste the prompt for your framework. Each one points the assistant at the right docs page, keeps the secret key out of your app, and ends with checks you run yourself. Replace <your-handle> with your workspace handle and the key with your publishable key.
Add Strait deep links (and deferred deep links) to this React Native or Expo app.Read https://straitlink.in/docs/sdks/react-native/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 13 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: React Native and Expo
Add Strait deep links (and deferred deep links) to this React Native or Expo app.
Read https://straitlink.in/docs/sdks/react-native/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Route every link from the SDK's onLink callback (the event's path and params). Do not add a second deep-link handler for the link domain: with React Navigation, do not also list it in the linking option.
- If this is Expo, it needs a development build (npx expo run:android), not Expo Go. With Expo Router, subscribe in app/_layout.tsx once the root navigation state is ready, and add app/+native-intent.tsx as the docs show.
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the app: the Android App Links intent filter (autoVerify) for my link domain and my custom scheme, and the iPhone Associated Domain applinks:<your-handle>.strait.link (in Expo: scheme, android.intentFilters and ios.associatedDomains in app.json).
3. Create the client once with publishableKey and endpoint, call start() once at launch, and subscribe to onLink.
4. Map link paths to screens in this codebase.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- adb shell pm get-app-links <package> says verified after a fresh install
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Add Strait deep links (and deferred deep links) to this Flutter app.Read https://straitlink.in/docs/sdks/flutter/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 13 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Flutter
Add Strait deep links (and deferred deep links) to this Flutter app.
Read https://straitlink.in/docs/sdks/flutter/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Route every link from the SDK's onLink stream (the event's path and params). Do not add a second deep-link handler for the link domain.
- Pass the IANA time zone from flutter_timezone (like Asia/Kolkata), never DateTime.timeZoneName.
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the app: the Android App Links intent filter (autoVerify) for my link domain and my custom scheme, and the iPhone Associated Domain applinks:<your-handle>.strait.link.
3. Create the client once with publishableKey and endpoint, call start() once at launch, and subscribe to onLink.
4. Map link paths to screens in this codebase.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- adb shell pm get-app-links <package> says verified after a fresh install
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Add Strait deep links (and deferred deep links) to this Android app.Read https://straitlink.in/docs/sdks/android/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 13 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Android (Kotlin)
Add Strait deep links (and deferred deep links) to this Android app.
Read https://straitlink.in/docs/sdks/android/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Route every link from the SDK's onLink callback (the event's path and params). Do not add a second deep-link handler for the link domain.
- Create the client once in the Application class. Pass the launch intent to start() in onCreate and later intents to handleUrl() in onNewIntent.
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the app: an App Links intent filter (autoVerify) for my link domain and a second intent filter for my custom scheme, on a singleTask activity.
3. Create the client once with publishableKey and endpoint, call start() once at launch, and subscribe to onLink.
4. Map link paths to screens in this codebase.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- adb shell pm get-app-links <package> says verified after a fresh install
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Add Strait deep links (and deferred deep links) to this iOS app.Read https://straitlink.in/docs/sdks/ios/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 12 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: iOS (Swift)
Add Strait deep links (and deferred deep links) to this iOS app.
Read https://straitlink.in/docs/sdks/ios/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Route every link from the SDK's onLink callback (the event's path and params). Do not add a second deep-link handler for the link domain.
- iPhone links are live; install matching after an App Store install is opt-in (an Estimated match): tell me which parts need it switched on. With scenes, pass the launch URL to start(initialURL:).
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the app: the Associated Domains capability applinks:<your-handle>.strait.link, and my custom scheme under URL Types.
3. Create the client once with publishableKey and endpoint, call start() once at launch, and subscribe to onLink.
4. Map link paths to screens in this codebase.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Add Strait to this website or web app: count the visits my links bring and credit signups and purchases to the tap.Read https://straitlink.in/docs/sdks/web/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 10 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Web
Add Strait to this website or web app: count the visits my links bring and credit signups and purchases to the tap.
Read https://straitlink.in/docs/sdks/web/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Deferred links resolve inside the app, not on a website: do not add resolveDeferredLink (deprecated, it sends nothing and always answers matched: false). The link already opens its destination URL, so route on it as usual.
- Both calls never throw; do not wrap them in retries.
Steps:
1. Install the SDK with the command on that page.
2. Call reportWebOpen once on page load; it counts a visit from a tap (strait_click in the URL) as an open of that tap.
3. Send signups and purchases with trackEvent; it attaches the tap reportWebOpen saw.
Finish by telling me exactly how to check it:
- tapping a link on a computer opens the page with strait_click in its URL and the Network tab shows one POST /v1/open, and opening the page without strait_click sends nothing
Add Strait deep links (and deferred deep links) to this Capacitor or Ionic app.Read https://straitlink.in/docs/sdks/capacitor/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 13 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Capacitor and Ionic
Add Strait deep links (and deferred deep links) to this Capacitor or Ionic app.
Read https://straitlink.in/docs/sdks/capacitor/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Use the Strait Capacitor plugin (npm install @straitlink/capacitor, then npx cap sync). Route every link from its onLink callback; do not add an appUrlOpen handler for the link domain.
- iOS needs Swift Package Manager (the Capacitor 8 default); the plugin does not support CocoaPods yet.
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the app: in android/app/src/main/AndroidManifest.xml the App Links intent filter (autoVerify) for my link domain and one for my custom scheme, and in Xcode the Associated Domain applinks:<your-handle>.strait.link and my scheme under URL Types.
3. Create the client once with publishableKey and endpoint, call start() once at launch, and subscribe to onLink.
4. Map link paths to screens in this codebase.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- adb shell pm get-app-links <package> says verified after a fresh install
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Add Strait deep links (and deferred deep links) to this Unity game.Read https://straitlink.in/docs/sdks/unity/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
+ 14 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Unity
Add Strait deep links (and deferred deep links) to this Unity game.
Read https://straitlink.in/docs/sdks/unity/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link and my publishable key is st_pub_live_… (from Dashboard → Setup → Your keys: https://app.straitlink.in/setup#keys).
Rules:
- Use only the publishable key here. Never put a secret key (st_live_…) in app or website code.
- Install it from the git URL on that page with Window → Package Manager → Add package from git URL (keep ?path=src). It needs Api Compatibility Level .NET Standard 2.1.
- Device fields must be what the browser saw: use StraitCore.PortraitScreenWidth, never Screen.width. Call Start and HandleUrl from the main thread.
- The Unity glue on that page has not been run on a device yet: tell me to test on a real phone before shipping.
Steps:
1. Install the SDK with the command on that page.
2. Let the phone open the game: an App Links intent filter (autoVerify) for my link domain and one for my custom scheme in the Android manifest, and the Associated Domain applinks:<your-handle>.strait.link for iOS.
3. Add one MonoBehaviour that creates the client once (DontDestroyOnLoad) with PublishableKey, Endpoint, PlayerPrefs storage, DeviceFields and the Play install referrer on Android, subscribes to OnLink, hooks Application.deepLinkActivated to HandleUrl, and calls Start(Application.absoluteURL).
4. Route e.Path and e.Params to scenes or screens when e.Matched is true.
Finish by telling me exactly how to check it:
- curl https://<your-handle>.strait.link/.well-known/assetlinks.json and /.well-known/apple-app-site-association list my app
- adb shell pm get-app-links <package> says verified after a fresh install
- a tap from WhatsApp on a real phone opens the right screen and onLink fires with matched: true
Create Strait links from this backend (Node.js, Next.js API routes or server actions).Read https://straitlink.in/docs/sdks/node/ and follow it exactly. If anything here disagrees with that page, the page wins.My link domain is https://<your-handle>.strait.link. My secret key (st_live_…, from Dashboard → Settings → Keys: https://app.straitlink.in/settings#keys) is in the environment variable STRAIT_SECRET_KEY.
+ 12 more lines: rules, steps and checks on a real phone
Show the full promptPrompt: Server: create links (Node, Next.js)
Create Strait links from this backend (Node.js, Next.js API routes or server actions).
Read https://straitlink.in/docs/sdks/node/ and follow it exactly. If anything here disagrees with that page, the page wins.
My link domain is https://<your-handle>.strait.link. My secret key (st_live_…, from Dashboard → Settings → Keys: https://app.straitlink.in/settings#keys) is in the environment variable STRAIT_SECRET_KEY.
Rules:
- Read the secret key only from the environment. Never write it into code, a .env file you commit, logs, or anything sent to a browser or app.
- This is server code only. In Next.js keep it in route handlers, server actions or a file that imports "server-only"; it must never reach a client component or a NEXT_PUBLIC_ variable.
- Handle StraitError: 409 means the slug is taken in my workspace, 402 means a plan limit (existing links keep working).
Steps:
1. Install the SDK with the command on that page.
2. Create one client in a server-only module with apiKey from process.env.STRAIT_SECRET_KEY and baseUrl https://strait.link.
3. Add a server function that creates a link for a record in this app (createLink with a slug, an https longUrl and tags) and returns the shortUrl the API sends back. For many links, use POST /v1/links/batch (up to 500 per call) instead of a loop.
4. Where this app records purchases, send them with sendEvent, passing clickId only when I have one (for example from an app.opened or install.matched webhook).
Finish by telling me exactly how to check it:
- the function returns a shortUrl on https://<your-handle>.strait.link/… and the link shows in Dashboard → Links
- grep -r st_live_ over the client bundle (for example .next/static) finds nothing
/ 03DOCS· NO GUESSING
Docs your assistant can read
llms.txt: an index of these docs written for AI agents, with a one-line summary of every page and the rules an agent must follow.
A Markdown copy of every docs page: add .md to the page's address, for example https://straitlink.in/docs/quick-start.md. Every docs page also has "Open in Claude", "Open in ChatGPT" and "Open in Cursor" links.
AGENTS.md in every SDK repository tells an assistant how that SDK is meant to be used.
WRITTEN FOR AI ASSISTANTS TOO
What your assistant can read before it writes a line.
A skill teaches Claude Code how to add Strait to an app: how to tell which framework the project uses, the key rules, the install line for each SDK, the one onLink pattern, and the commands that prove it works. Claude Code loads it on its own when you ask for deep links.
Save it as .claude/skills/strait-setup/SKILL.md in your project (shared with your team through git), or in ~/.claude/skills/strait-setup/ for all your projects. It is generated from the same settings as these docs, so its install lines and versions match them.
Apps and websites use the publishable key (st_pub_live_…). The secret key (st_live_…) is for servers only.
Every link open reaches the app through one onLink callback, whether the app was closed, in the background, or just installed.
Android links that were tapped before the app was installed reach it through the Google Play install referrer. iPhone links are live; iPhone install matching is opt-in.
To create many links, use POST /v1/links/batch (up to 500 per call) instead of a loop.
The Strait MCP server, @straitlink/mcp on npm, lets your AI tool create links, read taps and installs, check your plan usage and webhooks, and check App Links files when you ask. It has 34 tools. Run it on your own computer, or connect to the hosted server at https://strait.link/mcp; either way it uses a secret key you keep in the tool's settings, never in an app. Tools that change a live link or resend a webhook show a preview and wait for your yes.
Add it to Claude Code
claude mcp add strait --env STRAIT_SECRET_KEY=st_live_your_key -- npx -y @straitlink/mcp
Cursor, Claude Desktop and Codex settings, the full tool list and what to ask: MCP server.
To set up an app without an AI tool, npx @straitlink/cli init writes the Strait setup file for a React Native, Expo, Flutter or Android app and prints the steps left: strait init.