Performs the Angular 2.x to Angular 4.x major-hop upgrade in a bounded, version-aware slice with dependency alignment, code adjustments, and validation.
Ships in ngautopilot-angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to upgrade an Angular 2.x application to Angular 4.x in one bounded major hop.
This skill upgrades only from Angular 2 to Angular 4. It must not continue to Angular 5 or later. The next hop must be handled by a dedicated follow-up skill.
Use this skill when:
2 -> 4 as the next step.Do not use this skill when:
For AngularJS modernization, route to:
skills/angular/migration/angularjs-to-angular-modernization-orchestrator/SKILL.md
For the next hop, route to:
skills/angular/upgrades/hops/angular-4-to-5/SKILL.md
package.jsonpackage-lock.json, yarn.lock, or pnpm-lock.yaml@angular/upgradeRendererRootRendererOpaqueToken<template>ngOutletContextpreserveQueryParams| Area | Recommended strategy | Observations |
|---|---|---|
| Angular 2.x source | Upgrade to Angular 4.x only | Do not jump to a later major in this skill. |
| TypeScript | Align to a range compatible with Angular 4 | Verify the exact range in the project before applying. |
| RxJS | Keep the project-compatible version | Do not force a later RxJS major in this hop. |
| ngUpgrade | Move hybrid imports to @angular/upgrade/static where applicable | Preserve hybrid behavior. |
| Animations | Move animation symbols to @angular/animations where needed | Add BrowserAnimationsModule or NoopAnimationsModule only when relevant. |
If a version cannot be confirmed from the project files, mark it as verify in project.
@angular/http unless a separate HTTP migration exists.Replace lifecycle inheritance with implements:
class MyComponent implements OnInit {}
Move animations symbols to @angular/animations:
import { trigger, state, style, transition, animate } from '@angular/animations';
Replace <template> with <ng-template> where applicable:
<ng-template></ng-template>
Replace OpaqueToken with InjectionToken:
export const MY_TOKEN = new InjectionToken<string>('MY_TOKEN');
Prefer Renderer2 or RendererFactory2 where compatible.
Use @angular/upgrade/static for hybrid APIs in this range.
@angular/http as part of this hop without a dedicated HTTP migration.package.json.Read package.json first. Only run scripts that exist.
Preferred order when available:
If the repository uses Angular CLI directly and the commands exist, those can be used instead.
@angular/upgrade/static is not handled consistently.When this skill is used, return:
This skill is complete only when:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--upgrade--hops--angular-2-to-4from ngautopilot-angular
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-angular350 skills in this plugin
/angular--ai--angular-v22-agent-skills-integrationAngular v22 Agent Skills IntegrationUse official Angular Agent Skills as reference material without copying them blindly or replacing NgAutoPilot routing. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-ai-tutor-safe-usageAngular v22 AI Tutor Safe UsageUse AI tutor workflows to teach Angular concepts without allowing unsafe code or secret exposure. For Angular 22 projects and 21-to-22 upgrade planning.
Other plugins' skills for the same job
/angular--ai--angular-v22-angular-mcp-agent-workflowAngular v22 Angular MCP Agent WorkflowReview the workspace boundary, permissions, and runtime evidence of an Angular MCP integration. For Angular 22 projects and 21-to-22 upgrade planning.