resonate-external-system-of-record-pattern-rust

resonate-external-system-of-record-pattern-rust is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 0 tokens per session (2,974 once invoked), scanned A, original, Apache-2.0.

A Rust pattern for coordinating a workflow with an external system that owns the official data, such as a database, ledger, or message broker. The external system is treated as the source of truth, and writes are designed to be safe when repeated.

In plain words
What is it for?
Use it when Rust Resonate workflows interact with PostgreSQL, ledgers, message brokers, or other durable services and need reliable reads, writes, retries, and dependency access.
Why use it?
It prevents workflow retries from producing duplicate or conflicting external changes. The pattern keeps responsibility for consistency with the system that owns the data while the workflow coordinates the surrounding steps.

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 Rust Resonate workflows interact with PostgreSQL, ledgers, message brokers, or other durable services and need reliable reads, writes, retries, and dependency access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust
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-external-system-of-record-pattern-rust
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-external-system-of-record-pattern-rust

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust)
Your own site
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust/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-external-system-of-record-pattern-rust

Your own site · 80×15
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-external-system-of-record-pattern-rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,974 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.00000 $0.02974
Opus 5 $0.00000 $0.01487
Sonnet 5 $0.00000 $0.00595
Haiku 4.5 $0.00000 $0.00297

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

Security

Grade A, and why

resonate-external-system-of-record-pattern-rust 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.

resonate-external-system-of-record-pattern-rust/SKILL.md · 277 lines

How it starts

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

Resonate External System of Record Pattern — Rust

SDK note (0.6.0). ctx.get_dependency::<T>() and resonate.with_dependency::<T>(value) are real pub fns in the Rust SDK source (resonate-sdk-rs:resonate/src/context.rs, resonate.rs) but are not yet covered in docs/develop/rust.mdx. The APIs are safe to use; cite source paths when reviewers ask.

Overview

When a Rust workflow touches an external system with its own durability (a database, a ledger, a message broker), that system often is or should be the system of record (SoR). Resonate coordinates the workflow and guarantees at-least-once execution; the SoR enforces consistency via its own primitives (transactions, idempotency keys, CAS operations).

Rust's type-dispatched dependency injection makes this pattern particularly clean: register typed resources once at process start with resonate.with_dependency<T>(value), retrieve inside durable functions with ctx.get_dependency::<T>().

For the language-agnostic framing, see resonate-external-system-of-record-pattern-typescript. Rust's shape adds: Arc<T> returns from DI, serde-derived input types, and idiomatic sqlx / ledger-crate usage.

Core principle

Write to the system of record first. Read from it as ground truth. Never let Resonate's promise state contradict the SoR.

Resonate stores workflow state (what step succeeded, what the result was). The SoR stores business state (the account balance, the order status). When they disagree, the SoR wins; Resonate's job is to converge toward it.

Dependency setup (ephemeral world)

use resonate::prelude::*;
use sqlx::PgPool;
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<()> {
    let pool = PgPool::connect(&std::env::var("DATABASE_URL")?).await?;
    let stripe = stripe::Client::new(std::env::var("STRIPE_SECRET_KEY")?);

    let resonate = Resonate::new(ResonateConfig::default())
        .with_dependency(pool)
        .with_dependency(stripe);

    resonate.register(create_order).unwrap();
    resonate.register(charge_card).unwrap();

    tokio::signal::ctrl_c().await?;
    resonate.stop().await?;
    Ok(())
}

Read the full file on GitHub · 277 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 · 277 lines · 0 tokens per session scan A ddafff5cc210

Subscribe to this mod's changes

resonate-external-system-of-record-pattern-rust is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 21d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,974 tokens. 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

golem-make-http-request-rust

Making outgoing HTTP requests from a Rust Golem agent. Use when the user asks to call an external API, make HTTP requests, use an HTTP client, or send HTTP requests from agent code.

golemcloud/golem · 48 tokens

golem-add-http-endpoint-rust

Exposing a Rust Golem agent over HTTP. Use when the user asks to add HTTP endpoints, mount an agent to a URL path, or expose agent methods as a REST API.

golemcloud/golem · 46 tokens

golem-add-webhook-rust

Using webhooks in a Rust Golem agent. Use when the user asks to create webhooks, receive webhook callbacks, integrate with webhook-driven external APIs, or generate temporary callback URLs for external services.

golemcloud/golem · 48 tokens

golem-add-transactions-rust

Adding saga-pattern transactions with compensation to a Rust Golem agent. Use when the user asks about transactions, sagas, compensation, rollback, or multi-step operations that need undo logic.

golemcloud/golem · 45 tokens

azure-eventhub-rust

Azure Event Hubs library for Rust. Send and receive events for streaming data ingestion and batch processing. Triggers: "event hubs rust", "ProducerClient rust", "ConsumerClient rust", "send event rust", "streaming rust", "eventhub rust".

microsoft/skills · 58 tokens

rust-engineer

Writes, reviews, and debugs idiomatic Rust code with memory safety and zero-cost abstractions. Implements ownership patterns, manages lifetimes, designs trait hierarchies, builds async applications with tokio, and structures error handling with Result/Option. Use when building Rust applications, solving ownership or…

Jeffallan/claude-skills · 120 tokens