lvtd-llc/skills

rust-idempotent-workflows

Use when designing, implementing, testing, or debugging Rust service workflows that must be safe under retries, duplicate requests, crashes, concurrent submissions, background workers, queues, email/payment/notification side effects, idempotency keys, transaction isolation, or save-and-replay API behavior.

First seen Jun 21, 2026

Installation

$ npx skills add lvtd-llc/skills --skill rust-idempotent-workflows

Summary

Use when designing, implementing, testing, or debugging Rust service workflows that must be safe under retries, duplicate requests, crashes, concurrent submissions, background workers, queues, email/payment/notification side effects, idempotency keys, transaction isolation, or save-and-replay API behavior.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from lvtd-llc/skills · top by installs.

npx skills add lvtd-llc/skills

Browse all from lvtd-llc/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.1.0
LicenseMIT
CompatibilityCodex, Claude Code, and other Agent Skills-compatible clients.
Declared agents claude-code codex
More metadata
version
0.1.0
displayName
Rust Idempotent Workflows
category
Rust
tags
rust,idempotency,retries,background-jobs,concurrency

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,227 B
  • docs SUMMARY.md 340 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 59 installs

SKILL.md

Rust Idempotent Workflows

Use this skill to make Rust workflows reliable when clients retry, workers crash, requests race, and external side effects cannot be rolled back.

Core Workflow

  1. Write the failure story before writing code. List what happens if the process

crashes after each database write and after each external side effect.

  1. Identify the idempotency boundary: HTTP endpoint, command handler, queue job,

webhook, or external callback.

  1. Choose the idempotency strategy:

- Natural idempotency from a unique business key. - Client-provided idempotency key with save-and-replay. - Server-generated deduplication key. - Outbox or queue table for side effects.

  1. Put state transitions and idempotency records in the same transaction when

they must agree.

  1. Make duplicate concurrent requests deterministic. Use unique constraints,

locks, serializable transactions, or explicit conflict handling.

  1. Treat external side effects as at-least-once unless the provider guarantees

more. Store enough state to retry or reconcile.

  1. Add tests for duplicate requests, retry after timeout, concurrent requests,

crash windows when practical, and worker retry behavior.

Idempotency Key Rules

Read references/idempotency.md before adding idempotency keys or save-and- replay behavior.

  • Bind the key to the authenticated user or tenant.
  • Store a hash of the request payload when replaying responses.
  • Return the original response for exact replays.
  • Reject reuse of the same key with a different payload.
  • Expire records only after product and provider retry windows have passed.

Background Work Rules

Read references/background-workers.md when adding queue tables, polling workers, retries, or external side effects.

  • Commit durable intent before sending external effects.
  • Use pending, in_progress, succeeded, and failed states deliberately.
  • Keep retry counts, next-attempt timestamps, and last error summaries.
  • Make workers safe to run in multiple processes.

Concurrency Rules

Read references/concurrency.md when duplicate requests, locks, isolation levels, or unique constraints are part of the fix.

Use the database as the source of truth for deduplication when multiple app instances can process the same workflow.

Reference Files

  • references/idempotency.md: idempotency keys, save-and-replay, and request

payload binding.

  • references/background-workers.md: queue tables, worker loops, retry

boundaries, and outbox behavior.

  • references/concurrency.md: lock choices, transaction isolation, and duplicate

request tests.