drizzle
Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the `@internal/dashboard-agent-db` package…
Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions / SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer),
$ npx -y skills add triggerdotdev/trigger.dev --skill trigger-chat-agent-advanced --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/trigger-chat-agent-advancedContext preview
The summary Claude sees to decide when to auto-load this skill.
Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions / SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer),
name: trigger-chat-agent-advanced
description: >
Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when
working on the raw Sessions primitive (sessions / SessionHandle), a custom chat transport or the
realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer), human-in-the-loop,
steering, actions, background injection (chat.defer / chat.inject), fast starts (preload, Head
Start via @trigger.dev/sdk/chat-server), context resilience (compaction, recovery boot, OOM, large
payloads), chat.local run-scoped state, offline testing with mockChatAgent, or prerelease/version
upgrades. For the everyday chat.agent({...}) definition and the useTriggerChatTransport happy path,
use the trigger-authoring-chat-agent skill instead.
type: core
library: trigger.devThe 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.
// Wrong - a cached re-POST silently drops basePayload.message; basePayload is trigger config, not a channel
await fetch("/api/v1/sessions", { method: "POST", body: JSON.stringify({ ...createBody }) });
// Correct - append to the session's input channel
await fetch(`/realtime/v1/sessions/${id}/in/append`, { method: "POST", body: JSON.stringify({ kind: "message", payload }) });body (session-scoped). The `x-trigger-jwt` response header is run-scoped and cannot subscribe.
crashes with `chat.local can only be modified after initialization`. Init in `onBoot`.
write inline before the model streams; reserve `chat.defer` for analytics, audit, cache warming.
the frontend supplies the answer via `addToolOutput` + `sendAutomaticallyWhen`.
`chat.agent({ tools })` (or pass to `convertToModelMessages(uiMessages, { tools })` in a custom agent) so `toModelOutput` re-applies on every turn.
chain problem; runtime strip helpers do not fix it. Keep schemas in an `ai` + `zod`-only module.
throws `ChatChunkTooLargeError`. Persist to your store, write the row first, then emit only an id.
closes the stream early. Use it only on reconnect-on-reload paths.
> Note on docs vocabulary: agent-side examples in some docs still use the legacy > `trigger:turn-complete` chunk type. That is the agent-emit vocabulary. A custom **reader** must > filter on the `trigger-control` header, not on `chunk.type`. > > MCP-driven agent chats (`list_agents`, `start_agent_chat`, `send_agent_message`, > `close_agent_chat`) are MCP server tools used from Claude Code / Cursor, not importable SDK > functions. See `/mcp-tools#agent-chat-tools`.
Sibling skills: **trigger-authoring-chat-agent** (the everyday `chat.agent({...})` happy path), **trigger-authoring-tasks** and **trigger-realtime-and-frontend** (task + frontend foundations).
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.
Repo: triggerdotdev/trigger.dev
Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the `@internal/dashboard-agent-db` package…
End-to-end smoke test for the public Errors HTTP API (error groups). Seeds failed runs into ClickHouse so the error materialized views populate, then drives…
Use when adding, modifying, or debugging OTel span timeline events in the trace view. Covers event structure, ClickHouse storage constraints, rendering in…
Use this skill when writing, designing, or optimizing Trigger.dev background tasks and workflows. This includes creating reliable async tasks, implementing AI…
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 streamText from the run argument…
Covers writing backend Trigger.dev tasks with @trigger.dev/sdk: defining task() and schemaTask(), the run function and its ctx, retries, waits, queues and…