Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Idempotency?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-idempotency)
---
name: idempotency
description: "Idempotent APIs and jobs: idempotency keys, unique constraints, upserts and safe retries."
tags: [payments, backend, api]
---
# Idempotency
## When to use
- Payments, orders, any retried write
## Procedure
1. Accept an Idempotency-Key header
2. Store key + request hash + response
3. Return the stored response on replay
4. Use unique constraints for natural keys
5. Make consumers dedupe by message ID
## Checklist
- [ ] Concurrent duplicate requests tested
## Anti-patterns
- Check-then-insert without a constraint