drizzle
Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the…
Trigger.dev client/frontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev/react-hooks hook useRealtimeRun), consume metadata and AI/text streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger,
Claude Code
$ npx -y skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend --agent claude-code
Codex
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a codex -y
Cursor
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a cursor -y
Gemini CLI
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a gemini-cli -y
GitHub Copilot
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a github-copilot -y
OpenCode
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a opencode -y
Windsurf
$ npx skills add triggerdotdev/trigger.dev --skill trigger-realtime-and-frontend -a windsurf -y
name: trigger-realtime-and-frontend description: > Trigger.dev client/frontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev/react-hooks hook useRealtimeRun), consume metadata and AI/text streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger, useRealtimeTaskTrigger), and mint scoped frontend credentials with auth.createPublicToken / auth.createTriggerPublicToken. Load when wiring a frontend (React/Next.js/Remix) or backend-for-frontend to show live run progress, status badges, token streams, trigger buttons, or wait-token approval UIs. NOT for writing the backend task itself (streams.define / metadata.set is trigger-authoring-tasks territory); this is the consumer side. type: core library: trigger.dev
The full, version-pinned reference ships **inside your installed `@trigger.dev/sdk`**. Read it before writing code — it always matches the SDK version in this project, so it never drifts:
If those paths don't exist, `@trigger.dev/sdk` isn't installed yet — install it first. In a non-hoisted layout, resolve the package with `node -p "require.resolve('@trigger.dev/sdk/package.json')"` and read `skills/` + `docs/` beside it.
1. **CRITICAL: Triggering from the browser with a Public Access Token.** The read token from `createPublicToken` cannot trigger tasks.
2. **Token with no scopes.** A scopeless token authorizes nothing, so every subscribe 403s.
3. **Polling with `useRun`/SWR for live updates.** `useRun` is the SWR-based management-API hook (not recommended for live state); set `refreshInterval: 0` to stop polling if you do use it.
4. **Forgetting `"use client"`.** Realtime/trigger hooks cannot run in a server component.
5. **Shipping `payload`/`output` you do not render.**
6. **Subscribing before the handle exists.**
Sibling skills: **trigger-authoring-tasks** (the task side: `streams.define()`, `metadata.set()`, `wait.createToken`), **trigger-authoring-chat-agent** and **trigger-chat-agent-advanced** (chat agents build on these realtime streams).
The quickest way to get started is to create an account and project in our web app, and follow the instructions in the onboarding. Build and deploy your first task in minutes.
Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the…
End-to-end smoke test for the public Errors HTTP API (error groups). Seeds failed runs into ClickHouse so the error materialized…
Use when adding, modifying, or debugging OTel span timeline events in the trace view. Covers event structure, ClickHouse storage…
Use this skill when writing, designing, or optimizing Trigger.dev background tasks and workflows. This includes creating reliable…
Author and run a durable AI chat agent with chat.agent from @trigger.dev/sdk/ai: the per-turn run loop, why you MUST take…
Covers writing backend Trigger.dev tasks with @trigger.dev/sdk: defining task() and schemaTask(), the run function and its ctx,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.