trigger-config
Configure Trigger.dev projects with trigger.config.ts. Use when setting up build extensions for Prisma, Playwright, FFmpeg, Python, or customizing deployment settings.
What this skill does
# Trigger.dev Configuration
Configure your Trigger.dev project with `trigger.config.ts` and build extensions.
## When to Use
- Setting up a new Trigger.dev project
- Adding database support (Prisma, TypeORM)
- Configuring browser automation (Playwright, Puppeteer)
- Adding media processing (FFmpeg)
- Running Python scripts from tasks
- Syncing environment variables
- Installing system packages
## Basic Configuration
```ts
// trigger.config.ts
import { defineConfig } from "@trigger.dev/sdk";
export default defineConfig({
project: "<project-ref>",
dirs: ["./trigger"],
runtime: "node", // "node", "node-22", or "bun"
logLevel: "info",
retries: {
enabledInDev: false,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
},
},
build: {
extensions: [], // Add extensions here
},
});
```
## Common Build Extensions
### Prisma
```ts
import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
export default defineConfig({
// ...
build: {
extensions: [
prismaExtension({
schema: "prisma/schema.prisma",
migrate: true,
directUrlEnvVarName: "DIRECT_DATABASE_URL",
}),
],
},
});
```
### Playwright (Browser Automation)
```ts
import { playwright } from "@trigger.dev/build/extensions/playwright";
extensions: [
playwright({
browsers: ["chromium"], // or ["chromium", "firefox", "webkit"]
}),
]
```
### Puppeteer
```ts
import { puppeteer } from "@trigger.dev/build/extensions/puppeteer";
extensions: [puppeteer()]
// Set env var: PUPPETEER_EXECUTABLE_PATH="/usr/bin/google-chrome-stable"
```
### FFmpeg (Media Processing)
```ts
import { ffmpeg } from "@trigger.dev/build/extensions/core";
extensions: [
ffmpeg({ version: "7" }),
]
// Automatically sets FFMPEG_PATH and FFPROBE_PATH
```
### Python
```ts
import { pythonExtension } from "@trigger.dev/build/extensions/python";
extensions: [
pythonExtension({
scripts: ["./python/**/*.py"],
requirementsFile: "./requirements.txt",
devPythonBinaryPath: ".venv/bin/python",
}),
]
// Usage in tasks:
const result = await python.runScript("./python/process.py", ["arg1"]);
```
### System Packages (apt-get)
```ts
import { aptGet } from "@trigger.dev/build/extensions/core";
extensions: [
aptGet({
packages: ["imagemagick", "curl"],
}),
]
```
### Additional Files
```ts
import { additionalFiles } from "@trigger.dev/build/extensions/core";
extensions: [
additionalFiles({
files: ["./assets/**", "./templates/**"],
}),
]
```
### Environment Variable Sync
```ts
import { syncEnvVars } from "@trigger.dev/build/extensions/core";
extensions: [
syncEnvVars(async (ctx) => {
return [
{ name: "API_KEY", value: await getSecret(ctx.environment) },
{ name: "ENV", value: ctx.environment },
];
}),
]
```
## Common Extension Combinations
### Full-Stack Web App
```ts
extensions: [
prismaExtension({ schema: "prisma/schema.prisma", migrate: true }),
additionalFiles({ files: ["./assets/**"] }),
syncEnvVars(async (ctx) => [...envVars]),
]
```
### AI/ML Processing
```ts
extensions: [
pythonExtension({
scripts: ["./ai/**/*.py"],
requirementsFile: "./requirements.txt",
}),
ffmpeg({ version: "7" }),
]
```
### Web Scraping
```ts
extensions: [
playwright({ browsers: ["chromium"] }),
additionalFiles({ files: ["./selectors.json"] }),
]
```
## Global Lifecycle Hooks
```ts
export default defineConfig({
// ...
onStartAttempt: async ({ payload, ctx }) => {
console.log("Task starting:", ctx.task.id);
},
onSuccess: async ({ payload, output, ctx }) => {
console.log("Task succeeded");
},
onFailure: async ({ payload, error, ctx }) => {
console.error("Task failed:", error);
},
});
```
## Machine Defaults
```ts
export default defineConfig({
// ...
defaultMachine: "medium-1x",
maxDuration: 300, // seconds
});
```
## Telemetry Integration
```ts
import { PrismaInstrumentation } from "@prisma/instrumentation";
export default defineConfig({
// ...
telemetry: {
instrumentations: [new PrismaInstrumentation()],
},
});
```
## Best Practices
1. **Pin versions** for reproducible builds
2. **Use `syncEnvVars`** for dynamic secrets
3. **Add native modules** to `build.external` array
4. **Debug with** `--log-level debug --dry-run`
Extensions only affect deployment, not local development.
See `references/config.md` for complete documentation.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.