angular-memory-leaks

angular-memory-leaks is a skill for Claude Code from AgenticPawan/FullStack-Pilot. It costs 60 tokens per session (1,521 once invoked), scanned A, original, MIT.

An Angular code-review guide for finding memory leaks, where unused subscriptions, event listeners, timers, or component references remain active after a screen is closed.

In plain words
What is it for?
It checks subscription cleanup, async-pipe usage, DestroyRef cleanup, detached change detectors, and NgZone callbacks that need cancellation.
Why use it?
It helps prevent old screens from continuing to receive updates, consume resources, or trigger callbacks after they are destroyed.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the pilot-angular plugin — 33 skills, 3 agents shipped together

Good fit It checks subscription cleanup, async-pipe usage, DestroyRef cleanup, detached change detectors, and NgZone callbacks that need cancellation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agenticpawan/fullstack-pilot/angular-memory-leaks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AgenticPawan/FullStack-Pilot --skill angular-memory-leaks
Clone the repo
git clone --depth 1 https://github.com/AgenticPawan/FullStack-Pilot

Made for: Claude Code.

Or install pilot-angular, the plugin that ships this one along with the rest of its 33 skills, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for angular-memory-leaks

README.md
[![agentmods](https://agentmods.dev/badge/skills/agenticpawan/fullstack-pilot/angular-memory-leaks/github.svg)](https://agentmods.dev/skills/agenticpawan/fullstack-pilot/angular-memory-leaks)
Your own site
<a href="https://agentmods.dev/skills/agenticpawan/fullstack-pilot/angular-memory-leaks"><img src="https://agentmods.dev/badge/skills/agenticpawan/fullstack-pilot/angular-memory-leaks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for angular-memory-leaks

Your own site · 80×15
<a href="https://agentmods.dev/skills/agenticpawan/fullstack-pilot/angular-memory-leaks"><img src="https://agentmods.dev/badge/skills/agenticpawan/fullstack-pilot/angular-memory-leaks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01521
Opus 5.5 $0.00024 $0.00608
Sonnet 5.5 $0.00012 $0.00304
Haiku 4.5 $0.00006 $0.00152

Measured 3mo ago against content hash 5fd9f201e2bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

angular-memory-leaks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pilot-angular/skills/angular-memory-leaks/SKILL.md · 209 lines

How it starts

The opening of the file, as written. The whole thing — 209 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The four leak categories

Category Symptom Fix
Subscription not cleaned up Observable keeps emitting after component destroyed takeUntilDestroyed() or async pipe
DOM event listener not removed Callback holds component reference alive DestroyRef.onDestroy() cleanup
Detached ChangeDetectorRef CD tree orphaned, still running Detach in ngOnDestroy, mark destroyed
NgZone runOutsideAngular callback Timer/WebSocket callback re-enters zone Wrap zone entry in ngZone.run(), cancel in destroy

Subscription leaks

BAD — subscribe() with no cleanup

@Component({ ... })
export class DashboardComponent implements OnInit {
  data: Item[] = [];

  constructor(private svc: DataService) {}

  ngOnInit() {
    // Leak: subscription lives forever — component teardown never cancels it
    this.svc.updates$.subscribe(d => this.data = d);
  }
}

GOOD — takeUntilDestroyed() (Angular 16+)

import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({ ... })
export class DashboardComponent {
  data: Item[] = [];

  constructor(svc: DataService) {
    // takeUntilDestroyed() is called in injection context — no manual Subject needed
    svc.updates$.pipe(
      takeUntilDestroyed()
    ).subscribe(d => this.data = d);
  }
}

ALSO GOOD — async pipe (zero-boilerplate, preferred for templates)

@Component({
  template: `@for (item of data$ | async; track item.id) { ... }`
})
export class DashboardComponent {
  data$ = inject(DataService).updates$;
  // async pipe subscribes and unsubscribes automatically
}

When to call takeUntilDestroyed() outside constructor

If the subscription must be created outside injection context (e.g., inside ngOnInit), inject DestroyRef and pass it explicitly:

Read the full file on GitHub · 209 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 209 lines · 60 tokens per session scan A 5fd9f201e2bc

Subscribe to this mod's changes

angular-memory-leaks is a skill published in the GitHub repository AgenticPawan/FullStack-Pilot (2 stars, last pushed 4mo ago), licensed MIT. It adds 60 tokens to every session and 1,521 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

angular-memory-leaks compared with skills from other repositories

angular-memory-leaks next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
angular-memory-leaksAgenticPawan/FullStack-PilotSkill24mo agoMITA60Claude Code
code-reviewphuryn/pm-skillsSkill28k22d agoMITA58Claude Code
connect-observabilitymicrosoft/skillsSkill3.3ktodayMITA75Claude Code
azure-diagnosticsmicrosoft/skillsSkill3.3ktodayMITA195Claude Code
aks-troubleshootingmicrosoft/skillsSkill3.3ktodayMITA221Claude Code
azure-messagingmicrosoft/skillsSkill3.3ktodayMITA178Claude Code
aks-gpu-inferencemicrosoft/skillsSkill3.3ktodayMITA114Claude Code