idempotency-review
Review payment APIs, retry-safe handlers, duplicate request prevention, replay responses, idempotency keys, and backend idempotency design for production retry safety.
- License 许可
- MIT
- 最近更新
- 2026-07-24
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- idempotency-review
- description
- Review payment APIs, retry-safe handlers, duplicate request prevention, replay responses, idempotency keys, and backend idempotency design for production retry safety.
03 SKILL.md 正文
When to Use
- Payment, order, billing, webhook, or job changes.
- Handlers can receive duplicate requests.
- Workers or external calls can retry.
- Idempotency keys or replay responses are introduced.
When NOT to Use
- Generic CRUD without retry or duplicate execution risk.
- Frontend-only validation.
- Auth-only review without state mutation.
Workflow
- Identify the operation that must be idempotent.
- Identify the idempotency key and its scope.
- Check storage, locking, replay, and expiry behavior.
- Review partial failure and concurrent duplicate handling.
- Report unsafe retry and replay risks.
Review Steps
- Confirm key uniqueness by tenant, actor, and operation.
- Check request hash or parameter mismatch handling.
- Verify replay returns the original response when needed.
- Check concurrent first-writer behavior.
- Verify external side effects are not duplicated.
- Confirm expiry, cleanup, and observability are defined.
Constraints
- Do not assume retries are rare.
- Do not rely only on clients for duplicate prevention.
- Do not log raw keys when they contain sensitive data.
- Keep recommendations implementation-neutral.
Expected Outputs
- Idempotency boundary and key scope.
- Duplicate execution risks.
- Required storage or locking guarantees.
- Replay response behavior.
- Tests for retry, concurrency, and partial failure.
04 同仓库更多 Skills
skill-name
Describe what this skill reviews and when to use it.
retry-safe-worker
Review backend workers, queues, schedulers, and async jobs for retry safety, deduplication, cancellation, poison message handling, rollback, and operational recovery.
observability-review
Review backend logging, metrics, tracing, audit events, error context, alert quality, and safe diagnostic detail for production operations.
github-actions-review
Review GitHub Actions workflows for backend CI, secret exposure, permissions, dependency install, cache safety, pinned actions, and release or deployment risk.
docker-devex
Review Docker, Compose, local dependencies, bootstrap scripts, developer ergonomics, reproducibility, security defaults, and backend local environment reliability.
devcontainer-review
Review devcontainer configuration for backend reliability, toolchain reproducibility, secrets, Docker integration, VS Code settings, and safe local onboarding.