Memory Leak Detection
Detects memory leaks in Node.js and Python using heap snapshots, profiling, and production monitoring.
- CCM score
- 39 of 100
- skills.sh installs
- 594
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers investigating memory growth, OOM errors, and performance degradation through heap snapshots and memory profiling
- Includes reference guides for Node.js heap snapshots, leak detection middleware, Python memory profiling, and WeakMap/WeakRef caching
- Provides a
MemoryProfilerclass that writes V8 heap snapshots and prints RSS, heap, and external memory usage - Designed for developers diagnosing container restarts, high memory consumption, or unbounded cache growth
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill memory-leak-detection -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Memory Leak Detection
Table of Contents
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:
import v8 from "v8";
import fs from "fs";
class MemoryProfiler {
takeSnapshot(filename: string): void {
const snapshot = v8.writeHeapSnapshot(filename);
console.log(`Heap snapshot saved to ${snapshot}`);
}
getMemoryUsage(): NodeJS.MemoryUsage {
return process.memoryUsage();
}
formatMemory(bytes: number): string {
return `${(bytes / 1024 / 1024).toFixed(2)} MB`;
}
printMemoryUsage(): void {
const usage = this.getMemoryUsage();
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Category
- Debugging
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Technical Roadmap Planning585
- Accessibility Testing584
- Push Notification Setup583
- Database Schema Documentation581
- Data Visualization577
- Security Audit Logging574
- App Store Deployment572
- Mobile App Debugging572
- Bundle Size Optimization570
- Process Mapping570
- Integration Testing566
- Oauth Implementation561
- Memory Optimization557
- Semantic Versioning556
- Caching Strategy553
- Web Performance Audit551
- Real Time Features550
- Browser Debugging548
- Mobile Offline Support548
- Causal Inference546
- Design System Creation546
- Gcp Cloud Run546
- Code Generation Template540
- Sql Injection Prevention539
Similar to Memory Leak Detection
More Debuggingmemory-optimizationSkillaj-geddes/useful-ai-prompts557 installsGuide for profiling and fixing application memory use, leaks, and out-of-memory crashes.
memory-leak-debuggingSkillchromedevtools/chrome-devtools-mcp4.1K installsDiagnoses JavaScript and Node.js memory leaks by comparing heap snapshots through Chrome DevTools MCP memory tools.
cpu-profilingSkillaj-geddes/useful-ai-prompts457 installsProfile CPU usage to find hot spots and bottlenecks, then guide targeted optimization of expensive code paths.
memory-profilerPluginrohitg00/awesome-claude-code-toolkit2.9K starsMemory leak detection and heap analysis
valgrindSkillmohitmishra786/low-level-dev-skills851 installsValgrind skill for Memcheck memory error detection, plus Cachegrind, Callgrind, and Massif profiling.
heaptrackSkillmohitmishra786/low-level-dev-skills779 installsLinux heap profiler that records allocation traces, finds leaks, and compares memory use across runs.