Repair File Descriptor Leaks

    by Mariusz Wrzeszczynski

    1

    Repair file descriptor and handle leaks from files, streams, watchers, pipes, subprocesses, early returns, retries, errors, and cancellations.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Our Node/TypeScript service processes uploaded ZIPs. It opens an input stream, unzip parser, output streams, and sometimes a helper subprocess. If one entry fails validation, the function returns early. After hundreds of failed generated uploads, local tests reproduce EMFILE and open handles keep rising. Repair using temporary ZIPs and disposable subprocesses. Do not access customer files, change ulimit, or inspect production descriptors.

    Your agent does

    Descriptor leak found. The repair centralizes ownership and cleanup and adds repeated-failure tests returning local handle counts to baseline. Production descriptor usage remains unverified.

    What you get

    Identify unclosed sockets in error handling and retry logic.Implement structured cleanup for subprocess stdio and pipes.Fix filesystem watcher accumulation in long-running services.Generate deterministic leak tests using loopback sockets and temp files.

    About this skill

    File descriptor leaks often hide until a process has handled hundreds of failures. A stream stays open after an early return, a watcher is recreated without stopping the old one, or subprocess pipes remain open.

    This skill maps ownership, repairs acquire/use/release lifecycles, makes cleanup deterministic, and proves local descriptor stability with repeated fixtures.

    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

    Frequently Asked Questions

    Popular in AI Agents & LLM Ops