Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
Contributors/Mark Carr/Agentic workflow builder
Agentic workflows

Agentic workflow builder

Build "agentic workflows" — code-native automations where Claude writes the integration code (APIs, dedupe, polling, error handling) on a durable runtime like trigger.dev, replacing the n8n/Make/Zapier drag-and-drop approach. Invoke when the user says "build an automation / agent / workflow that [triggers on X] and [does Y]", wants to replace an n8n/Make flow with code, or asks to scaffold a scheduled poller or task-triggered agent.

ByMark CarrBuilder @ Full Service Pros
name:
agentic-workflow-builder
description:
Build "agentic workflows" — code-native automations where Claude writes the integration code (APIs, dedupe, polling, error handling) on a durable runtime like trigger.dev, replacing the n8n/Make/Zapier drag-and-drop approach. Invoke when the user says "build an automation / agent / workflow that [triggers on X] and [does Y]", wants to replace an n8n/Make flow with code, or asks to scaffold a scheduled poller or task-triggered agent.

agentic-workflow-builder

Turns a natural-language automation request into a working trigger.dev task (or pair of tasks) with the right defaults for scheduling, idempotency, tool-using agent loops, polling external APIs, observability, and deployment.

Origin: Stop Learning n8n in 2026…Learn THIS Instead. Thesis: drag-and-drop automation is becoming the slow path. Describing the outcome in plain English and letting Claude Code generate the trigger.dev code is now faster for most real workflows — especially once you factor in dedupe, multi-step agent logic, and long-running polls.

When to invoke

Triggers:

  • "Build an automation/agent/workflow that [verb] every [interval]…"
  • "Watch [system] for [event] and then [action]…"
  • "I want to replace this n8n/Make/Zapier flow with code"
  • "Scaffold a scheduled poller" or "scaffold a task-triggered agent"
  • User drops a ClickUp/Linear/Notion/Slack URL and says "when something happens there, do X"

Do NOT invoke for: one-shot scripts, pure data analysis, or UI work. Those don't need a durable runtime.

The two reusable shapes

Almost every automation in the video collapses to one of two patterns:

  1. Scheduled poller — cron fires → fetch source → filter out already-processed items via idempotency key → for each new item, trigger a worker task. See patterns/scheduled-poller.md.
  2. Task-triggered agent — external event (ClickUp task, webhook, email) → poller sees it → triggers an agent with a small toolset (search_web, read_url, domain tools, finish) → agent loops until done → posts result back to the source system. See patterns/task-triggered-agent.md.

When in doubt, ask the user which shape fits. Most "check X every Y and do Z" requests are #1. Most "when someone does X in [SaaS tool]" requests are #2.

Workflow (run this, in order)

1. Clarify the outcome (plan mode, always)

Before writing a line of code, confirm:

  • Trigger — cron interval, webhook, manual task creation, something else?
  • Source — where does data come from? (YouTube channel, ClickUp list, RSS, API, inbox)
  • Unit of work — what's one "item"? (one video, one task, one row) → this is the idempotency key
  • Agent tools — does it need to browse the web, call APIs, generate images, write files?
  • Output destination — where does the result land? (ClickUp comment, Slack message, Notion page, email)
  • Failure mode — what should happen when the agent fails? Retry? Ping a human?

Ask these as a single AskUserQuestion block if any are missing. Don't build until all six are answered.

2. Pick the pattern

Map the answers to either patterns/scheduled-poller.md or patterns/task-triggered-agent.md. If the answer is "both" (poller that spawns an agent), use both — the poller triggers the agent task.

3. Scaffold the project

If no trigger.dev project exists in the cwd yet, run the bootstrap from stack/trigger-dev-setup.md. If one exists, extend it — don't create a new one per automation.

4. Write the task files

Use the templates in patterns/ as starting points. The key APIs:

import { task, schedules, idempotencyKeys, logger } from "@trigger.dev/sdk";
  • schedules.task({ id, cron, run }) — cron-driven
  • task({ id, run, retry }) — normal task, triggered by another task or from your app
  • idempotencyKeys.create(key) → pass to otherTask.trigger(payload, { idempotencyKey }) to make the child run at most once per key

5. Wire integrations

For each integration mentioned, check stack/ for a reference file:

If an integration isn't in stack/, write a new reference file for it before embedding logic in the task. See CONTRIBUTING.md.

6. Run in dev, then ship

npx trigger.dev@latest dev

Create one test trigger from the UI. Verify the run graph in trigger.dev's dashboard — every step should be visible. Only after a green dev run, ask the user before pushing:

npx trigger.dev@latest deploy

Guardrails (always apply)

See guardrails.md for the long version. Non-negotiable rules:

  1. Plan mode first. Never skip clarifying questions — the video specifically calls out scoping drift as the #1 failure mode.
  2. Every external item gets an idempotency key. No exceptions. Use the natural ID (video ID, task ID, email message-id). Pollers will re-fire; idempotency stops double-processing.
  3. Polling loops need a max-attempts + backoff. External APIs (image gen, transcription) can stall. Bound the wait.
  4. Run what builds. After scaffolding, actually execute a dev run before claiming done. The video explicitly warns: "always run what builds" to catch hallucinated APIs.
  5. Wire error notifications before production. At minimum, a Slack or email hook on onFailure. Silent failures at 2am are the classic post-build trap.

Prompt templates

Copy-paste starters for the user's first prompt to Claude Code, once the skill has gathered requirements. See prompts/:

Examples

Real builds from the source video, fully spec'd:

More in this playbook

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce

Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce grid

Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.

Agentic workflowsMIT Jag ValaiyapathyJag ValaiyapathyDirector @ Salesforce

Sf ai agentforce observability

Agentforce session tracing extraction and analysis. TRIGGER when: user extracts STDM data from Data Cloud, analyzes agent session traces, debugs agent conversations via telemetry, or works with .parquet files from Agentforce. DO NOT TRIGGER when: testing agents (use sf-ai-agentforce-testing), Apex debug logs (use sf-debug), or building agents (use sf-ai-agentforce).

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.