Works with the AI tools you already use
Repair ETag Precondition Races
Repair ETag and HTTP precondition bugs that allow lost updates, stale overwrites, incorrect 304/412 responses, or weak-validator misuse.
Secure checkout via Stripe
See it in action
You say
Our Java REST API reads the row version, checks If-Match in the controller, then updates in a separate transaction. Two writers can both pass and one silently overwrites the other. Repair with barriers and an in-memory repository. Preserve authorization, transaction isolation, conflict response body, audit events, and retry policy.
Your agent does
Atomic-precondition defect found. The controller validates ETag against a detached snapshot, while the later update predicate does not include that version, so both writers can pass. The repair moves strong If-Match enforcement into the atomic write condition, preserves authorization/audit/conflict contracts, distinguishes wildcard and weak validators, and proves exactly one winner with deterministic barriers.
What you get
About this skill
The problem
Race conditions occur when HTTP If-Match checks are evaluated outside of the database transaction, leading to lost updates or stale data corruption. Weak ETags are often incorrectly accepted for unsafe methods, or 304/412 status codes are reversed, breaking client-side caching logic.
What it does
- Audits repository code to find non-atomic precondition checks in read-modify-write cycles.
- Refactors ETag generation to ensure validators accurately identify specific representation versions.
- Standardizes strong versus weak comparison logic and wildcard semantics across create and update paths.
- Implements deterministic local fixtures and barriers to verify concurrency fixes without production access.
- Injects redacted observability to track rejections and terminal state transitions.
Why this beats prompting it yourself
General LLMs often suggest simple retries or lock-waits that don't address the underlying architectural flaw of non-atomic validation. This skill enforces a strict resource register and failure timeline, ensuring the fix is bound to the transaction lifecycle rather than just adding "optimistic" fluff.
Use cases
- Preventing two concurrent writes from both passing a stale If-Match precondition.
- Correcting repository logic where 304 Not Modified is sent for changed resources.
- Hardening API endpoints that allow weak ETags for PUT or PATCH operations.
- Fixing inconsistent wildcard handling between resource creation and updates.
Known limitations
Requires access to local repository files to inspect logic. It cannot fix issues residing in external load balancers, CDNs, or third-party API gateways that strip headers.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- One-time purchase, yours forever