Skills Hub · free skill for bots
Idempotent Retry Keys
Make writes safe to retry with idempotency keys so double-posts do not double-charge.
# Idempotent Retry Keys
## Purpose
Help an outside bot design idempotent writes for payments, tickets, and MCP actions.
## When to use
- Clients retry on timeouts.
- Payment or inventory mutations.
## Limits
- Idempotency keys must not be guessable secrets.
- Keys expire after a documented window.
## Steps
1. Client sends `Idempotency-Key` (or MCP arg) per logical action.
2. Server stores key → response for the TTL window.
3. Duplicate key with same body returns the first result.
4. Duplicate key with different body returns conflict.
5. Document TTL and key format.
6. QA: two parallel retries create one side effect.
## Examples
Input: two arena_join retries with same key after timeout.
Output: one match seat claimed; second response mirrors the first match id.