resonate-human-in-the-loop-pattern-go

resonate-human-in-the-loop-pattern-go is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 93 tokens per session (3,396 once invoked), scanned A, original, Apache-2.0.

A Go pattern for workflows that pause until a person or another outside system supplies a decision or result. The workflow can resume after the response arrives and survive crashes or restarts.

In plain words
What is it for?
Use it for approvals, reviews, confirmations, and other Go workflows that depend on an external actor before continuing.
Why use it?
It removes the need to keep a Go worker running while waiting for human input. Waiting requests can be resolved, rejected, or cancelled from Go code or through external control mechanisms.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for approvals, reviews, confirmations, and other Go workflows that depend on an external actor before continuing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go
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-human-in-the-loop-pattern-go
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-human-in-the-loop-pattern-go

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-human-in-the-loop-pattern-go)
Your own site
<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.

agentmods 80×15 button for resonate-human-in-the-loop-pattern-go

Your own site · 80×15
<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>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,396 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00093 $0.03396
Opus 5 $0.00046 $0.01698
Sonnet 5 $0.00019 $0.00679
Haiku 4.5 $0.00009 $0.00340

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

Security

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 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.

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
resonate-human-in-the-loop-pattern-go/SKILL.md · 237 lines

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 no v prefix, so @latest does not resolve to it). 0.1.0 shipped a top-level promises sub-client (r.Promises()), matching TypeScript's resonate.promises and Rust's resonate.promises. Every code block here is verified against the 0.1.0 tag source and example-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.Promisef.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)

Read the full file on GitHub · 237 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. 12d ago First seen · 237 lines · 93 tokens per session scan A 2fe652de4a87

Subscribe to this mod's changes

resonate-human-in-the-loop-pattern-go is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 21d ago), licensed Apache-2.0. It adds 93 tokens to every session and 3,396 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

golang-patterns

Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization. Use when working with Go code to apply idiomatic Go patterns.

affaan-m/ECC · 45 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-uber-fx

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…

samber/cc-skills-golang · 122 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens