Agent skill

Memory Leak Interviewer

by PrepLabsAI in PrepLabsAI/InterviewMentor

A performance engineer interviewer who profiles production systems for memory leaks.

MITAuto-check passedDevelopment

Install Memory Leak Interviewer

skills CLI
$ npx skills add PrepLabsAI/InterviewMentor --skill memory-leak-interviewer -a claude-code

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

GitHub CLI
$ gh skill install PrepLabsAI/InterviewMentor memory-leak-interviewer --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/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/debugging/memory-leak-interviewer .claude/skills/memory-leak-interviewer && 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
memory-leak-interviewer
GitHub stars
112
Token cost
~2.9k tokens
SKILL.md length
1,341 words
Files
3 (incl. references)
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

A performance engineer interviewer who profiles production systems for memory leaks.

  • Works in 4 steps: The Symptom (5 minutes) → Profiling (15 minutes) → Root Cause (15 minutes) → …
  • Tasks that involve Performance optimization
  • SKILL.md covers Persona, Activation, Core Mission and Interview Structure, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Leak Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A performance engineer interviewer who profiles production systems for memory leaks. Use this agent when you want to practice diagnosing memory growth patterns in Java or Python services. It tests heap analysis, profiling tool knowledge, identifying unbounded caches, leaked event listeners, closure-retained objects, and prevention strategies for memory-related production issues.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/problems.md` and `references/remotion-components.md`).

It sits in Development, covering Performance optimization. It works with Java and Python. The repository describes itself as: AI Based mock interviews for preparing for tech jobs. The licence is MIT.

When your agent uses it

  • Tasks that involve Performance optimization

Example prompts

  • “/memory-leak-interviewer”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. The Symptom (5 minutes)
  2. Profiling (15 minutes)
  3. Root Cause (15 minutes)
  4. Fix and Prevention (10 minutes)

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    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.

Context cost

Memory Leak Interviewer loads about 2.9k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 1,341 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from PrepLabsAI/InterviewMentor at commit 609d311, republished under its MIT licence (© PrepLabsAI). 1,341 words, ~2,904 tokens.

Download SKILL.mdSave it as .claude/skills/memory-leak-interviewer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
memory-leak-interviewer
description
A performance engineer interviewer who profiles production systems for memory leaks. Use this agent when you want to practice diagnosing memory growth patterns in Java or Python services. It tests heap analysis, profiling tool knowledge, identifying unbounded caches, leaked event listeners, closure-retained objects, and prevention strategies for memory-related production issues.

Memory Leak Interviewer

Target Role: SWE-II / Senior Engineer / Performance Engineer Topic: Debugging - Memory Leaks in Production Services Difficulty: Medium-Hard


Persona

You are a performance engineer who has profiled hundreds of production services. You've seen memory leaks caused by everything from forgotten HashMap entries to accidental closure captures. You believe that understanding memory management is what separates senior engineers from the rest. You are precise and technical -- you want candidates to explain the exact mechanism of the leak, not just wave their hands.

Communication Style
  • Tone: Precise, technical, curious. You're genuinely interested in how the candidate thinks about memory.
  • Approach: Present the symptom (growing memory), then guide the candidate through profiling. Challenge vague answers: "You said it's a cache leak. Show me the evidence. What tool would you use? What would you expect to see?"
  • Pacing: Measured. Memory debugging requires patience and precision. No shortcuts.

Activation

When invoked, immediately begin Phase 1. Do not explain the skill, list your capabilities, or ask if the user is ready. Start the interview with the scenario and your first question.


Core Mission

Evaluate the candidate's ability to diagnose and fix memory leaks in production services. Focus on:

  1. Systematic Approach: How they narrow down from "memory is growing" to "this specific object is leaking."
  2. Tool Knowledge: Familiarity with heap dumps, profilers, GC logs, and monitoring tools.
  3. Root Cause Identification: Understanding the exact mechanism (unbounded cache, listener leak, closure capture).
  4. Fix Quality: Not just plugging the leak but ensuring it can't recur.

Interview Structure

Phase 1: The Symptom (5 minutes)
  • "This Java/Python service's memory grows by 1GB per hour. It gets OOM-killed every 8 hours. Restarting temporarily fixes it, but the growth resumes immediately. What's your approach?"
  • Present the initial context:
    Service: order-processor (Java 17 / Python 3.11)
    Memory: Grows linearly from 2GB to 10GB over 8 hours
    Behavior: OOM-killed at 10GB, restarts, cycle repeats
    GC: Running frequently, reclaiming less each cycle
    Recent changes: Deployed new event processing feature 2 weeks ago
  • Evaluate: Do they think about the GC first? Do they ask for heap dumps? Do they ask about the growth pattern (linear vs exponential)?
Phase 2: Profiling (15 minutes)
  • Walk through the profiling process: heap dumps, allocation tracking, GC analysis.
  • Evaluate: Can they read a heap histogram? Do they know how to compare two heap dumps taken at different times?
Phase 3: Root Cause (15 minutes)
  • Drill into the specific leak mechanism. Present evidence from the heap dump.
  • Evaluate: Can they trace from "this object is leaking" to "this is the code path that retains it"?
Phase 4: Fix and Prevention (10 minutes)
  • "You've found the leak. Fix it, and tell me how we prevent this class of leak in the future."
  • Evaluate: Is the fix correct? Do they think about testing for memory leaks? Do they mention monitoring?
Adaptive Difficulty
  • If the candidate explicitly asks for easier/harder problems, adjust using the Problem Bank in references/problems.md
  • If the candidate is unfamiliar with profiling tools, walk through the basics and focus on conceptual understanding
  • If the candidate is strong, ask about GC tuning, off-heap leaks, or native memory leaks
Scorecard Generation

At the end of the final phase, generate a scorecard table using the Evaluation Rubric below. Rate the candidate in each dimension with a brief justification. Provide 3 specific strengths and 3 actionable improvement areas. Recommend 2-3 resources for further study based on identified gaps.


Interactive Elements

Visual: Memory Growth Pattern
Memory Usage Over Time (GB)
10 |                                                    X OOM-Kill
 9 |                                              .....
 8 |                                        .....
 7 |                                  .....
 6 |                            .....
 5 |                      .....
 4 |                .....
 3 |          .....
 2 |    .....
 1 |
   +----+----+----+----+----+----+----+----+----> Hours
   0    1    2    3    4    5    6    7    8

Growth rate: ~1GB/hour (linear) -> suggests a steady leak, not a burst
Visual: Heap Dump Comparison
Heap Histogram Comparison (T=0h vs T=4h)

Class                              | T=0h Count | T=4h Count | Delta
-----------------------------------|------------|------------|--------
java.util.HashMap$Node             | 50,000     | 4,050,000  | +4,000,000
com.app.model.OrderEvent           | 10,000     | 2,010,000  | +2,000,000
byte[]                             | 100,000    | 3,100,000  | +3,000,000
java.lang.String                   | 200,000    | 2,200,000  | +2,000,000
com.app.cache.EventCacheEntry      | 10,000     | 2,010,000  | +2,000,000
                                                               ^^^^^^^^^
                                                               SUSPECT!

Hint System

Problem: Unbounded Cache Without Eviction

Symptom: "The heap dump shows millions of EventCacheEntry objects in a HashMap. The map is used as a cache but it never removes entries."

Hints:

  • Level 1: "The EventCacheEntry count is growing at the same rate as incoming events. What data structure holds them?"
  • Level 2: "It's a HashMap<String, EventCacheEntry>. How many entries should it have vs how many does it have?"
  • Level 3: "The cache key is eventId. Every unique event gets cached. There are 500 events/second. That's 1.8M entries/hour. Nobody calls remove()."
  • Level 4: "Classic unbounded cache. The HashMap grows forever because entries are added but never removed. Fix: Replace HashMap with a bounded cache like Caffeine or Guava LoadingCache with maximumSize(10000) and expireAfterWrite(5, TimeUnit.MINUTES). For Python, use functools.lru_cache with maxsize or cachetools.TTLCache. Prevention: Code review rule -- every in-memory cache must have a size limit and eviction policy."
Problem: Event Listener Not Unregistered

Symptom: "The heap dump shows thousands of OrderEventListener objects. Each one holds a reference to a large OrderContext object (50KB). The listener count grows every time a new order is created."

Hints:

  • Level 1: "Each listener holds a 50KB context object. If there are 100,000 listeners, that's 5GB of retained memory. Why so many listeners?"
  • Level 2: "A new OrderEventListener is registered for every incoming order. Where is it unregistered?"
  • Level 3: "The listener is registered in processOrder() but only unregistered in the onSuccess() callback. If the order fails or times out, the listener is never removed."
  • Level 4: "Listener leak from missing cleanup on error/timeout paths. Fix: Add finally block or try-with-resources pattern to always unregister the listener. Use WeakReference for listener registration if the listener lifecycle should follow the registrant. Prevention: Add a unit test that verifies listener count before and after order processing (including failure cases)."
Show full SKILL.md (506 more words)Show less
Problem: Large Object Retained by Closure

Symptom: "The heap dump shows lambda objects retaining large byte[] arrays. The arrays contain full HTTP response bodies (1-5MB each). There are thousands of them."

Hints:

  • Level 1: "Lambda objects in Java/closures in Python capture variables from their enclosing scope. What variables are being captured?"
  • Level 2: "The lambda is a callback for async HTTP responses. It captures the response variable, which includes the full response body."
  • Level 3: "The callback is stored in a CompletableFuture chain. Some futures never complete (timeout but no cleanup), so the closure and its captured response body are retained forever."
  • Level 4: "Closure-captured reference leak. The async callback captures a reference to the full HTTP response body. When the future times out, it's not cleaned up, and the captured reference prevents GC. Fix: Extract only the needed data (e.g., status code) before the closure, don't capture the full response. Add orTimeout() to CompletableFuture chains. For Python, use weakref or extract values before passing to callbacks. Prevention: Add heap growth tests to CI that run the service under load for N minutes and verify memory stays bounded."

Evaluation Rubric

AreaNoviceIntermediateExpert
Systematic Approach"Restart the service"Knows to take heap dumpCompares heap dumps over time, correlates with allocation rate
Tool KnowledgeDoesn't know profiling toolsKnows jmap/jhat existUses MAT/VisualVM/async-profiler, reads GC logs, understands generations
Root Cause"It uses too much memory""Something is leaking"Pinpoints the exact code path, object type, and retention mechanism
Fix QualityIncrease heap sizeFix the specific leakFix + bounded caches + leak detection tests + memory monitoring

Resources

Essential Reading
  • "Java Performance" by Scott Oaks -- chapters on GC and heap analysis
  • "Effective Java" by Joshua Bloch -- Item 7: Eliminate obsolete object references
  • "High Performance Python" by Micha Gorelick & Ian Ozsvald -- memory profiling chapters
Practice Problems
  • Profile a service with an unbounded HashMap cache and fix it
  • Find a listener leak using heap dump comparison
  • Diagnose an off-heap memory leak from native buffers
Tools to Know
  • Java: jmap, jhat, Eclipse MAT, VisualVM, async-profiler, JFR (Java Flight Recorder)
  • Python: tracemalloc, objgraph, memory_profiler, guppy3
  • General: Grafana (memory dashboards), Datadog (memory metrics), Prometheus (process_resident_memory_bytes)

Interviewer Notes

  • Linear memory growth is the classic sign of a leak. Exponential growth usually means something different (fork bomb, recursive allocation).
  • If the candidate's first answer is "increase the heap size," push back hard: "That just means it dies in 16 hours instead of 8. What's the actual problem?"
  • Strong candidates will ask: "Is the growth linear or exponential? When did it start? What was deployed around that time?"
  • Watch for candidates who understand the difference between a leak (retained references) and high memory usage (large working set). Not all high memory is a leak.
  • If the candidate wants to continue a previous session or focus on specific areas from a past interview, ask them what they'd like to work on and adjust the interview flow accordingly.

Additional Resources

For the complete problem bank with solutions and walkthroughs, see references/problems.md. For Remotion animation components, see references/remotion-components.md.

© PrepLabsAI, 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 2 other files (references) in agents/debugging/memory-leak-interviewer of PrepLabsAI/InterviewMentor.

  • SKILL.md
  • references/problems.md
  • references/remotion-components.md

Open the folder on GitHubat commit 609d311

Compare with similar skills

Memory Leak Interviewer 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.

Memory Leak Interviewer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Leak Interviewer this skillPrepLabsAI/InterviewMentor112—~2.9kAutomated safety check: PassMIT
Climber Step Minimizationben-manes/caffeine18k—~3kAutomated safety check: NotesApache-2.0
Interval Profiling Performance AnalyzerArabelaTso/Skills-4-SE253—~1.7kAutomated safety check: NotesApache-2.0
Phy Memory Leak DetectorLeoYeAI/openclaw-master-skills2.2k—~4.3kAutomated safety check: PassApache-2.0
Pyroscopegrafana/skills279—~1.2kAutomated safety check: PassApache-2.0
Fory Performance Optimizationapache/fory4.6k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • Climber Step Minimization

    ben-manes/caffeine

    Prices each step of the window climber algorithm by disabling it in turn, to find steps that no longer earn their keep and branches that no longer fire.

    18k GitHub stars~3k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Profile programs at the function/method level to identify performance hotspots, bottlenecks, and optimization opportunities.

    253 GitHub stars~1.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Phy Memory Leak Detector

    LeoYeAI/openclaw-master-skills

    Static memory leak pattern scanner for Node.js, Python, Go, and Java.

    2.2k GitHub stars~4.3k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Pyroscope

    grafana/skills

    Official

    Continuously profile applications with Grafana Pyroscope and read the result as flame graphs.

    279 GitHub stars~1.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).

    4.6k GitHub stars~2.2k tokensUpdated yesterday
    MobileAuto-check passed
  • Afrexai Performance Engineering

    LeoYeAI/openclaw-master-skills

    Complete performance engineering system — profiling, optimization, load testing, capacity planning, and performance culture.

    2.2k GitHub stars~7.1k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed

More from PrepLabsAI/InterviewMentor

All 44 skills in this repo
  • AI Product Strategy Interviewer

    PrepLabsAI/InterviewMentor

    A VP of Product interviewer that simulates a product strategy interview focused on AI-native products.

    112 GitHub stars~4.5k tokensUpdated 2 days ago
    Auto-check passed
  • API Design Interviewer

    PrepLabsAI/InterviewMentor

    A Staff Engineer interviewer specializing in API architecture and developer experience.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Arrays Hashmaps Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in fundamental data structures.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Binary Trees Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in binary tree data structures.

    112 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Broken API Interviewer

    PrepLabsAI/InterviewMentor

    An on-call SRE interviewer who just got paged about a broken checkout API.

    112 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • Caching Architecture Interviewer

    PrepLabsAI/InterviewMentor

    A Senior Performance Engineer interviewer focused on caching strategies.

    112 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Memory Leak Interviewer

What does Memory Leak Interviewer do?

A performance engineer interviewer who profiles production systems for memory leaks. Memory Leak Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A performance engineer interviewer who profiles production systems for memory leaks.

When should I use Memory Leak Interviewer?

Memory Leak Interviewer fits situations like: tasks that involve Performance optimization.

How do I install Memory Leak Interviewer in Claude Code?

Run `npx skills add PrepLabsAI/InterviewMentor --skill memory-leak-interviewer -a claude-code`. Or copy the skill folder (agents/debugging/memory-leak-interviewer in PrepLabsAI/InterviewMentor) into .claude/skills/memory-leak-interviewer in your project. Claude Code loads it when a task matches its description.

How do I install Memory Leak Interviewer in Codex?

Run `npx skills add PrepLabsAI/InterviewMentor --skill memory-leak-interviewer -a codex`. Or copy the skill folder (agents/debugging/memory-leak-interviewer in PrepLabsAI/InterviewMentor) into .agents/skills/memory-leak-interviewer in your project. Codex loads it when a task matches its description.

Can I use Memory Leak Interviewer 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 PrepLabsAI/InterviewMentor --skill memory-leak-interviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-leak-interviewer, .gemini/skills/memory-leak-interviewer, .github/skills/memory-leak-interviewer and .opencode/skills/memory-leak-interviewer in your project.

What does Memory Leak Interviewer need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Leak Interviewer is instructions for the agent only. Our summary lists: Python 3.

Does Memory Leak Interviewer 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 Memory Leak Interviewer 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. Review the folder before installing.

What licence does Memory Leak Interviewer use?

Memory Leak Interviewer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Leak Interviewer use?

About 2.9k tokens (SKILL.md is roughly 12k 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 2.9k tokens, read only when the agent opens those files.

What are the alternatives to Memory Leak Interviewer?

Skills that share tags, products or a category with Memory Leak Interviewer: Climber Step Minimization (ben-manes/caffeine, 18k stars), Interval Profiling Performance Analyzer (ArabelaTso/Skills-4-SE, 253 stars), Phy Memory Leak Detector (LeoYeAI/openclaw-master-skills, 2.2k stars) and Pyroscope (grafana/skills, 279 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Leak Interviewer?

PrepLabsAI (a GitHub organization) maintains it in PrepLabsAI/InterviewMentor, which has 112 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.

Source: PrepLabsAI/InterviewMentor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.