agentsclimarketplace

Memory

Skill v0idOS/performance-deity/skills/memory

A ruthlessly strict algorithmic optimization methodology for AI coding agents. Forces your agent to profile, benchmark, and mathematically prove performance gains before writing code.

Install
npx -y skills add v0idOS/performance-deity --skill memory

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Detect and fix memory leaks. Instruments memory tracking across thousands of iterations, proves the leak with growth data, identifies the uncollected reference, and verifies the fix.

SKILL.md

1.5 KB, as published. Nobody here has run it

Execute all four phases in order.

Phase 1 — Isolation

  1. Identify the code suspected of leaking.
  2. Write a wrapper that runs it in an infinite loop or for ≥1,000,000 iterations.

Phase 2 — Instrumentation

Inject memory tracking into the wrapper:

  • Node.js: process.memoryUsage().heapUsed before and after each iteration.
  • Python: tracemalloc.start() / tracemalloc.get_traced_memory().
  • PowerShell: [System.GC]::GetTotalMemory($false).

If memory continuously grows without recovering after GC, the leak is confirmed. Show the growth numerically:

Iteration      0:  10 MB
Iteration 100k:  14 MB
Iteration 500k:  40 MB

Phase 3 — Fix

Identify the uncollected reference:

  • Event listeners not removed from detached DOM nodes
  • Global arrays or caches growing without a size limit
  • Closures retaining large outer-scope objects

Apply the fix:

  • removeEventListener for DOM event listeners
  • WeakMap / WeakRef for object-keyed associations that should not prevent GC
  • Object pooling to reuse memory instead of allocating new objects per cycle

Phase 4 — Report

Re-run the instrumented wrapper and present:

MetricBeforeAfter
Memory growth per 10k ops+50MB+0MB
GC pause frequencyHighStable

Explain the root cause and the specific reference that was being retained.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.