npx skills add ...
npx skills add bitwarden/clients --skill angular-modernization
npx skills add bitwarden/clients --skill angular-modernization
Modernizes Angular code such as components and directives to follow best practices using both automatic CLI migrations and Bitwarden-specific patterns. YOU must use this skill when someone requests modernizing Angular code. DO NOT invoke for general Angular discussions unrelated to modernization.
Transforms legacy Angular components to modern architecture using a two-step approach:
⚠️ CRITICAL: ALWAYS use Angular CLI migrations when available. DO NOT manually migrate features that have CLI schematics.
Angular provides automated schematics that handle edge cases, update tests, and ensure correctness. Manual migration should ONLY be used for patterns not covered by CLI tools.
IMPORTANT:
npx ng.--path option to target directories.NgModule-based → standalone architecture
*ngIf, *ngFor, *ngSwitch → @if, @for, @switch
@Input() → signal inputs
@Output() → signal outputs
@ViewChild, @ContentChild, etc. → signal queries
Constructor injection → inject() function
Updates templates to self-closing syntax
Removes unused imports
See migration-patterns.md for detailed examples.
protected for template access, private for internal)npm run lint:fixnpm run testIf any errors occur, fix them accordingly.
toSignal() to bridge observables into signal-based componentsprotected - Template-accessible membersprivate - Internal implementationBefore completing migration:
protected/private)npx ng generate @angular/core:signal-queries-migrationnpx ng generate @angular/core:inject-migrationnpx ng generate @angular/core:self-closing-tagnpx ng generate @angular/core:unused-imports