mcpbeat Sign in

Angular Modernization Agent Skill

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.

3k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
13507
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/bitwarden/clients --skill angular-modernization

What comes with it

5 543 bytes besides the instruction
migration-patterns.md

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

21 sections, as written by the author

Angular Modernization

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

  • Automated migrations - Angular CLI schematics for standalone, control flow, and signals
  • 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.

  • Add OnPush change detection
  • Apply visibility modifiers (protected for template access, private for internal)
  • Convert local component state to signals
  • Keep service observables (don't convert to signals)
  • Extract business logic to services
  • Organize class members correctly
  • 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

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take bitwarden/angular-modernization from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

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.

Install what it needs

The instructions reference npx. Without those the skill loads but fails at the first command.