andrassama/dsh-omp-advisor/memory-leak-profiling
Claude Code and agent skill by andrassama/dsh-omp-advisor
- community
Checking that the SKILL.md file is still in the repository.
Equips the advisor to evaluate profiling evidence and suspect unbounded growth in heaps, caches, and task/connection pools across Rust and Go services.
Install
npx vskill@latest install andrassama/dsh-omp-advisor/memory-leak-profilingSKILL.md
The same SKILL.md was published earlier as andrassama/dsh-omp-advisor/memory-leak-profiling.
Memory Leak Profiling
Covers the tooling and interpretation needed to diagnose RSS growth: heap profilers, allocation tracing, and the classic leak shapes (unbounded caches, leaked async tasks, Arc reference cycles, stuck goroutines). A reviewer should demand profile evidence, not guesses, before accepting any "fix".
Watch for
- A fix submitted with no before/after profile — require the heaptrack / jeprof / pprof artifact that proves the leak and the fix.
- Profiling
inuse_spacewhen the symptom is GC churn, oralloc_spacewhen the symptom is growth — useinuse_spacefor true growth,alloc_spacefor allocation rate. - Rust suspects that ignore
Arc/Rcreference cycles (especially withRefCell/Mutexinteriors), which are never freed. - Unbounded maps acting as caches (
HashMapwith no TTL or eviction) — the most common service "leak". - Leaked tokio tasks: spawned futures holding channel receivers that never complete.
- Go: goroutine profile count climbing in lockstep with the heap — the leak is stuck goroutines, not objects.
- Comparing RSS across allocators (glibc vs jemalloc) without controlling for arena retention and fragmentation.
- Running Valgrind/DHAT on production-scale loads (100× slowdown) instead of sampled profiling on realistic traffic.
Best practices
- Rust:
heaptrack ./binfor full allocation traces;MALLOC_CONF=prof:true,lg_prof_sample:19plusjeproffor jemalloc-backed services; DHAT for bounded test runs. - Go:
curl localhost:6060/debug/pprof/heap > h.out && go tool pprof -inuse_space h.out; diff snapshots minutes apart withpprof -base. - Establish a baseline: RSS at steady state, then its slope under constant load — flat is healthy, monotonic climb is a leak.
- Cap every long-lived cache:
lru/mini-mokawith max entries and TTL, metriced hit/evict counts. - For Rust async, track live task counts and use
tokio-consoleto find tasks that never complete. - Break cycles with
Weakreferences or explicitOption::take()slots in owner structs. - Automate: CI soak test that fails when RSS grows beyond a threshold over N minutes at constant load.
Quick checklist
- [ ] Profile artifact (heaptrack/jeprof/pprof) attached to the change
- [ ] inuse vs alloc space matches the symptom
- [ ] Every long-lived map has eviction or a size cap
- [ ] Arc/Weak audit done where shared ownership exists
- [ ] Async task count observable and bounded
- [ ] RSS baseline and slope measured under constant load
- [ ] Allocator/arena retention ruled out before blaming code
- [ ] Soak test with a memory assertion exists in CI
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/memory-leak-profiling/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/andrassama/dsh-omp-advisor/memory-leak-profiling)