janpereira-dev/ngautopilot/list-rendering-optimization

Claude Code and agent skill by janpereira-dev/ngautopilot

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Optimizes Angular list rendering by using stable identity tracking with trackBy for legacy templates or @for track for modern Angular.

Install

npx vskill@latest install janpereira-dev/ngautopilot/list-rendering-optimization

SKILL.md

The same SKILL.md was published earlier as janpereira-dev/ngautopilot/list-rendering-optimization.

Angular List Rendering Optimization

Purpose

Use this skill to avoid unnecessary DOM recreation in Angular lists by choosing the correct identity tracking pattern for the detected Angular version.

Compatibility

Use the compatible variant:

  • Angular 2-16: use *ngFor with trackBy.
  • Angular 17-19: prefer @for (...; track item.id) for new code, while keeping *ngFor + trackBy as a valid fallback.
  • Angular 20+: avoid introducing new NgFor usage; prefer @for for new code.

When to Use

Use this skill when:

  • A table, grid, select, search result, feed, or list renders many items.
  • The list is refreshed from an API or state store.
  • Rows are inserted, deleted, filtered, sorted, or paginated.
  • Focus, expanded rows, animations, or child component state are lost after refresh.
  • The user reports visible re-rendering or scroll lag.

Do

For Angular 2-16 or legacy templates, use trackBy:

html
<div *ngFor="let item of items; trackBy: trackById">{{ item.name }}</div>
ts
trackById(_index: number, item: Item): string | number {
return item.id;
}

For Angular 17+ new templates, use @for with track:

html
@for (item of items; track item.id) {
<div>{{ item.name }}</div>
}

For very large lists, evaluate virtual scrolling after identity tracking is correct.

Do Not

Avoid missing identity tracking:

html
<div *ngFor="let item of items">{{ item.name }}</div>

Avoid unstable keys:

html
@for (item of items; track createRandomId(item)) {
<div>{{ item.name }}</div>
}

Avoid index tracking for lists that reorder, filter, insert, or delete in the middle.

Review Checklist

  • [ ] The Angular version is checked before choosing *ngFor or @for.
  • [ ] The list has stable identity tracking.
  • [ ] The key is unique within the rendered collection.
  • [ ] Index tracking is limited to static lists.
  • [ ] The template does not transform the list on every render.
  • [ ] Virtual scroll is considered only for genuinely large rendered lists.
  • [ ] Backend pagination is considered when frontend rendering is not the only bottleneck.

Expected Output

  1. Detect whether the project uses legacy or modern Angular templates.
  2. Add trackBy or @for track using a stable identifier.
  3. Avoid changing list behavior beyond identity tracking.
  4. Mention virtual scroll only when list size justifies it.
  5. Explain fallback or migration path for older Angular versions.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
5
Repository forks
1
7-day trend score
14

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/janpereira-dev/ngautopilot/list-rendering-optimization/badge)](https://verified-skill.com/skills/janpereira-dev/ngautopilot/list-rendering-optimization)

Something wrong with this skill or its page? Tell us.