openclaw-test-heap-leaks

Compare heap snapshots to detect memory leaks in Vitest test runs.

1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Arry8/openclaw-edge --skill openclaw-test-heap-leaks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openclaw-test-heap-leaks
Source: https://github.com/Arry8/openclaw-edge/tree/main/.agents/skills/openclaw-test-heap-leaks
Command: npx skills add https://github.com/Arry8/openclaw-edge --skill openclaw-test-heap-leaks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Skill helps identify and diagnose test memory growth by comparing heap snapshots to locate memory leaks in OpenClaw test suites.

Core Features & Use Cases

  • Heap snapshot delta analysis to surface top memory deltas
  • Lane-based and two-file comparison modes to match real CI scenarios
  • Guidance for classifying growth as module retention vs runtime object leaks
  • Reproducibility in CI pipelines and local development for faster fixes

Quick Start

Run the heapsnapshot-delta tool to compare two snapshots and surface the top memory deltas.

Frequently Asked Questions about openclaw-test-heap-leaks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose memory leaks in Vitest using heap snapshots?

You can diagnose memory leaks by comparing heap snapshots to locate memory growth. The tool analyzes heap snapshot deltas across lanes and workers to identify retention patterns in Vitest test suites.

Can I compare two heap snapshot files to find memory growth?

Yes, you can compare two heap snapshot files to find memory growth. The tool supports two-file input comparison and lane-based comparisons to surface top memory deltas matching real CI scenarios.

How do I classify module retention versus runtime object leaks?

Heap snapshot delta analysis provides guidance for classifying memory growth as module retention versus runtime object leaks. It surfaces top memory deltas to help pinpoint the exact retention patterns in your tests.

Does this heap snapshot analysis work in both local and CI test runs?

Yes, heap snapshot analysis works in both CI pipelines and local development. It applies to CI and local test runs using Vitest and Vite, enabling repeated snapshots across workers to ensure reproducibility for faster fixes.

How do I configure memory leak thresholds and select a specific PID?

You can configure memory leak thresholds and select a specific PID via command-line options. The tool implemented in heapsnapshot-delta.mjs accepts optional PID selection and configurable thresholds to refine your analysis.