resonate-basic-durable-world-usage-typescript

resonate-basic-durable-world-usage-typescript is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 83 tokens per session (4,840 once invoked), scanned A, original, Apache-2.0.

A reference for writing durable workflow functions in TypeScript with Resonate. Durable workflows save checkpoints so they can recover after failures.

In plain words
What is it for?
Use it when writing workflow code that runs steps, waits, calls other processes, handles promises, and resumes from saved progress.
Why use it?
It explains the special generator-function style and the rules needed to make workflow replay safe and predictable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when writing workflow code that runs steps, waits, calls other processes, handles promises, and resumes from saved progress.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript
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 resonatehq/resonate-skills --skill resonate-basic-durable-world-usage-typescript
Clone the repo
git clone --depth 1 https://github.com/resonatehq/resonate-skills

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 resonate-basic-durable-world-usage-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript)
Your own site
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript/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 resonate-basic-durable-world-usage-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-basic-durable-world-usage-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,840 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.
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.00083 $0.04840
Opus 5 $0.00042 $0.02420
Sonnet 5 $0.00017 $0.00968
Haiku 4.5 $0.00008 $0.00484

Measured 10d ago against content hash cbb3097747d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

resonate-basic-durable-world-usage-typescript 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 10d 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.

resonate-basic-durable-world-usage-typescript/SKILL.md · 726 lines

How it starts

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

Resonate Basic Durable World Usage

SDK version: This skill reflects @resonatehq/sdk v0.11.4 (current on npm).

Two execution engines (v0.11.0+): The SDK now ships two engines. This skill documents the generator engine (imported from @resonatehq/sdk), which uses function* / yield* and is the basis of all existing Resonate examples. An async/await engine (imported from @resonatehq/sdk/async) was added in v0.11.0 and is documented in resonate-async-await-engine-typescript.

Overview

The Durable World is inside generator functions where you write durable, recoverable execution logic using the Context object. Every operation checkpoints progress, enabling automatic recovery after failures.

Key distinction: Durable World code uses ctx (Context). Ephemeral World code uses resonate (Client).

Mental Model

Generator Function (function*)
       ↓
   yield* ctx.run()      ← Checkpoint
       ↓
   yield* ctx.sleep()    ← Checkpoint + Suspend
       ↓
   yield* ctx.rpc()      ← Checkpoint + Cross Process
       ↓
   return result         ← Final Checkpoint

Every yield* is a durable checkpoint.

If the process crashes, the execution replays from the last checkpoint using stored results.

Core Syntax Rules

1. Use function* (Generator Functions)

// ✅ CORRECT - Generator function
function* myWorkflow(ctx: Context, arg: string) {
  // Durable code here
}

// ❌ WRONG - Async function
async function myWorkflow(ctx: Context, arg: string) {
  // Not durable!
}

// ❌ WRONG - Async generator
async function* myWorkflow(ctx: Context, arg: string) {
  // Invalid syntax for Resonate
}

2. Always yield* Context Calls

function* myWorkflow(ctx: Context) {
  // ✅ CORRECT
  const result = yield* ctx.run(someFunc, "arg");

  // ❌ WRONG - Missing yield*
  const result = ctx.run(someFunc, "arg");

  // ❌ WRONG - Using await
  const result = await ctx.run(someFunc, "arg");
}

3. First Parameter is Always Context

Read the full file on GitHub · 726 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. 10d ago First seen · 726 lines · 83 tokens per session scan A cbb3097747d6

Subscribe to this mod's changes

resonate-basic-durable-world-usage-typescript is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 18d ago), licensed Apache-2.0. It adds 83 tokens to every session and 4,840 once invoked, about $0.0004 per session on Opus 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-31.

Related

Other skills, from other repositories

workflow

Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue"…

vercel/workflow · 84 tokens

migrating-workflow-v4-to-v5

Upgrades an app from Workflow SDK 4.x to 5.0. Use when bumping the workflow / @workflow/ dependencies to v5, or when hitting removed v4 APIs — runStep, stepEntrypoint, workflow/internal/private, @workflow/core/private, writeToStream / closeStream / readFromStream on a World, world.steps.get without a runId…

vercel/workflow · 161 tokens

migrating-to-workflow-sdk

Migrates Temporal, Inngest, Trigger.dev, and AWS Step Functions workflows to the Workflow SDK. Use when porting Activities, Workers, Signals, step.run(), step.waitForEvent(), Trigger.dev tasks / wait.forToken / triggerAndWait, ASL JSON state machines, Task/Choice/Wait/Parallel states, task tokens, or child workflows.

vercel/workflow · 81 tokens

deepep-to-cam-converter

A code migration skill for replacing DeepEP communication operations with CAM operations when moving mixture-of-experts code from CUDA/NCCL to Ascend NPUs.

XiaoLuoLYG/GOD · 63 tokens

e2a-doctor

Use when an existing e2a MCP connection, inbox, custom domain, protection policy, webhook, or message delivery is failing or unclear. Diagnoses read-only through MCP first, ranks evidence-backed causes, and offers individually confirmed repairs; uses the CLI doctor only when CLI or self-hosted diagnostics are…

tokencanopy/e2a · 69 tokens

e2a-integrate

Use when adding e2a email capabilities to an application or codebase: outbound sending, inbound signed webhooks, REST polling, or SDK integration. Inspects the existing language and framework, uses official TypeScript/Python SDKs or idiomatic REST/OpenAPI, adds tests, and keeps credentials server-side.

tokencanopy/e2a · 68 tokens