trigger-chat-agent-advanced

trigger-chat-agent-advanced is a skill for Claude Code, Codex from triggerdotdev/trigger.dev. It costs 154 tokens per session (1,150 once invoked), scanned A, original, Apache-2.0.

An advanced guide to Trigger.dev's chat.agent features for building conversations that can run over time. Trigger.dev is a service for running background tasks, while a session keeps a conversation's state available between messages.

In plain words
What is it for?
Use it when building durable chat sessions, custom chat transports, streamed responses, human-in-the-loop steps, steering, background work, recovery, or tests.
Why use it?
It helps handle complex chat behavior such as interruptions, human approval, sub-agents, recovery, large inputs, and custom connections without relying on fragile one-off requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it when building durable chat sessions, custom chat transports, streamed responses, human-in-the-loop steps, steering, background work, recovery, or tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced
About the project

Trigger.dev is an open-source TypeScript platform for running long-lived AI workflows and background tasks. Developers use it for jobs and agents that need queues, retries, schedules, human approval, monitoring, or resources such as browsers and Python scripts. The catalogue entries provide instructions, skills, agents, and commands for working with this platform.

triggerdotdev/trigger.dev · 16,850 stars · on GitHub · trigger.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add triggerdotdev/trigger.dev --skill trigger-chat-agent-advanced
Clone the repo
git clone --depth 1 https://github.com/triggerdotdev/trigger.dev

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trigger-chat-agent-advanced

README.md
[![agentmods](https://agentmods.dev/badge/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced/github.svg)](https://agentmods.dev/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced)
Your own site
<a href="https://agentmods.dev/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced"><img src="https://agentmods.dev/badge/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trigger-chat-agent-advanced

Your own site · 80×15
<a href="https://agentmods.dev/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced"><img src="https://agentmods.dev/badge/skills/triggerdotdev/trigger.dev/trigger-chat-agent-advanced.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 20
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00154 $0.01150
Opus 5.5 $0.00062 $0.00460
Sonnet 5.5 $0.00031 $0.00230
Haiku 4.5 $0.00015 $0.00115

Measured 3mo ago against content hash 2e1f2745b736, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

trigger-chat-agent-advanced scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cli-v3/skills/trigger-chat-agent-advanced/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

chat.agent — advanced & operational

The 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:

  • Skill: node_modules/@trigger.dev/sdk/skills/trigger-chat-agent-advanced/SKILL.md — Sessions primitive, custom transports/wire protocol, sub-agents, HITL, steering, actions, background injection, fast starts, resilience (compaction/recovery/OOM/large payloads), chat.local, testing, upgrades.
  • Docs: the full, version-pinned docs ship bundled at node_modules/@trigger.dev/sdk/docs/ai-chat/ (including patterns/ for HITL, sub-agents, sessions); the skill above lists the exact pages it draws from in its sources: frontmatter. Grep for an API, e.g. grep -rl "mockChatAgent" node_modules/@trigger.dev/sdk/docs/.

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.

Common mistakes

  • CRITICAL: sending a follow-up by re-POSTing POST /api/v1/sessions.

    // 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 }) });
    
  • Using the wrong token for .in / .out. Use publicAccessToken from the create response body (session-scoped). The x-trigger-jwt response header is run-scoped and cannot subscribe.

  • Initializing chat.local in onChatStart. It is skipped on continuation runs, so run() crashes with chat.local can only be modified after initialization. Init in onBoot.

  • chat.defer for the message-history write. A mid-stream refresh would read []. await that write inline before the model streams; reserve chat.defer for analytics, audit, cache warming.

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 71 lines · 154 tokens per session scan A 2e1f2745b736

Subscribe to this mod's changes

trigger-chat-agent-advanced is a skill published in the GitHub repository triggerdotdev/trigger.dev (16,850 stars, last pushed today), licensed Apache-2.0. It adds 154 tokens to every session and 1,150 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

trigger-chat-agent-advanced compared with skills from other repositories

trigger-chat-agent-advanced next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
trigger-chat-agent-advancedtriggerdotdev/trigger.devSkill17ktodayApache-2.0A154Claude Code, Codex
migrating-world-v4-to-v5vercel/workflowSkill2.5ktodayApache-2.0A229Claude Code, Codex
workflowvercel/workflowSkill2.5ktodayApache-2.0A84Claude Code, Codex
migrating-workflow-v4-to-v5vercel/workflowSkill2.5ktodayApache-2.0A178Claude Code, Codex
migrating-to-workflow-sdkvercel/workflowSkill2.5ktodayApache-2.0A107Claude Code, Codex
workflow-initvercel/workflowSkill2.5ktodayApache-2.0A78Claude Code, Codex
internal-dev-workbenchvercel/workflowSkill2.5ktodayApache-2.0B122Claude Code, Codex