trigger
БесплатноБез исполняемых скриптовНе проверенUse when building durable background tasks, AI agents, webhooks, or long-running workflows in TypeScript. Reach for this skill when you need to create tasks…
от triggerdotdev★ 16 856 звёзд на GitHubОб этом скилле
Trigger.dev Skill
Product summary
Trigger.dev is an open-source platform for building and running durable AI agents and workflows in TypeScript. Tasks run on Trigger.dev infrastructure (not inside your serverless functions), so they have no execution timeout and include built-in retries, queues, waits, full tracing, and elastic scaling. The core is Apache-2.0 licensed; use Trigger.dev Cloud or self-host.
Key files and commands:
trigger.config.ts— project configuration (task directories, retries, build settings, telemetry)/triggerdirectory — where tasks and agents livenpx trigger.dev@latest init— initialize a projectnpx trigger.dev@latest dev— run tasks locallynpx trigger.dev@latest deploy --env prod— deploy to production@trigger.dev/sdk— main SDK package;@trigger.dev/sdk/aifor agents
Primary docs: https://trigger.dev/docs
When to use
Use this skill when:
- Building background jobs, scheduled tasks, or long-running workflows that need to survive failures and retries
- Creating durable multi-turn AI chat agents with
chat.agent()that persist across page refreshes and deploys - Receiving webhooks from Stripe, GitHub, Linear, or 40+ other providers on hosted, verified endpoints
- Triggering tasks from your backend, frontend, or from inside other tasks
- Implementing human-in-the-loop workflows with approvals or waits
- Needing full observability: logs, traces, spans, and run history in the dashboard
- Building agents that need to pause and resume (waiting for external events, user approval, or time delays)
Do not use for: simple synchronous API calls, authentication setup, or dashboard-only operations.
Quick reference
Task definition
import { task } from "@trigger.dev/sdk";
export const myTask = task({
id: "my-task", // Unique identifier
retry: { maxAttempts: 3 }, // Retry config (optional)
concurrency: { total: 1 }, // Concurrency limit (optional)
machine: { preset: "large-1x" }, // CPU/RAM (optional)
maxDuration: 300, // Max seconds (optional)
run: async (payload, { ctx }) => {
// Your code here; no timeout
return { result: "data" };
},
});
Triggering tasks
| Context | Method | Type safety |
|---|---|---|
| Backend code | tasks.trigger("task-id", payload) |
Type-only import |
| Backend code | myTask.trigger(payload) |
Full import |
| Inside task | childTask.trigger(payload) |
Full import |
| Inside task | childTask.triggerAndWait(payload) |
Wait for result |
| Inside task | childTask.batchTriggerAndWait([...]) |
Fan-out pattern |
| Frontend | React hook useTrigger() |
Type-safe |
Webhook endpoints
import { webhooks, webhook } from "@trigger.dev/sdk";
export const stripe = webhooks.endpoint.define({
id: "stripe",
source: webhooks.stripe(),
});
export const fulfillOrder = webhook({
id: "fulfill-order",
endpoint: stripe,
filter: "event.type == 'checkout.session.completed'",
onEvent: async ({ event }) => { /* ... */ },
});
Chat agents
import { chat } from "@trigger.dev/sdk/ai";
import { anthropic } from "@ai-sdk/anthropic";
export const supportAgent = chat.agent({
id: "support-agent",
run: async ({ messages, signal, streamText }) =>
streamText({
model: anthropic("claude-sonnet-5-5"),
messages,
abortSignal: signal,
}),
});
CLI commands
| Command | Purpose |
|---|---|
trigger dev |
Run tasks locally; watches for changes |
trigger deploy --env prod |
Deploy to production |
trigger deploy --env staging |
Deploy to staging |
trigger tasks trigger <id> |
Trigger a task from CLI |
trigger env list |
List environment variables |
trigger login |
Authenticate with Trigger.dev |
Configuration options (trigger.config.ts)
defineConfig({
project: "<project-ref>",
dirs: ["./trigger"],
retries: { default: { maxAttempts: 3 } },
machine: "large-1x", // Default machine
maxDuration: 300, // Default max duration
ttl: "1h", // Default run TTL
runtime: "node", // or "bun-1.4"
build: {
external: ["sharp", "wasm-pkg"],
minify: false,
},
telemetry: {
instrumentations: [/* ... */],
},
});
Decision guidance
When to use X vs Y
| Scenario | Use | Why |
|---|---|---|
| Task in same codebase | myTask.trigger() |
Full type safety, direct import |
| Task in separate service | tasks.trigger("id", payload) |
Avoids bundling task code |
| Need result immediately | triggerAndWait() |
Blocks until child completes |
| Fan-out to many tasks | batchTriggerAndWait() |
Parallel execution, single wait |
| Webhook from provider | webhooks.endpoint.define() |
Hosted URL, verified, 40+ providers |
| Webhook from your app | tasks.trigger() from handler |
Full control, no hosted endpoint |
| Chat with streami |
Установить trigger в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл trigger?
Use when building durable background tasks, AI agents, webhooks, or long-running workflows in TypeScript. Reach for this skill when you need to create tasks that survive failures, handle retries, run on schedules, receive webhooks, or build multi-turn AI chat agents.
Как установить скилл trigger?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл trigger запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic