Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →

triggerdotdev/skills

6 skills12.6k installs180 starsGitHub

Install

npx skills add https://github.com/triggerdotdev/skills

Skills in this repo

1Trigger Taskstrigger-tasks teaches building durable background jobs with Trigger.dev using the modern @trigger.dev/sdk, never deprecated client.defineJob. Critical rules require checking result.ok before reading triggerAndWait output, avoiding Promise.all with triggerAndWait or wait calls, and exporting tasks from the trigger directory. Basic tasks configure retry maxAttempts, factor, and timeout bounds; schemaTask adds Zod-validated payloads. Triggering covers tasks.trigger fire-and-forget, batchTrigger up to 1000 items, and parent-child triggerAndWait with unwrap shortcuts. Waits support seconds, minutes, until dates, and forToken external approvals with checkpointing beyond five seconds. Queues provide shared concurrencyLimit pools and per-tenant trigger-time queue names. Additional patterns include debouncing rapid triggers, idempotencyKeys for payments, catchError custom retry scheduling, schedules.task cron with timezones, dynamic schedules.create for tenants, metadata progress tracking, tags, and machine presets from micro to large-2x. Best practices stress idempotent tasks, queue protection for external APIs, exponential backoff retries, metadata on long jobs, debouncing webhook bursts.2.4kinstalls2Trigger ConfigThe trigger-config skill documents Trigger.dev project setup through trigger.config.ts with runtime selection, retry policies, and build.extensions for deployment-only capabilities. Core defineConfig fields cover project ref, task dirs, log level, and default machine sizing with maxDuration limits. Extension recipes include prismaExtension with migrate and directUrlEnvVarName, Playwright and Puppeteer browser bundles, ffmpeg media processing, pythonExtension with requirements files, aptGet system packages, additionalFiles asset copying, and syncEnvVars for dynamic secrets per environment. Combination templates show full-stack web apps, AI and ML Python plus ffmpeg stacks, and Playwright scraping setups. Global lifecycle hooks onStartAttempt, onSuccess, and onFailure add observability around task runs. Best practices recommend pinning versions, using syncEnvVars for secrets, listing native modules in build.external, and debugging with log-level debug and dry-run flags because extensions affect deployment rather than local dev.2.2kinstalls3Trigger AgentsThe trigger-agents skill documents production AI agent patterns on Trigger.dev durable execution, mapping needs to prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer loops, waitpoints, streams, and ai.tool integrations. Prompt chaining runs sequential generateText steps with validation gates that throw before later steps execute. Routing uses a cheap classifier model to pick gpt-4o versus o1-mini handlers per question complexity. Parallelization triggers independent tasks with batch.triggerByTaskAndWait for sentiment, summary, and moderation pipelines. Orchestrator-workers fan out claim verification after an extract step and fan in typed results with ok guards. Evaluator-optimizer recursively refines translations until an APPROVED evaluation or max attempts. Error handling iterates batch runs checking run.ok, run.error, and taskIdentifier for partial failures. References point to waitpoints for human approval, streaming for frontend progress, ai.tool for LLM-callable tasks, and orchestration advanced batch patterns.2.2kinstalls4Trigger SetupGet Trigger dev running in your project in minutes Adding Trigger dev to an existing project Creating your first task Setting up trigger config ts Connecting to Trigger dev cloud Node js 18 or Bun A Trigger dev account https cloud trigger dev This creates trigger config ts project configuration trigger directory where your tasks live trigger example ts a sample task ts import defineConfig from trigger dev sdk The trigger setup agent skill provides documented workflows prerequisites triggers and safety guidance from its SKILL md source Agents load it when user requests match the description and follow step by step instructions without inventing capabilities It integrates with standard agent tooling for the tasks inputs outputs and failure modes described in the repository documentation2.1kinstalls5Trigger RealtimeSubscribe to task runs and stream data in real time from frontend and backend Building progress indicators for long running tasks Creating live dashboards showing task status Streaming AI LLM responses to the UI React components that trigger and monitor tasks Waiting for user approval in tasks ts import auth from trigger dev sdk Read only token for specific runs const publicToken await auth createPublicToken scopes read runs run_123 tasks my task expirationTime 1h Create Trigger Token for frontend triggering The trigger realtime agent skill provides documented workflows prerequisites triggers and safety guidance from its SKILL md source Agents load it when user requests match the description and follow step by step instructions without inventing capabilities It integrates with standard agent tooling for the tasks inputs outputs and failure modes described in the repository documentation2.1kinstalls6Trigger Cost SavingsThe trigger-cost-savings skill analyzes Trigger.dev tasks, schedules, and runs for spend reduction using MCP tools list_runs, get_run_details, and get_current_worker when available. Without MCP, instruct users to run npx trigger.dev@latest install-mcp before live run analysis; static code scanning still proceeds for task file issues. Fetches latest guidance from trigger.dev/docs/how-to-reduce-your-spend with fallback to references/cost-reduction.md. Workflow covers static analysis of task files for machine size, concurrency, retry, and schedule patterns plus live run review for duration outliers and failed retry loops. Invoke when asked to reduce Trigger.dev spend, optimize costs, audit usage, right-size machines, or review task efficiency. Requires Trigger.dev MCP for live run analysis. Static scan of task files when MCP unavailable. Fetches latest cost reduction docs from Trigger.dev. Analyzes machine size, concurrency, retries, and schedules.1.6kinstalls

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.

triggerdotdev/skills · 6 skills · Skillselion