Soft Delete Contract Repair

    by Mariusz Wrzeszczynski

    1

    Repair soft-delete lifecycle drift in a repository using Cursor.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLIVVS CodeWWindsurfMManus+14 more

    See it in action

    You say

    My Prisma repo has inconsistent soft-delete filters. Users see deleted items in search results, and restoring a project leaves its tasks hidden. Fix the repository contract and visibility logic.

    Your agent does

    1. Repair decision

    Decision: SOFT-DELETE LIFECYCLE DRIFT FOUND — SAFE LOCAL PATCH AVAILABLE.

    I found 4 visibility leaks in project repositories and inconsistent task restoration logic. I have prepared a patch with centralized predicates and a restore preflight plan.

    What you get

    Eliminate deleted-record leaks in API list and detail views.Implement safe restoration with collision and dependency checks.Synchronize search and cache state with database deletion events.Prevent identifier collisions between active and deleted records.Audit and fix unsafe purge jobs and external storage cleanup.

    About this skill

    The problem

    Soft-delete logic often drifts across models, query scopes, and external services. This leads to deleted-record leaks in APIs, broken uniqueness constraints, orphaned child records, and stale data in search indexes or caches.

    What it does

    • Analyzes repository files to identify visibility leaks where soft-deleted records are accidentally exposed.
    • Repairs restore logic by adding preflight collision checks and dependency restoration plans.
    • Fixes search and cache projection drift by implementing versioned, idempotent event handling.
    • Secures external object storage by adding visibility gates to download paths.
    • Standardizes purge workflows using a state machine that separates intent, cleanup, and finalization.

    Frameworks & tools

    Works with any repository containing models, ORM schemas (Prisma, Django, TypeORM, etc.), API routes, and background workers.

    Why this beats prompting it yourself

    General prompting often misses the deep edge cases of soft deletion like identifier reuse and parent-child visibility inheritance. This skill traces the entire lifecycle across database, API, and infra layers to ensure a consistent contract rather than just applying a simple query filter.

    Use cases

    • Fixing API endpoints that still return deleted records via direct-ID lookups.
    • Preventing uniqueness collisions when recreating a record with a deleted slug or email.
    • Synchronizing search indexes and Redis caches when records are deleted or restored.
    • Building safe purge jobs that respect legal holds and verify storage cleanup before database commits.

    Known limitations

    Does not access production databases or real customer data. It cannot define your legal retention policies or verify deletion completeness in backups and logs.

    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

    Listedtoday

    Creator

    Mariusz Wrzeszczynski
    Mariusz Wrzeszczynski

    109 skills on Agensi

    Frequently Asked Questions

    Popular in AI Agents & LLM Ops