tiun-sdklisted
Install: claude install-skill SunrisesIllNeverSee/sigrank-app
# tiun SDK skill
Use this skill whenever the user is integrating, extending, or debugging code that uses `@tiun/sdk`. Authoritative upstream docs: https://docs.tiun.io/llms-full.txt.
## What tiun is
A commercial backend platform providing authentication, payments, and entitlements through a single JS SDK. The `tiun` singleton supports three flows; you pick based on the integrator's intent (see "Step 0 — Discovery before code"):
- **Subscriptions** — persistent user accounts (OTP login), recurring billing, per-product entitlements in `user.productAccess[]`. Entry point: `tiun.checkout({ productId })`. See [references/subscriptions.md](references/subscriptions.md).
- **One-time purchases** — same accounts and same entry point as subscriptions, but a single **fixed fee** and **permanent** entitlement: no interval, no trial, no renewal, no expiry. Entry point: `tiun.checkout({ productId })`. See [references/one-time.md](references/one-time.md).
- **Time-based** — per-session anonymous access (no account required), metered by time spent on paid content. Entry point: `tiun.start()` + `paywallShow` / `paywallHide` events. See [references/time-based.md](references/time-based.md).
Install: `npm install @tiun/sdk`. Init: `tiun.init({ snippetId, language: 'en' })` on app start (idempotent).
tiun runs **live and sandbox as two independent parallel environments**. The SDK's `sandbox` flag selects which one — see [references/installation.md](references/installation.md).
## Step 0 —