Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when reviewing scripts, client components, bundles, or runtime behavior related to Prevent common memory leak patterns. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.
.claude/skills/thedaviddias-memory-leaks/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-11 | ✓→✓ | = Same ✓ | 35% | 0% |
| case-12 | ✓→✓ | = Same ✓ | 15% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 6% | 0% |
| case-13 | ✓→✓ | = Same ✓ | 74% | 0% |
Memory leaks cause applications to consume increasing amounts of memory over time, eventually slowing the browser tab or crashing it. In single-page applications, where users don't reload the page, small leaks in components accumulate with each navigation and can make an app unusable after 30 minutes of use.
Analyze this code for memory leak patterns: uncleaned event listeners, retained DOM references after removal, closures holding large objects, and uncleared timers. Also flag fetches and async tasks that continue after the owning component or view is gone.
Fix the memory leaks in this code by cleaning up event listeners, clearing timers, canceling stale async requests, and releasing DOM references when they're no longer needed.
Explain the four most common JavaScript memory leak patterns and how to detect them with Chrome DevTools.
Review scripts, client components, and browser execution paths related to Prevent common memory leak patterns. Flag exact imports, event handlers, runtime side effects, or blocking operations that violate the rule, and state how the change should be verified in the browser.
For full implementation details, code examples, and framework-specific guidance, see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/javascript/memory-leaks
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-11 | pass→pass | 6,728 | 7,464 | +11% | 1 | 1 | 0% | 1,219 | 1,643 | +35% | 0 | 0 | — |
case-12 | pass→pass | 6,232 | 5,466 | -12% | 1 | 1 | 0% | 1,158 | 1,337 | +15% | 0 | 0 | — |
case-01 | pass→pass | 7,307 | 5,827 | -20% | 1 | 1 | 0% | 1,350 | 1,433 | +6% | 0 | 0 | — |
case-13 | pass→pass | 2,812 | 2,868 | +2% | 1 | 1 | 0% | 470 | 816 | +74% | 0 | 0 | — |
case-02 | pass→pass | 3,717 | 4,345 | +17% | 1 | 1 | 0% | 695 | 1,114 | +60% | 0 | 0 | — |
case-03 | pass→pass | 10,607 | 6,716 | -37% | 1 | 1 | 0% | 1,907 | 1,572 | -18% | 0 | 0 | — |
case-04 | pass→pass | 5,089 | 5,641 | +11% | 1 | 1 | 0% | 970 | 1,429 | +47% | 0 | 0 | — |
case-05 | pass→pass | 12,227 | 7,387 | -40% | 1 | 1 | 0% | 2,185 | 1,705 | -22% | 0 | 0 | — |
case-14 | pass→pass | 2,012 | 3,434 | +71% | 1 | 1 | 0% | 322 | 923 | +187% | 0 | 0 | — |
case-06 | pass→pass | 5,810 | 4,749 | -18% | 1 | 1 | 0% | 940 | 1,146 | +22% | 0 | 0 | — |
case-07 | pass→pass | 11,832 | 10,463 | -12% | 1 | 1 | 0% | 2,203 | 2,148 | -2% | 0 | 0 | — |
case-08 | pass→pass | 10,740 | 10,684 | -1% | 1 | 1 | 0% | 1,832 | 2,233 | +22% | 0 | 0 | — |
case-09 | fail→pass | 3,541 | 2,627 | -26% | 1 | 1 | 0% | 529 | 813 | +54% | 0 | 0 | — |
case-10 | pass→pass | 6,530 | 5,285 | -19% | 1 | 1 | 0% | 1,179 | 1,299 | +10% | 0 | 0 | — |
case-15 | pass→pass | 2,722 | 3,525 | +30% | 1 | 1 | 0% | 466 | 1,023 | +120% | 0 | 0 | — |
case-16 | pass→pass | 6,788 | 7,027 | +4% | 1 | 1 | 0% | 1,345 | 1,642 | +22% | 0 | 0 | — |
case-17 | pass→pass | 9,451 | 6,376 | -33% | 1 | 1 | 0% | 1,882 | 1,558 | -17% | 0 | 0 | — |
case-18 | pass→pass | 11,722 | 10,597 | -10% | 1 | 1 | 0% | 2,137 | 2,183 | +2% | 0 | 0 | — |
case-19 | pass→pass | 8,098 | 6,742 | -17% | 1 | 1 | 0% | 1,559 | 1,675 | +7% | 0 | 0 | — |
case-20 | pass→pass | 4,423 | 4,094 | -7% | 1 | 1 | 0% | 783 | 1,211 | +55% | 0 | 0 | — |
case-21 | pass→pass | 11,504 | 11,578 | +1% | 1 | 1 | 0% | 2,160 | 2,547 | +18% | 0 | 0 | — |
case-22 | pass→pass | 11,172 | 7,810 | -30% | 1 | 1 | 0% | 2,106 | 1,782 | -15% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.