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-javagit 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-java)<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-java"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-java/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-java"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-recursive-fan-out-pattern-java.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.00115 | $0.02432 |
| Opus 5 | $0.00057 | $0.01216 |
| Sonnet 5 | $0.00023 | $0.00486 |
| Haiku 4.5 | $0.00012 | $0.00243 |
Grade A, and why
resonate-recursive-fan-out-pattern-java 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 — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Resonate Recursive Fan-Out Pattern — Java
Prerelease note.
resonate-sdk-javais published on Maven Central — pinio.resonatehq:resonate-sdk-java:0.1.1. The API mirrors the Python SDK and may change before a stable1.0. Requires Java 21+ (virtual threads, a feature generally available in Java 21). Every code block here is compile-verified against0.1.1and drawn from theexample-fan-out-fan-in-java/example-recursive-factorial-javarepos anddevelop/java.mdx(docs PR #230).
Overview
Recursive fan-out dispatches multiple child invocations in parallel, awaits them individually, and optionally recurses deeper. The Java expression is a two-loop pattern: a dispatch loop builds a List<ResonateFuture<T>>, then a separate await loop reads each result. Mixing dispatch and await serializes the children — the single most common mistake.
For the language-agnostic mental model (promise deduplication, load-balancing, detached vs. result-gathering), see resonate-recursive-fan-out-pattern-typescript.
When to use
- Batch processing where items are independent and each needs durability
- Map-reduce shaped workflows (fan out N workers, aggregate results)
- Recursive tree / graph traversal with dynamic depth
- Any case where a crash mid-fan-out must resume, not restart from zero
Dispatch-then-await shape
The canonical fan-out from example-fan-out-fan-in-java — dispatch all children first, await all second:
import io.resonatehq.resonate.Context;
import io.resonatehq.resonate.Context.ResonateFuture;
import java.util.ArrayList;
import java.util.List;
public record Delivery(String channel, boolean ok) {}
public static List<Delivery> fanout(Context ctx, List<String> channels, String message) {
// Fan out: spawn a child per channel, collecting futures without awaiting yet.
List<ResonateFuture<Delivery>> futures = new ArrayList<>();
for (String channel : channels) {
futures.add(ctx.run(FanOutFanIn::send, channel, message));
}
// Fan in: await every child and aggregate.
List<Delivery> delivered = new ArrayList<>();
for (ResonateFuture<Delivery> future : futures) {
delivered.add(future.await());
}
return delivered;
}
public static Delivery send(Context ctx, String channel, String message) {
return new Delivery(channel, true);
}
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 · 173 lines · 115 tokens per session scan A 813f5b3c4b99
resonate-recursive-fan-out-pattern-java is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 20d ago), licensed Apache-2.0. It adds 115 tokens to every session and 2,432 once invoked, about $0.0006 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
springboot-patterns
Provides Spring Boot architecture patterns for REST APIs, layered services, JPA data access, caching, async processing, and logging. Use when working with Java Spring Boot files (.java, pom.xml) or when the user mentions Spring Boot, Spring Framework, or Java backend.
wxjava-api-contributor
A contributor guide for adding or maintaining official WeChat API support in WxJava, a Java software development kit. It covers services, request and response data objects, data conversion, HTTP handling, starter configuration, and regression tests.
azure-communication-callautomation-java
Build call automation workflows with Azure Communication Services Call Automation Java SDK. Use when implementing IVR systems, call routing, call recording, DTMF recognition, text-to-speech, or AI-powered call flows.
azure-communication-chat-java
Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.
azure-communication-common-java
Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.
azure-communication-sms-java
Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports.