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-human-in-the-loop-pattern-gogit 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-human-in-the-loop-pattern-go)<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go/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-human-in-the-loop-pattern-go"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go.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.00093 | $0.03396 |
| Opus 5.5 | $0.00037 | $0.01358 |
| Sonnet 5.5 | $0.00019 | $0.00679 |
| Haiku 4.5 | $0.00009 | $0.00340 |
Grade A, and why
resonate-human-in-the-loop-pattern-go scanned grade A with 1 finding 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 2mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
**Resolution path.** TypeScript has `resonate.promises.settle(id, ...)`. Rust has `resonate.promises.resolve(id, ...)`. Go's `0.1.0` tag has `r.Promises().Resolve(id, v)` / `.Reject(id, v)` / `.Cancel(id, v)` — the same How it starts
The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Resonate Human-in-the-Loop Pattern — Go
Version note. The Go SDK's first tagged release is
0.1.0(go get github.com/resonatehq/[email protected]— the tag has novprefix, so@latestdoes not resolve to it).0.1.0shipped a top-levelpromisessub-client (r.Promises()), matching TypeScript'sresonate.promisesand Rust'sresonate.promises. Every code block here is verified against the0.1.0tag source andexample-human-in-the-loop-go.
Overview
For the language-agnostic mental model, start with resonate-human-in-the-loop-pattern-typescript. The idea is identical: create a latent durable promise, hand its ID to the external actor who will settle it, and await — the workflow goroutine parks until settlement arrives, surviving any number of crashes or restarts.
Resolution path. TypeScript has resonate.promises.settle(id, ...). Rust has resonate.promises.resolve(id, ...). Go's 0.1.0 tag has r.Promises().Resolve(id, v) / .Reject(id, v) / .Cancel(id, v) — the same shape, and the preferred way to settle a promise from Go code in another process. Three more mechanisms remain useful for settling from outside Go entirely (an ops runbook, curl, a non-Go service) — listed below in order of preference.
When to use
- Approval gates (budget, deploy, content moderation)
- Third-party webhook callbacks (Stripe, DocuSign, Twilio)
- Operator unblock steps in runbooks
- Any step where the decision or data originates outside the Resonate worker set
Basic shape
Workflow side — ctx.Promise → f.ID() → publish → Await
import (
"context"
"fmt"
"time"
resonate "github.com/resonatehq/resonate-sdk-go"
)
type ReviewRequest struct {
Item string `json:"item"`
Requester string `json:"requester"`
}
// approvalWorkflow parks until an external actor settles the latent promise.
// promiseIDs is a buffered channel (capacity 1) that hands the promise ID to
// whoever resolves it — swap this for a DB write, a notification queue, etc.
func approvalWorkflow(ctx *resonate.Context, req ReviewRequest) (string, error) {
// Create a latent durable promise. No registered function is behind it;
// it only settles when an external caller issues a promise-settle.
f, err := ctx.Promise(resonate.PromiseOpts{Timeout: 24 * time.Hour})
if err != nil {
return "", fmt.Errorf("ctx.Promise: %w", err)
}
promiseID := f.ID() // hand this to the external resolver
// Publish the promise ID inside a ctx.Run so the write is checkpointed.
// On replay, ctx.Run re-issues with the same child promise ID and
// short-circuits — the side-effect does not run twice.
// ctx.Run takes a single args value: ctx.Run(fn, args, opts...). Capture the
// values the leaf needs via the closure and pass struct{}{} as the (unused) arg.
_, err = ctx.Run(func(_ struct{}) (struct{}, error) {
// In production: write to DB, push to a notification queue, etc.
fmt.Printf(" [workflow] awaiting approval for %q — promise ID: %s\n", req.Item, promiseID)
promiseIDs <- promiseID // example: buffered channel to a local resolver
return struct{}{}, nil
}, struct{}{})
if err != nil {
return "", fmt.Errorf("publish promise ID: %w", err)
}
// Await parks the workflow until the promise settles. The decision value
// encoded by the settler is decoded here.
var decision string
if err := f.Await(&decision); err != nil {
return "", fmt.Errorf("await approval: %w", err)
}
return fmt.Sprintf("item %q approved: %s", req.Item, decision), nil
}
// promiseIDs is a buffered channel for single-process demos. Replace with a
// DB write or notification in production.
var promiseIDs = make(chan string, 1)
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.
- 2mo ago First seen · 237 lines · 93 tokens per session scan A 2fe652de4a87
resonate-human-in-the-loop-pattern-go is a skill published in the GitHub repository resonatehq/resonate-skills (7 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 93 tokens to every session and 3,396 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). 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-add-agent-go
Adding a new Go agent to a Golem component. Use when the user asks to create, add, or define a new agent type, split an agent into definition/implementation, or add agent methods in a Go Golem project.
golem-custom-snapshot-go
Configures custom snapshot recovery for Go agents and explains unresolved default JSON recovery and manual update limitations. Use when asked about custom snapshots, snapshot-based updates, or slow recovery in Go agents.
golem-retry-policies-go
Configuring semantic retry policies for a Go Golem agent. Use when the user asks about retry policies, retry strategies, exponential backoff, transient error recovery, retry predicates, the retry subpackage, Named/Set/With, Policy or Predicate builders, jitter, MaxRetries, Clamp, AndThen, retrying the agent's own code…
golem-call-tool-go
Calls a Golem tool from a Go agent. Use when invoking a tool with typed arguments, through its own definition or a generated guest tool client (including generated built-in or MCP imported tool clients), streaming its stdin, stdout and stderr, handling declared tool errors, or calling a tool discovered at runtime.
golem-define-tool-go
Defines and implements a typed Golem tool in Go. Use when creating a tool provider, a command tree with positionals, options, flags and globals, declared tool errors, or commands streaming stdin, stdout and stderr in a Go Golem project.
golem-parallel-workers-go
Fan out work to multiple parallel agents and collect results in a Go Golem project. Use when the user asks about parallel execution, fan-out/fan-in, spawning worker agents for parallel work, or aggregating results from multiple agents in a Go Golem project.