rbadillap/sre/idempotency
Claude Code and agent skill by rbadillap/sre
- community
Checking that the SKILL.md file is still in the repository.
Discipline. An operation that can run more than once must give the same result, so retries, redeliveries and repeated messages can't break anything. Applied by the orchestrators in this package when designing workers, queues, APIs, migrations or recovery steps.
Install
npx vskill@latest install rbadillap/sre/idempotencySKILL.md
Idempotency
Anything that can happen twice must be safe to happen twice.
When
Whenever work can be retried or delivered again: queue consumers, webhooks, API calls with retries, scheduled jobs, deploy and recovery steps, data migrations.
When not
Work that truly happens once, with no retry anywhere in its path, doesn't need it. Check the whole path before deciding that: clients, proxies and queues all retry.
How
- Assume at-least-once. Most queues and networks deliver at least once, not exactly once. A clean shutdown reduces duplicates; it doesn't remove them.
- Give every unit of work a stable ID, set by whoever creates it, not by whoever processes it.
- Record the ID with the effect, atomically. Store the processed ID in the same write as the result, behind a uniqueness constraint. A second attempt fails the constraint and is skipped.
- Acknowledge after the work is durable, never before. A crash between the work and the acknowledgement then means a safe retry, not a lost message.
- Guard order as well as repetition. Keep a version or the last applied event ID with the state, and apply an update only if it's newer.
- Bound the record. Expire stored IDs after a period much longer than the longest possible redelivery.
- Know where it can't be guaranteed. Effects outside your systems, like an email or a call to a provider without an idempotency key, can still happen twice. Make the choice between a rare duplicate and a missed effect explicit.
The mistake it prevents
A retry or a redelivered message charges twice, notifies twice, or overwrites newer state with older state.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/idempotency/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rbadillap/sre/idempotency)