Agent skill

Detecting Memory Leaks

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Detect potential memory leaks and analyze memory usage patterns in code.

MITAuto-check passedDevelopment

Install Detecting Memory Leaks

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-memory-leaks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace detecting-memory-leaks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/detecting-memory-leaks .claude/skills/detecting-memory-leaks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
detecting-memory-leaks
GitHub stars
2.8k
Token cost
~934 tokens
SKILL.md length
423 words
Files
7 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Detect potential memory leaks and analyze memory usage patterns in code.

  • Works in 3 steps: Initiate Analysis: The user requests… → Code Analysis: The plugin analyzes the… → Report Generation: The plugin generates…
  • Troubleshooting performance issues related to memory growth
  • SKILL.md covers Overview, How It Works, When to Use This Skill and Examples, plus 7 more sections
  • Runs Python scripts from its folder

What it does

Detecting Memory Leaks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Detect potential memory leaks and analyze memory usage patterns in code. Use when troubleshooting performance issues related to memory growth or identifying leak sources. Trigger with phrases like "detect memory leaks", "analyze memory usage", or "find memory issues".

Its SKILL.md is about 930 tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code

It sits in Development, covering Performance optimization. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Troubleshooting performance issues related to memory growth
  • Identifying leak sources
  • With phrases like detect memory leaks
  • Analyze memory usage

Example prompts

  • “detect memory leaks”
  • “analyze memory usage”
  • “find memory issues”
  • “/detecting-memory-leaks”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(profiling:*), Bash(memory:*)

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Initiate Analysis: The user requests memory leak detection.
  2. Code Analysis: The plugin analyzes the codebase for potential memory leak patterns.
  3. Report Generation: The plugin generates a report detailing potential memory leaks and recommended fixes.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(profiling:*)
    • Bash(memory:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Detecting Memory Leaks loads about 934 tokens when it runs, and up to ~950 if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 423 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~934
With references · SKILL.md plus every file in references/, read only if the agent opens them
~950

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 423 words, ~934 tokens.

Download SKILL.mdSave it as .claude/skills/detecting-memory-leaks/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
detecting-memory-leaks
description
Detect potential memory leaks and analyze memory usage patterns in code. Use when troubleshooting performance issues related to memory growth or identifying leak sources. Trigger with phrases like "detect memory leaks", "analyze memory usage", or "find memory issues".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(profiling:*), Bash(memory:*)
compatibility
Designed for Claude Code
version
1.24.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
performance, detecting-memory

Memory Leak Detector

Detect and diagnose memory leaks in Node.js, Python, and JVM applications by analyzing event listeners, closures, unbounded caches, and retained references.

Overview

This skill helps you identify and resolve memory leaks in your code. By analyzing your code for common memory leak patterns, it can help you improve the performance and stability of your application.

How It Works

  1. Initiate Analysis: The user requests memory leak detection.
  2. Code Analysis: The plugin analyzes the codebase for potential memory leak patterns.
  3. Report Generation: The plugin generates a report detailing potential memory leaks and recommended fixes.

When to Use This Skill

This skill activates when you need to:

  • Detect potential memory leaks in your application.
  • Analyze memory usage patterns to identify performance bottlenecks.
  • Troubleshoot performance issues related to memory leaks.

Examples

Example 1: Identifying Event Listener Leaks

User request: "detect memory leaks in my event handling code"

The skill will:

  1. Analyze the code for unremoved event listeners.
  2. Generate a report highlighting potential event listener leaks and suggesting how to properly remove them.
Example 2: Analyzing Cache Growth

User request: "analyze memory usage to find excessive cache growth"

The skill will:

  1. Analyze cache implementations for unbounded growth.
  2. Identify caches that are not properly managed and recommend strategies for limiting their size.

Best Practices

  • Code Review: Always review the reported potential leaks to ensure they are genuine issues.
  • Regular Analysis: Incorporate memory leak detection into your regular development workflow.
  • Targeted Analysis: Focus your analysis on specific areas of your code that are known to be memory-intensive.
Show full SKILL.md (163 more words)Show less

Integration

This skill can be used in conjunction with other performance analysis tools to provide a comprehensive view of application performance.

Prerequisites

  • Access to application source code in ${CLAUDE_SKILL_DIR}/
  • Memory profiling tools (valgrind, heapdump, etc.)
  • Understanding of application memory architecture
  • Runtime environment for testing

Instructions

  1. Analyze code for common memory leak patterns
  2. Identify unremoved event listeners and callbacks
  3. Check for unbounded cache growth
  4. Review closure usage and retained references
  5. Generate report with leak locations and severity
  6. Provide remediation recommendations

Output

  • Memory leak detection report with file locations
  • Pattern analysis for event listeners and caches
  • Memory usage trends and growth patterns
  • Code snippets highlighting potential leaks
  • Recommended fixes with code examples

Error Handling

If memory leak detection fails:

  • Verify code file access permissions
  • Check profiling tool installation
  • Validate code syntax and structure
  • Ensure sufficient memory for analysis
  • Review runtime environment configuration

Resources

  • Memory profiling tool documentation
  • Memory leak detection best practices
  • JavaScript/Node.js memory management guides
  • Performance optimization resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references, assets) in skills/.curated/detecting-memory-leaks of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • references/README.md
  • scripts/README.md
  • scripts/analyze_memory.py
  • scripts/generate_report.py
  • scripts/setup_environment.py

Open the folder on GitHubat commit cfae287

Compare with similar skills

Detecting Memory Leaks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Detecting Memory Leaks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Detecting Memory Leaks this skilljeremylongshore/tons-of-skills-marketplace2.8k—~934Automated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT
LLM Torch Profiler Analysissgl-project/sglang37k2 repos~6.4kAutomated safety check: PassApache-2.0
Pycrazyguitar/pysheeet8.2k—~886Automated safety check: PassMIT
Cmux Debugging Guidemanaflow-ai/cmux28k1 repos~1.1kAutomated safety check: PassCustom licence
Analyzing .NET Performancedotnet/skills5.6k3 repos~3.1kAutomated safety check: PassMIT

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • LLM Torch Profiler Analysis

    sgl-project/sglang

    Unified LLM torch-profiler triage skill for sglang, vllm, TensorRT-LLM, and TokenSpeed.

    37k GitHub starsUsed in 2 repos~6.4k tokens
    DevelopmentAuto-check passed
  • Py

    crazyguitar/pysheeet

    Comprehensive Python programming reference covering syntax, concurrency, networking, databases, ML/LLM development, and HPC.

    8.2k GitHub stars~886 tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Cmux Debugging Guide

    manaflow-ai/cmux

    Covers debug logging, the Debug menu, profiling rules and runtime pitfalls for working on the cmux macOS terminal app.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Scans C# and .NET code for about 50 performance anti-patterns and reports prioritized findings with concrete fixes, at a scan depth you choose.

    5.6k GitHub starsUsed in 3 repos~3.1k tokens
    DevelopmentAuto-check passed
  • Analyzes V8, Chrome and Electron .heapsnapshot files with Node scripts to find memory leaks, detached DOM nodes and the retainer paths that keep objects alive.

    9.3k GitHub stars~875 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Categories

Questions about Detecting Memory Leaks

What does Detecting Memory Leaks do?

Detect potential memory leaks and analyze memory usage patterns in code. Detecting Memory Leaks is an agent skill from jeremylongshore/tons-of-skills-marketplace. Detect potential memory leaks and analyze memory usage patterns in code.

When should I use Detecting Memory Leaks?

Detecting Memory Leaks fits situations like: troubleshooting performance issues related to memory growth; identifying leak sources; with phrases like detect memory leaks; analyze memory usage.

How do I install Detecting Memory Leaks in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-memory-leaks -a claude-code`. Or copy the skill folder (skills/.curated/detecting-memory-leaks in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/detecting-memory-leaks in your project. Claude Code loads it when a task matches its description.

How do I install Detecting Memory Leaks in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-memory-leaks -a codex`. Or copy the skill folder (skills/.curated/detecting-memory-leaks in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/detecting-memory-leaks in your project. Codex loads it when a task matches its description.

Can I use Detecting Memory Leaks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill detecting-memory-leaks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/detecting-memory-leaks, .gemini/skills/detecting-memory-leaks, .github/skills/detecting-memory-leaks and .opencode/skills/detecting-memory-leaks in your project.

What does Detecting Memory Leaks need to run?

Going by SKILL.md and its folder, Detecting Memory Leaks needs Python for the scripts in its folder. Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(profiling:*), Bash(memory:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Detecting Memory Leaks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Detecting Memory Leaks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Detecting Memory Leaks use?

Detecting Memory Leaks is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Detecting Memory Leaks use?

About 934 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16 tokens, read only when the agent opens those files.

What are the alternatives to Detecting Memory Leaks?

Skills that share tags, products or a category with Detecting Memory Leaks: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), LLM Torch Profiler Analysis (sgl-project/sglang, 37k stars), Py (crazyguitar/pysheeet, 8.2k stars) and Cmux Debugging Guide (manaflow-ai/cmux, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Detecting Memory Leaks?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.