bitwarden/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.
npx skills add https://github.com/bitwarden/clients --skill angular-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.npx ng generate @angular/core:standalone --path=<directory> --mode=convert-to-standalone
NgModule-based → standalone architecture
npx ng generate @angular/core:control-flow
*ngIf, *ngFor, *ngSwitch → @if, @for, @switch
npx ng generate @angular/core:signal-input-migration
@Input() → signal inputs
npx ng generate @angular/core:output-migration
@Output() → signal outputs
npx ng generate @angular/core:signal-queries-migration
@ViewChild, @ContentChild, etc. → signal queries
npx ng generate @angular/core:inject-migration
Constructor injection → inject() function
npx ng generate @angular/core:self-closing-tag
Updates templates to self-closing syntax
npx ng generate @angular/core:unused-imports
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)Take bitwarden/angular-modernization from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.