idempotency

Implement idempotency key management for API requests and background jobs.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill idempotency-engineers-hub-ltd-in-house-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: idempotency
Source: https://github.com/engineers-hub-ltd-in-house-project/eh-skills/tree/main/skills/_base/idempotency
Command: npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill idempotency-engineers-hub-ltd-in-house-project

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents unintended side effects and data corruption caused by duplicate operations, ensuring that actions like payments or API calls are processed exactly once.

Core Features & Use Cases

  • Idempotency Key Management: Implements robust patterns for handling unique request keys.
  • Server-Side Logic: Provides strategies for ensuring operations are safe to retry.
  • Use Case: When a user accidentally clicks a "Submit Payment" button twice, this skill ensures only one charge is processed, preventing duplicate billing.

Quick Start

Use the idempotency skill to handle a POST request to the /api/payments endpoint with a unique idempotency key.

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 causing double charges in payment gateways?

Idempotency prevents double charges by implementing unique key management and server-side logic, ensuring payment gateway operations execute exactly once despite duplicate API requests. It safely handles retry scenarios for reliable processing.

What is the best way to ensure transactional integrity for asynchronous task queues?

Transactional integrity in asynchronous task queues is ensured by implementing at-least-once processing logic with idempotency keys. This guarantees background jobs can be safely retried without causing unintended side effects or data corruption.

How does idempotency key management work for webhook handlers?

Idempotency key management for webhook handlers works by tracking unique request identifiers server-side. When duplicate webhook deliveries occur, the system recognizes the key and returns the original result without reprocessing the operation.

When do I need idempotency for API design and error handling?

Idempotency is needed for API design when operations involve payments, webhooks, or asynchronous queues. It ensures error handling retries do not alter results beyond the initial application, preventing data corruption from network failures.

Can I use server-side idempotency logic to handle accidental duplicate form submissions?

Server-side idempotency logic handles accidental duplicate form submissions by validating unique request keys. When a user submits a form twice, the server recognizes the repeated key and processes only the initial request, ensuring reliability.