brikko-studio-test-heap-leaks

Compare heap snapshots to classify memory growth in Vitest test lanes.

1|Updated May 3, 2026
One-click install
npx skills add https://github.com/brikkoAI/brikko-studio --skill brikko-studio-test-heap-leaks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brikko-studio-test-heap-leaks
Source: https://github.com/brikkoAI/brikko-studio/tree/main/packages/core/.agents/skills/openclaw-test-heap-leaks
Command: npx skills add https://github.com/brikkoAI/brikko-studio --skill brikko-studio-test-heap-leaks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill eliminates guesswork when debugging unexplained memory growth and out-of-memory (OOM) errors during Brikko Studio pnpm test runs, providing a structured workflow to identify root causes instead of relying on RSS estimates alone.

Core Features & Use Cases

  • Heap Snapshot Triage: Compares before/after heap snapshots to classify memory growth as retained module graph bloat or real runtime object leaks.
  • Lane-Specific Analysis: Targets specific Vitest test lanes and PIDs to avoid noise from unrelated test workers.
  • Runtime Leak Validation: Includes a dedicated harness to confirm that closure or lifecycle fixes actually release captured state. Use Case: If your unit-fast test lane OOMs after repeated runs, use this Skill to compare heap snapshots across intervals to determine if the growth comes from retained Vite transformed modules or uncleaned test state like unreleased DB handles or lingering timers.

Quick Start

Use the brikko-studio-test-heap-leaks skill to investigate the OOM errors in your latest pnpm test run by comparing heap snapshots from the failing test lane to identify the root cause of memory growth.

Frequently Asked Questions about brikko-studio-test-heap-leaks

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

FAQPage Schema
How do I debug out-of-memory errors during pnpm test runs?

Debug pnpm test out-of-memory errors by capturing and comparing heap snapshots from the failing test lane to classify memory growth as retained module bloat or real runtime object leaks. This structured triage identifies root causes deterministically instead of relying on RSS estimates.

Why does my Vitest worker memory spike after repeated test runs?

Vitest worker memory spikes after repeated runs happen when test state like unreleased DB handles, lingering timers, or retained Vite transformed modules are not cleaned up. Heap snapshot diffing isolates the specific lane and PID to confirm the retainer causing the growth.

What is the best way to triage heap snapshots for runtime closure leaks?

Triage heap snapshots for runtime closure leaks by comparing before and after snapshots to validate retainers and dominators. This confirms whether captured state from lifecycle fixes is actually released or continues to hold memory in the worker process.

Can I isolate heap delta analysis to a specific Vitest test lane?

Yes, you can isolate heap delta analysis to a specific Vitest test lane by tracking lane-specific PIDs. This avoids noise from unrelated test workers and ensures the memory growth classification accurately reflects the targeted failing tests.

How do I validate that a lifecycle fix actually releases captured test state?

Validate that a lifecycle fix releases captured test state by running a dedicated runtime leak validation harness. It compares heap snapshots before and after the fix execution to confirm the previously retained closures or handles are no longer dominators.