Skip to content
Back to skills

Rust Idempotent Workflows

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 12, 2026
ai-agentsrustgotestingdebugginggitapidatabasebackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add thedixitjain/the-mega-skill-library --skill rust-idempotent-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Idempotent Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Idempotent Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thedixitjain-rust-idempotent-workflows/badge)](https://www.skillsdirectory.com/skills/thedixitjain-rust-idempotent-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rust-idempotent-workflows
description: "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."
category: backend-and-data
source_repo: hashgraph-online/awesome-codex-plugins
source_path: "plugins/LVTD-LLC/skills/skills/rust-idempotent-workflows/SKILL.md"
source_url: https://github.com/hashgraph-online/awesome-codex-plugins/blob/HEAD/plugins/LVTD-LLC/skills/skills/rust-idempotent-workflows/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.
2. Identify the idempotency boundary: HTTP endpoint, command handler, queue job,
   webhook, or external callback.
3. 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.
4. Put state transitions and idempotency records in the same transaction when
   they must agree.
5. Make duplicate concurrent requests deterministic. Use unique constraints,
   locks, serializable transactions, or explicit conflict handling.
6. Treat external side effects as at-least-once unless the provider guarantees
   more. Store enough state to retry or reconcile.
7. 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.

---

**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/LVTD-LLC/skills/skills/rust-idempotent-workflows/SKILL.md`

Files in this skill

  • SKILL.md3.4 KB
  • agents/openai.yaml194 B
  • references/background-workers.md1.3 KB
  • references/concurrency.md1.2 KB
  • references/idempotency.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.