idempotency-audit

Tests repeated and retried requests to detect duplicated effects in payments, rewards, webhooks, and counters.

Updated Aug 29, 2026
One-click install
npx skills add https://github.com/1arley/volibear --skill idempotency-audit-1arley
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: idempotency-audit
Source: https://github.com/1arley/volibear/tree/main/.opencode/skills/idempotency-audit
Command: npx skills add https://github.com/1arley/volibear --skill idempotency-audit-1arley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Operations that create, charge, grant, or increment can silently duplicate their effects when a request is repeated, a response is lost and retried, or a webhook is redelivered, causing double charges, double rewards, and duplicated records. ## Core Features & Use Cases - Idempotency Key Analysis: Identifies whether each effect-producing operation has an idempotency key and whether the server verifies it before acting. - Replay and Retry Testing: Exercises request repetition, response-lost retry, double-submit, webhook redelivery, and concurrent same-key requests to reproduce duplicated effects. - Confidence-Graded Findings: Reports each duplicated-effect operation with reproduction steps, root cause, and remediation such as unique constraints or eventId dedup. - Use Case: A payment endpoint charges a customer twice when the client retries after a lost response; this Skill reproduces the double charge and pinpoints the missing idempotency-key verification. ## Quick Start Audit the checkout and rewards endpoints for idempotency by replaying identical requests and retries, then report any operation that produces duplicated effects.

Frequently Asked Questions about idempotency-audit

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

FAQPage Schema
How do I test an API endpoint for idempotency?▼

Send the same request multiple times with the same payload or idempotency key and compare the resulting effect. Then simulate a lost response followed by a retry, and check whether the server returns the original effect or executes the operation again.

What is an idempotency key and why does it matter?▼

An idempotency key is a stable identifier of the client's intent, such as an Idempotency-Key header or a webhook eventId. The server must look up the key before acting so a repeated request returns the original effect instead of duplicating it.

How do I prevent double charges on payment retries?▼

Require an idempotency key per charge attempt and enforce it with a unique constraint so the second insert fails. On retry, look up the existing charge by key and return it instead of charging again.

Why do webhooks get processed twice?▼

Providers redeliver events when they do not receive an acknowledgment, so the same eventId arrives more than once. Without deduplication on eventId, the handler processes the event again, duplicating effects like rewards or order updates.

Can two simultaneous requests bypass idempotency checks?▼

Yes, if both requests perform the key lookup before either one writes, both pass and both execute. A unique constraint on the idempotency key makes the second insert fail, closing the race.

When is a duplicated effect not a real finding?▼

Naturally idempotent operations like GET, absolute-value PUT, and DELETE should not be reported. Also exclude cases with proper key verification plus unique constraints, or counters that are approximate by design and tolerated by the product.