angular_skill

This skill reviews Angular code for security, performance, and maintainability by applying best-practice rules across modules, components, and services.
  • Python

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill yldgio/codereview-skills --skill angular

  • SKILL.md3.7 KB

Overview

This skill provides practical Angular code review rules focused on component architecture, RxJS patterns, change detection, and module organization. It distills secure defaults, performance best practices, and maintainability guidelines for modern Angular applications. Use it to evaluate code, set team standards, or guide refactors toward scalable, testable designs.

How this skill works

The skill inspects Angular code patterns and recommends fixes across modules, components, services, templates, and RxJS usage. It flags risky constructs (unsafe HTML, bypassSecurityTrust*), suggests change-detection and subscription strategies, and enforces module boundaries and testing practices. It also provides clear rules for security, type safety, accessibility, and state management choices.

When to use it

  • Conducting pull-request reviews for Angular features or refactors
  • Defining team coding standards and onboarding documentation
  • Auditing application architecture for performance or security issues
  • Evaluating RxJS usage and subscription lifecycles
  • Preparing code for production with accessibility and testing checks

Best practices

  • Prefer OnPush change detection and immutable @Input objects to improve performance
  • Lazy-load feature modules; use SharedModule for UI primitives and CoreModule for singletons
  • Unsubscribe from observables using async pipe, takeUntilDestroyed(), or DestroyRef to avoid memory leaks
  • Avoid bypassSecurityTrust* and sanitize any dynamic HTML with DomSanitizer only when necessary and documented
  • Keep complex logic out of templates—use pipes, getters, or presentation components
  • Enable strict TypeScript and strictTemplates; avoid any and type all public APIs

Example use cases

  • Reviewing a component that uses nested subscriptions and replacing them with switchMap or concatMap
  • Refactoring module layout to lazy-load a feature and centralize singletons in CoreModule
  • Auditing templates for XSS vectors and replacing unsafe innerHTML usage with sanitized alternatives
  • Improving list rendering by adding trackBy functions and switching to OnPush change detection
  • Adding unit tests for a service that makes HTTP requests and mocking HttpClient

FAQ

Only when third-party HTML is trusted after validation, and include an inline code comment explaining why sanitization was bypassed and what validation was performed.

How should I handle multiple subscribers to the same HTTP call?

Use shareReplay on the HTTP observable in the service so multiple subscribers share the result without triggering duplicate requests, and handle errors with catchError.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
angular skill by yldgio/codereview-skills | VeilStrat