What problem does it solve? Test suites that grow in memory until Vitest workers hit out-of-memory errors are hard to diagnose from RSS numbers alone. This Skill provides a repeatable workflow to reproduce memory growth in OpenClaw's pnpm test runs, capture periodic .heapsnapshot files, and determine whether growth comes from retained transformed modules in long-lived workers or from genuine application-level leaks. ## Core Features & Use Cases - Heap Snapshot Delta Analysis: The bundled heapsnapshot-delta.mjs script compares two snapshots directly or auto-selects the earliest/latest snapshots per PID within a lane directory, reporting top retained object families by size and count delta. - Leak Classification Workflow: Guides you to distinguish Vite/Vitest transformed-module retention (strings, Module, bytecode, descriptor arrays) from real leaks (caches, buffers, timers, DB handles, mock state) before choosing a fix. - Targeted Remediation: For module-graph growth, isolate hotspot files via singletonIsolated in test/fixtures/test-parallel.behavior.json; for real leaks, patch missing afterEach/afterAll cleanup, module resets, or unreleased handles. - Use Case: A CI unit-test lane OOMs at 6GB. You rerun with OPENCLAW_TEST_HEAPSNAPSHOT_INTERVAL_MS=60000, compare snapshots from the same worker PID in .tmp/heapsnap/unit-fast, find growth dominated by transformed source strings from two files missing from timings, and move them to isolated lanes to stop the OOM. ## Quick Start Ask the agent to reproduce the test memory growth with heap snapshots enabled and compare snapshots from the same worker PID to identify whether the growth is a real leak or retained module graph.