# Idempotency test author

> Idempotency test author is an open-source agent skill for documentation review. Writes tests proving repeated requests and messages cause no extra side effects. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/testland/qa/tree/main/plugins/qa-async-jobs/skills/idempotency-test-author
- **Repository:** https://github.com/testland/qa
- **GitHub stars:** 18
- **License:** MIT
- **Skill name:** idempotency-test-author
- **Collection:** https://github.com/testland/qa
- **Categories:** [documentation review](https://ai-powered.com/categories/documentation-review)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through writing tests for handlers that may receive the same input more than once, such as queue consumers, retried API calls and webhook receivers. It walks through classifying the delivery semantics of the system, then covers the idempotency-key pattern where the server stores a key with its response and returns the cached result on duplicates, including rejecting a reused key that carries a different body.

The workflow also covers tests for idempotency windows and TTL expiry, race conditions where two duplicates arrive at once and must be handled by an atomic check, and designs based on transaction-id deduplication for systems that cannot add keys. A per-handler checklist ties these together, and the skill lists common anti-patterns such as check-then-insert logic and missing TTLs.

Examples are written in Python with pytest and a clock-freezing fixture, but the skill says tests should use the application's existing framework such as JUnit or RSpec. It runs no scripts and expects the target handler's source code and test setup to be available in the repository.

## When your agent uses it

> Use whenever the same request or message could be processed twice (at-least-once queues, retries, webhook redelivery, double clicks, mobile retries) and duplicates must have no extra effect. Tests idempotency keys, delivery semantics, fingerprint dedup and the idempotency window.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/testland/qa/tree/HEAD/plugins/qa-async-jobs/skills/idempotency-test-author)
- [License: MIT](https://github.com/testland/qa/tree/HEAD/plugins/qa-async-jobs/skills/idempotency-test-author)

## Features

- **Delivery semantics triage:** Classifies a system as exactly-once, at-least-once or at-most-once to decide how strict the tests must be.
- **Idempotency key tests:** Checks that duplicate keys return the cached response and that a reused key with a different body is rejected.
- **Key expiry window:** Covers choosing a TTL for idempotency keys and testing that a key expires as intended.
- **Concurrent duplicate races:** Tests that two simultaneous requests with the same key cannot both pass the duplicate check.
- **Commutative side effects:** Designs transaction-id deduplication with atomic upserts for endpoints that cannot accept keys.
- **Per-handler test checklist:** A step list covering happy path, duplicates, expiry, races and broker redelivery for each handler.

## Good for

- Write idempotency tests for a payment charge endpoint
- Check that an SQS consumer does not double-process redelivered messages
- Add duplicate protection to a webhook receiver
- Review a PR that adds a new POST endpoint for idempotent behavior
- Test that concurrent retries with the same key create only one record

## Install

### Claude Code

This skill ships in the `qa-async-jobs` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add testland/qa
/plugin install qa-async-jobs@testland-qa
```

Or copy only this skill to `~/.claude/skills/idempotency-test-author`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/idempotency-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/idempotency-test-author" ~/.claude/skills/idempotency-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/idempotency-test-author` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/idempotency-test-author` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/idempotency-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/idempotency-test-author" ~/.agents/skills/idempotency-test-author &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/idempotency-test-author` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/idempotency-test-author` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/idempotency-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/idempotency-test-author" ~/.cursor/skills/idempotency-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/idempotency-test-author` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/testland/qa.git --path plugins/qa-async-jobs/skills/idempotency-test-author
```

Or copy the folder to `~/.gemini/skills/idempotency-test-author` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/idempotency-test-author`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/idempotency-test-author &&
cp -R "$tmp/plugins/qa-async-jobs/skills/idempotency-test-author" ~/.copilot/skills/idempotency-test-author &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/idempotency-test-author` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/testland/qa.git
```

Then copy `qa/plugins/qa-async-jobs/skills/idempotency-test-author` into your agent's skills folder as `idempotency-test-author`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Idempotency test author be used?

Whenever the same request or message could be processed twice, such as at-least-once queues, retries, webhook redelivery, double clicks or mobile retries, and duplicates must have no extra effect.

### Does Idempotency test author install tools or run scripts?

No. The skill has no scripts, and it says tests use the application's existing test framework such as pytest, JUnit or RSpec.

### What does Idempotency test author recommend for systems that cannot add idempotency keys?

It recommends a transaction-id or fingerprint with an atomic upsert such as ON CONFLICT DO NOTHING, so the effect runs once.

### What TTL does Idempotency test author suggest for idempotency keys?

It suggests 24 hours for Stripe-style APIs, one hour for internal HTTP retries, the SQS message retention period for SQS consumers and seven days for webhook receivers.

### How do I install Idempotency test author in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/idempotency-test-author to use it in all your projects, or to .claude/skills/idempotency-test-author in one project. Or install the qa-async-jobs plugin, which includes it: /plugin marketplace add testland/qa, then /plugin install qa-async-jobs@testland-qa.

### Does Idempotency test author run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Idempotency test author?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Idempotency test author?

The closest alternatives to Idempotency test author are Odylith atlas auto update, Odylith atlas render, Odylith diagram catalog, Odylith component registry and Odylith registry sync specs.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Odylith atlas auto update](https://ai-powered.com/skills/odylith-atlas-auto-update-odylith): Odylith atlas auto update is an open-source agent skill for developer tools.
- [Odylith atlas render](https://ai-powered.com/skills/odylith-atlas-render-odylith): Odylith atlas render is an open-source agent skill for developer tools.
- [Odylith diagram catalog](https://ai-powered.com/skills/odylith-diagram-catalog-odylith): Odylith diagram catalog is an open-source agent skill for developer tools.
- [Odylith component registry](https://ai-powered.com/skills/odylith-component-registry-odylith): Odylith component registry is an open-source agent skill for developer tools.
- [Odylith registry sync specs](https://ai-powered.com/skills/odylith-registry-sync-specs-odylith): Odylith registry sync specs is an open-source agent skill for developer tools.
- [Odylith registry spec sync](https://ai-powered.com/skills/odylith-registry-spec-sync-odylith): Odylith registry spec sync is an open-source agent skill for developer tools.
- [Create GitHub action workflow specification](https://ai-powered.com/skills/create-github-action-workflow-specification-vulnex): Create GitHub action workflow specification is an open-source agent skill for developer tools.
- [Glossary audit](https://ai-powered.com/skills/glossary-audit): Glossary audit is an open-source agent skill for documentation review.

---
Source: https://ai-powered.com/skills/idempotency-test-author
