Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+20 more

    Repair ETag Precondition Races

    1

    Repair ETag and HTTP precondition bugs that allow lost updates, stale overwrites, incorrect 304/412 responses, or weak-validator misuse.

    $5

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    0 installsSecurity scanned
    Repair ETag Precondition Races

    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

    Ensure If-Match checks are atomically bound to the write transaction.Standardize ETag generation and strong/weak comparison semantics.Implement deterministic local tests for concurrent write collisions.Fix reversed 304 and 412 response status code logic.

    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.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 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

    Listed1 month ago
    Updatedtoday

    What's inside

    Frequently Asked Questions