Files
antigravity-skills-reference/skills/angular-best-practices
sickn33 fc3c7ae8a2 meta(skills): Add skill audit and safe metadata fixes
Add repo-wide auditing and targeted repair scripts for skill metadata.
Fix truncated descriptions automatically, keep heading normalization
conservative, and remove synthetic boilerplate sections that degrade
editorial quality while regenerating repo indexes and catalogs.

Fixes #365
2026-03-20 09:06:45 +01:00
..
2026-02-04 08:58:45 +01:00
2026-02-04 08:58:45 +01:00

Angular Best Practices

Performance optimization and best practices for Angular applications optimized for AI agents and LLMs.

Overview

This skill provides prioritized performance guidelines across:

  • Change Detection - OnPush strategy, Signals, Zoneless apps
  • Async Operations - Avoiding waterfalls, SSR preloading
  • Bundle Optimization - Lazy loading, @defer, tree-shaking
  • Rendering Performance - TrackBy, virtual scrolling, CDK
  • SSR & Hydration - Server-side rendering patterns
  • Template Optimization - Structural directives, pipe memoization
  • State Management - Efficient reactivity patterns
  • Memory Management - Subscription cleanup, detached refs

Structure

The SKILL.md file is organized by priority:

  1. Critical Priority - Largest performance gains (change detection, async)
  2. High Priority - Significant impact (bundles, rendering)
  3. Medium Priority - Noticeable improvements (SSR, templates)
  4. Low Priority - Incremental gains (memory, cleanup)

Each rule includes:

  • WRONG - What not to do
  • CORRECT - Recommended pattern
  • 📝 Why - Explanation of the impact

Quick Reference Checklist

For New Components:

  • Using ChangeDetectionStrategy.OnPush
  • Using Signals for reactive state
  • Using @defer for non-critical content
  • Using trackBy for *ngFor loops
  • No subscriptions without cleanup

For Performance Reviews:

  • No async waterfalls (parallel data fetching)
  • Routes lazy-loaded
  • Large libraries code-split
  • Images use NgOptimizedImage

Version

Current version: 1.0.0 (February 2026)

References