idempotency

Implement idempotent API operations using Redis for request tracking and locks.

783|62|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/dadbodgeoff/drift --skill idempotency-dadbodgeoff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: idempotency
Source: https://github.com/dadbodgeoff/drift/tree/main/drift%20v1%20depreciated/skills/idempotency
Command: npx skills add https://github.com/dadbodgeoff/drift --skill idempotency-dadbodgeoff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents duplicate processing of API requests, ensuring that operations with side effects are executed exactly once, even in the face of network issues or client retries.

Core Features & Use Cases

  • Idempotent API Operations: Safely handle retries without duplicate side effects.
  • Use Cases: Essential for payment processing, order creation, and any API that must not be executed twice. It ensures that repeated identical requests yield the same outcome as a single execution.

Quick Start

Implement the idempotency middleware in your Express.js application to protect your API endpoints.

Frequently Asked Questions about idempotency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate API requests from processing twice during client retries?

To prevent duplicate API requests, you implement idempotency middleware that tracks request states in a distributed store like Redis, ensuring identical retries yield the same outcome as a single execution. This safeguards operations like payments and order creation.

What is idempotency and when do I need it for webhook handlers?

Idempotency ensures operations execute at most once. You need it for webhook handlers and payment APIs when network issues cause retries, preventing duplicate side effects by managing distributed locks and transactional states.

How do I implement idempotent operations in an Express.js API?

You implement idempotent operations in Express.js by integrating middleware that manages request locks and states in Redis. This guarantees transactional integrity by blocking duplicate processing of identical client requests.

Does this idempotency middleware support Python and TypeScript APIs?

Yes, the idempotency implementation supports various programming languages including Python and TypeScript. It handles distributed state tracking and locking to ensure reliable API operations across different technology stacks.

Why do I need a distributed store like Redis for idempotent API operations?

You need a distributed store like Redis for idempotent API operations to track request states and manage locks across multiple instances. This guarantees transactional integrity and prevents duplicate processing in distributed systems.