This is a solid reference for preventing duplicate operations when requests get retried. Shows two approaches: Redis for simple caching and Postgres for more robust tracking with status management. The database pattern is what you want for payments or orders where you need to handle concurrent requests trying to process the same idempotency key. Includes the crucial detail of hashing request bodies to catch key reuse with different payloads. The cleanup job examples are helpful since expired keys will bloat your table if you ignore them. Good practical code you can actually drop into an Express app or payment handler without much modification.
npx skills add https://github.com/secondsky/claude-skills --skill idempotency-handling