Agent skill · data analytics · aj-geddes

memory-leak-detection

Detect and fix memory leaks using heap snapshots, memory profiling, and leak detection tools. Use when investigating memory growth, OOM errors, or optimizing memory usage.

Why this skill is useful

Provides specific implementation patterns and tools for detecting and fixing memory leaks that the AI wouldn't reliably generate on its own.

What it needs

About 1k tokens when loaded. Last updated 2026-03-04. 307 stars on the source repository.

What this skill does

Memory Leak Detection Table of Contents Overview When to Use Quick Start Reference Guides Best Practices Overview Identify and fix memory leaks to prevent out-of-memory crashes and optimize application performance. When to Use Memory usage growing over time Out of memory (OOM) errors Performance degradation Container restarts High memory consumption Quick Start Minimal working example: Reference Guides Detailed implementations in the references/ directory: Guide Contents --- --- Node.js Heap Snapshots Node.js Heap Snapshots Memory Leak Detection Middleware Memory Leak Detection Middleware Common Memory Leak Patterns Common Memory Leak Patterns Python Memory Profiling Python Memory Profiling WeakMap/WeakRef for Cache WeakMap/WeakRef for Cache Memory Monitoring in Production Memory Monitoring in Production Best Practices ✅ DO Remove event listeners when done Clear timers and intervals Use WeakMap/WeakRef for caches Limit cache sizes Monitor memory in production Profile regularly Clean up after tests ❌ DON'T Create circular references Hold references to large objects unnecessarily Forget to clean up resources Ignore memory growth Skip WeakMap for object caches

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aj-geddes/memory-leak-detection

View the source on GitHub

Browse the @skills marketplace