angular-best-practices

Optimize Angular applications with OnPush, signals, lazy loading, and hydration.

Updated May 5, 2026
One-click install
npx skills add https://github.com/Movchanets/Microservices_Learning --skill angular-best-practices-movchanets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-best-practices
Source: https://github.com/Movchanets/Microservices_Learning/tree/main/.agents/skills/angular-best-practices
Command: npx skills add https://github.com/Movchanets/Microservices_Learning --skill angular-best-practices-movchanets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps eliminate common Angular performance bottlenecks by turning slow, hard-to-maintain code into efficient patterns that reduce unnecessary renders, shrink bundles, and improve loading behavior.

Core Features & Use Cases

  • Change Detection Guidance: Use OnPush, signals, and zoneless patterns to reduce wasted work.
  • Rendering and Template Optimization: Improve list rendering, defer heavy UI, and avoid expensive template logic.
  • SSR, Hydration, and Data Fetching: Prevent client-side waterfalls and make server-rendered apps faster and smoother.
  • Use Case: Review an Angular component, route, or feature module and refactor it for better performance, cleaner state flow, and more efficient loading.

Quick Start

Ask the AI to review your Angular code and rewrite it using these best-practice performance guidelines.

Frequently Asked Questions about angular-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Angular change detection to stop unnecessary renders?

Optimize Angular change detection by applying OnPush strategy, converting component state to signals, and adopting zoneless patterns to eliminate wasted render cycles and reduce wasted work.

What is the best way to implement lazy loading and defer rendering in Angular?

The best way to implement lazy loading and defer rendering is using Angular's routing modules for code splitting and the defer template syntax to postpone loading heavy UI components until interaction.

How does Angular SSR hydration prevent client-side waterfalls?

Angular SSR hydration prevents client-side waterfalls by reusing server-rendered DOM content on the client, avoiding full application re-rendering and making server-rendered apps load faster and smoother.

Why does my Angular list rendering perform poorly without trackBy?

Angular list rendering performs poorly without trackBy because the framework re-creates DOM nodes for every collection update; applying trackBy in templates identifies moved items and avoids expensive DOM manipulation.

Can I refactor an existing Angular component for better performance?

You can refactor existing Angular components by reviewing template logic, cleaning up subscriptions, applying OnPush change detection, and deferring heavy UI to shrink bundles and improve loading behavior.