Prevents unnecessary DOM recreation in Angular lists by applying trackBy with *ngFor or track expressions with @for for stable item identity.
Ships in ngautopilot-angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to keep Angular list rendering stable by giving Angular a reliable identity for each item. The goal is to avoid unnecessary DOM destruction and recreation when arrays are refreshed, sorted, filtered, or replaced.
If the issue is broader list rendering cost, defer to list-rendering-optimization; this skill owns identity tracking specifically.
Use this skill when:
*ngFor or @for.For *ngFor, use a stable trackBy function:
<li *ngFor="let item of items; trackBy: trackByItemId">{{ item.name }}</li>
trackByItemId(_index: number, item: ItemViewModel): string {
return item.id;
}
For Angular control flow with @for, use a stable track expression:
@for (item of items(); track item.id) {
<li>{{ item.name }}</li>
}
Use a domain identifier when possible. If no stable ID exists, create one at the mapping boundary rather than relying on object identity.
When the project uses @for, prefer track item.id or an equivalent stable key instead of index-based tracking.
Avoid rendering lists without a stable identity:
<li *ngFor="let item of items">{{ item.name }}</li>
Avoid unstable tracking values:
@for (item of items; track buildRandomKey(item)) {
<li>{{ item.name }}</li>
}
Avoid using the index as identity for lists that can be reordered, inserted into, deleted from, or filtered:
trackByIndex(index: number): number {
return index;
}
Avoid track keys that change between renders, such as random values, timestamps, or array positions in mutable lists.
trackBy or track.trackBy for *ngFor or track for @for.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--performance--trackby-for-listsfrom ngautopilot-angular
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-angular350 skills in this plugin
/angular--ai--angular-v22-agent-skills-integrationAngular v22 Agent Skills IntegrationUse official Angular Agent Skills as reference material without copying them blindly or replacing NgAutoPilot routing. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-ai-tutor-safe-usageAngular v22 AI Tutor Safe UsageUse AI tutor workflows to teach Angular concepts without allowing unsafe code or secret exposure. For Angular 22 projects and 21-to-22 upgrade planning.
Other plugins' skills for the same job
/angular--ai--angular-v22-angular-mcp-agent-workflowAngular v22 Angular MCP Agent WorkflowReview the workspace boundary, permissions, and runtime evidence of an Angular MCP integration. For Angular 22 projects and 21-to-22 upgrade planning.