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.
npx skills add resonatehq/resonate-skills --skill resonate-recursive-fan-out-pattern-typescriptgit clone --depth 1 https://github.com/resonatehq/resonate-skillsWrote 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.
[](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-typescript)<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-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.
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-typescript"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.03514 |
| Opus 5 | $0.00022 | $0.01757 |
| Sonnet 5 | $0.00009 | $0.00703 |
| Haiku 4.5 | $0.00004 | $0.00351 |
Grade A, and why
resonate-recursive-fan-out-pattern-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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Resonate Recursive Fan-Out Pattern (TypeScript)
Overview
The recursive fan-out pattern enables workflows to spawn multiple child workflows in parallel, either collecting their results or letting them execute independently. Resonate provides two primitives for this: ctx.detached() for fire-and-forget execution and ctx.beginRpc() for parallel execution with result gathering.
Core principle: Break complex work into parallel subtasks that recursively break down further, with automatic deduplication via promise IDs and transparent load balancing across workers.
Mental Model
Parent Workflow
│
├─────────┬─────────┬─────────┐
│ │ │ │
Child 1 Child 2 Child 3 Child 4
│ │ │
├──┬──┐ ├──┐ └──┬──┐
G1 G2 G3 G4 G5 G6 G7
Fan-out: Parent spawns multiple children
Recursive: Children spawn grandchildren
Parallel: All execute concurrently
Deduplication: Same ID => same promise
Pattern 1: Detached Fan-Out (Fire-and-Forget)
Use when: You want to spawn independent work without waiting for results.
Basic Pattern
import { Context } from "@resonatehq/sdk";
function* parentWorkflow(ctx: Context, items: string[]) {
// Spawn detached workflows for each item
for (const item of items) {
yield* ctx.detached(
processItem,
item,
ctx.options({ id: `process/${item}` })
);
}
// Parent completes immediately, children continue independently
return { spawned: items.length };
}
function* processItem(ctx: Context, item: string) {
// Process the item
yield* ctx.run(async () => {
console.log(`Processing ${item}`);
// ... actual work ...
});
}
With Automatic Deduplication
function* scrapeUser(
ctx: Context,
userId: string,
depth: number
): Generator<any, void, any> {
// Fetch user data
const user = yield* ctx.run(fetchUserData, userId);
console.log(`Scraped: ${user.handle}`);
// Recursively scrape followers
if (depth > 0) {
const followers = yield* ctx.run(getFollowers, userId);
for (const follower of followers) {
// CRITICAL: Use follower ID as promise ID for deduplication
// If same follower appears in multiple lists, only one scrape happens
yield* ctx.detached(
scrapeUser,
follower.id,
depth - 1,
ctx.options({ id: follower.id })
);
}
}
}
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.
- 12d ago First seen · 587 lines · 43 tokens per session scan A 187c9be5c777
resonate-recursive-fan-out-pattern-typescript is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 20d ago), licensed Apache-2.0. It adds 43 tokens to every session and 3,514 once invoked, about $0.0002 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.
Other skills, from other repositories
golem-js-runtime
JavaScript runtime environment for TypeScript and Scala Golem agents. Use when asking about available APIs, Node.js modules, browser APIs, or runtime capabilities in the QuickJS-based WASM environment.
golem-add-npm-package
Add a new npm package dependency to a TypeScript Golem project. Use when the user asks to add a library, package, or dependency.
golem-add-postgres-ts
Using golem:rdbms/postgres from a TypeScript Golem agent. Use when the user asks to connect to PostgreSQL, run SQL, or use PostgreSQL from TypeScript agent code.
golem-add-mysql-ts
Using golem:rdbms/mysql from a TypeScript Golem agent. Use when the user asks to connect to MySQL, run SQL, or use MySQL from TypeScript agent code.
drizzle-orm-expert
Provides Drizzle ORM schema design, query patterns, migrations, and TypeScript integration for SQL databases. Use when working with Drizzle files (schema.ts, drizzle.config.ts) or when the user mentions Drizzle ORM or drizzle-kit.
nestjs-expert
Provides NestJS patterns for modules, controllers, providers, guards, interceptors, and microservices. Use when working with NestJS TypeScript files (.module.ts, .controller.ts, .service.ts) or when the user mentions NestJS, Nest.js, or NestJS modules.