- Home
- Skills
- APIs & Backend
- Repair ETag Precondition Races
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.
$5
Repair ETag Precondition Races
Example session with this skill installed
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.
- Read your context and instructions
- Compiled the repair etag precondition
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.
Connects securely to your tools. The creator never sees your data.
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
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
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 1 month ago
- Passed all security checks, Safe to install