AN

angular-modernization

Updates Angular codebases to modern features like standalone components, signal inputs, and new control flow syntax.

Install

mkdir -p .claude/skills/angular-modernization && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1891" && unzip -o skill.zip -d .claude/skills/angular-modernization && rm skill.zip

Installs to .claude/skills/angular-modernization

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.
297 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Generates standalone component migrations
  • Converts traditional syntax to control flow
  • Migrates inputs and outputs to signals
  • Updates queries to signal-based equivalents
  • Replaces constructor injection with inject()
  • Converts templates to self-closing tags

How it works

Uses a two-step process: executing Angular CLI schematics for baseline code updates, then applying manual overrides to enforce Bitwarden-specific architectural patterns.

Inputs & outputs

You give it
Target directory path and specific migration task
You get back
Transformed files matching Bitwarden architecture patterns

When to use angular-modernization

  • Convert modules to standalone components
  • Migrate to new control flow syntax
  • Update inputs to use signals
  • Apply modernization patterns to components

About this skill

Angular Modernization

Transforms legacy Angular components to modern architecture using a two-step approach:

  1. Automated migrations - Angular CLI schematics for standalone, control flow, and signals
  2. Bitwarden patterns - ADR compliance, OnPush change detection, proper visibility, thin components

Workflow

Step 1: Run Angular CLI Migrations

⚠️ 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:

  • Always run the commands using npx ng.
  • All the commands must be run on directories and NOT files. Use the --path option to target directories.
  • Run migrations in order (some depend on others)

1. Standalone Components

npx ng generate @angular/core:standalone --path=<directory> --mode=convert-to-standalone

NgModule-based → standalone architecture

2. Control Flow Syntax

npx ng generate @angular/core:control-flow

*ngIf, *ngFor, *ngSwitch@if, @for, @switch

3. Signal Inputs

npx ng generate @angular/core:signal-input-migration

@Input() → signal inputs

4. Signal Outputs

npx ng generate @angular/core:output-migration

@Output() → signal outputs

5. Signal Queries

npx ng generate @angular/core:signal-queries-migration

@ViewChild, @ContentChild, etc. → signal queries

6. inject() Function

npx ng generate @angular/core:inject-migration

Constructor injection → inject() function

7. Self-Closing Tag

npx ng generate @angular/core:self-closing-tag

Updates templates to self-closing syntax

8. Unused Imports

npx ng generate @angular/core:unused-imports

Removes unused imports

Step 2: Apply Bitwarden Patterns

See migration-patterns.md for detailed examples.

  1. Add OnPush change detection
  2. Apply visibility modifiers (protected for template access, private for internal)
  3. Convert local component state to signals
  4. Keep service observables (don't convert to signals)
  5. Extract business logic to services
  6. Organize class members correctly
  7. Update tests for standalone

Step 3: Validate

  • Fix linting and formatting using npm run lint:fix
  • Run tests using npm run test

If any errors occur, fix them accordingly.

Key Decisions

Signals vs Observables

  • Signals - Component-local state only (ADR-0027)
  • Observables - Service state and cross-component communication (ADR-0003)
  • Use toSignal() to bridge observables into signal-based components

Visibility

  • protected - Template-accessible members
  • private - Internal implementation

Other Rules

  • Always add OnPush change detection
  • No TypeScript enums (use const objects with type aliases per ADR-0025)
  • No code regions (refactor instead)
  • Thin components (business logic in services)

Validation Checklist

Before completing migration:

  • OnPush change detection added
  • Visibility modifiers applied (protected/private)
  • Signals for component state, observables for service state
  • Class members organized (see migration-patterns.md)
  • Tests updated and passing
  • No new TypeScript enums
  • No code regions

References

Bitwarden ADRs

Angular Resources

When not to use it

  • General Angular architectural discussions
  • Manual migrations when CLI schematics are available
  • Non-Angular framework codebases

Prerequisites

npxAngular CLI

Limitations

  • Requires directory-level execution via --path
  • Manual intervention needed for patterns outside CLI coverage

How it compares

It prioritizes safe, automated CLI migrations over manual code changes to minimize regressions.

Compared to similar skills

angular-modernization side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
angular-modernization (this skill)48moReviewIntermediate
angular1004moReviewAdvanced
angular-state-management84moNo flagsIntermediate
angular-routing16moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

angular

sickn33

Modern Angular (v20+) expert with deep knowledge of Signals, Standalone Components, Zoneless applications, SSR/Hydration, and reactive patterns. Use PROACTIVELY for Angular development, component architecture, state management, performance optimization, and migration to modern patterns.

100129

angular-state-management

sickn33

Master modern Angular state management with Signals, NgRx, and RxJS. Use when setting up global state, managing component stores, choosing between state solutions, or migrating from legacy patterns.

823

angular-routing

analogjs

Implement routing in Angular v20+ applications with lazy loading, functional guards, resolvers, and route parameters. Use for navigation setup, protected routes, route-based data loading, and nested routing. Triggers on route configuration, adding authentication guards, implementing lazy loading, or reading route parameters with signals.

14

igniteui-angular-grids

igniteui

Provides guidance on all Ignite UI for Angular data grid types (Flat Grid, Tree Grid, Hierarchical Grid, Grid Lite, Pivot Grid) including setup, column configuration, sorting, filtering, selection, editing, grouping, summaries, toolbar, export, paging, remote data, and state persistence. Use when users ask about grids, tables, data grids, tabular data display, cell editing, batch editing, row selection, column pinning, column hiding, grouping rows, pivot tables, tree-structured data, hierarchical data, master-detail views, or exporting grid data.

14

igniteui-angular-components

igniteui

Provides guidance on all non-grid Ignite UI for Angular UI components including application setup and architecture, form controls (Input Group, Combo, Select, Date/Time Pickers, Calendar, Checkbox, Radio, Switch, Slider, reactive forms), layout (Tabs, Bottom Navigation, Stepper, Accordion, Splitter, Navigation Drawer, Layout Manager), data display (List, Tree, Card, Chips, Avatar, Badge, Icon, Carousel, Paginator, Progress Bar, Linear Progress Bar, Circular Progress Bar, Chat), feedback/overlays (Dialog, Snackbar, Toast, Banner), directives (Button, Ripple, Tooltip, Drag and Drop), Dock Manager, and Charts (Area Chart, Bar Chart, Column Chart, Stock/Financial Chart, Pie Chart, IgxCategoryChart, IgxFinancialChart, IgxDataChart, IgxPieChart). Use when users ask about any Ignite UI Angular component that is not a data grid, such as forms, inputs, dropdowns, date pickers, dialogs, navigation, lists, trees, cards, charts, or application scaffolding and setup.

12

test-automation

jimmykane

Generate and manage Vitest tests for Angular components, services, and Firebase integrations

01

Search skills

Search the agent skills registry