Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 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.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

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

    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.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Cannot choose or change authorization, business conflict handling, transaction isolation, cache policy, response bodies, status contracts, and idempotency; cannot verify production infrastructure or prove every runtime, proxy, network, or scheduler ordering.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Run on a clean branch with repository files and disposable local fixtures. Review every patch and validation result before merge. Keep production services, real credentials, customer payloads, and deployment out of scope.

    Listed2 months ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies and repairs architectural flaws where HTTP precondition checks (like If-Match) are performed outside of database transactions, which typically leads to lost updates and data corruption.

    It is compatible with any AI agent or IDE extension that has filesystem access, such as AutoDev, Cursor, or Windsurf, as it needs to analyze your local repository structure.

    The skill can refactor logic for any backend language or framework, provided it has access to the repository files where your API endpoint and database transaction logic are defined.

    You receive the specialized logic to audit and refactor your codebase, including the implementation of deterministic local fixtures to verify that concurrency fixes actually work.

    The skill focuses on application-level logic; it cannot resolve issues caused by external infrastructure like CDNs or Load Balancers that may be stripping or modifying ETag headers.

    Setup is minimal; once integrated into your agent, you simply point it at your repository, and it begins by auditing your read-modify-write cycles for atomicity gaps.

    New in APIs & Backend