angular-migration skill
✓ VerifiedMigrate AngularJS applications to modern Angular using hybrid mode, incremental component rewriting, and dependency injection updates.
- GitHub stars
- 42,413
- Files
- 2
- Last commit
- Nov 9, 2026
- License
- MIT
- Allowed tools
- —
What does the angular-migration skill do?
angular-migration is an agent skill. Migrate AngularJS applications to modern Angular using hybrid mode, incremental component rewriting, and dependency injection updates.
Summary generated from the skill's SKILL.md.
About the angular-migration skill
Transitioning legacy AngularJS applications to modern Angular frameworks is the primary function of this skill. It assists developers in managing complex upgrades through various strategies such as big bang rewrites, incremental hybrid approaches using ngUpgrade, or vertical slice migrations. An agent should load this skill when a project requires modernizing dependency injection, converting directives into components, or migrating routing systems from version 1.x to version 2 and above.
The skill provides specific technical patterns for bootstrapping hybrid applications where both frameworks run side-by-side. It produces code transformations for converting AngularJS controllers and services into Angular components and injectable services. Developers can use it to handle the complexities of downgrading Angular services for use in legacy code or upgrading AngularJS services via InjectionTokens. This specialized knowledge helps maintain continuous delivery during large-scale framework migrations.
What an agent can do with it
- 1Convert AngularJS controllers to componentsTransform a legacy AngularJS controller into a modern Angular component with proper lifecycle hooks.
- 2Set up a hybrid applicationConfigure a bootstrap process that allows AngularJS and Angular to run together using UpgradeModule.
- 3Migrate routing configurationsConvert old $routeProvider definitions into modern Angular RouterModule configurations.
- 4Bridge dependency injection between versionsMake a modern Angular service available to an old AngularJS controller using downgradeInjectable.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the angular-migration skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the angular-migration skill in Plugin
/plugin marketplace add wshobson/agents /plugin install framework-migration@claude-code-workflows
Install the angular-migration skill in Claude Code
~/.claude/skills/angular-migration/SKILL.md
$ npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration ~/.claude/skills/angular-migrationInstall the angular-migration skill in Claude Code (project)
.claude/skills/angular-migration/SKILL.md
$ npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration .claude/skills/angular-migrationInstall the angular-migration skill in Codex
~/.agents/skills/angular-migration/SKILL.md
$ npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration ~/.agents/skills/angular-migrationInstall the angular-migration skill in Gemini CLI
~/.gemini/skills/angular-migration/SKILL.md
$ npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration ~/.gemini/skills/angular-migrationInstall the angular-migration skill in Claude.ai
npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration angular-migration && zip -r angular-migration.zip angular-migration # claude.ai → Customize → Skills → + → Create skill → Upload a skill → angular-migration.zip
Automated checks
Ran Nov 15, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablewshobson/agents/plugins/framework-migration/skills/angular-migration is public and reachablegithub.com/wshobson/agents/tree/HEAD/plugins/framework-migra ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-09github.com/wshobson/agents/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/wshobson/agents/blob/HEAD/plugins/framework-migra ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/wshobson/agents/blob/HEAD/plugins/framework-migra ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 314 linesgithub.com/wshobson/agents/blob/HEAD/plugins/framework-migra ↗Pass
SKILL.md
View on GitHubAngular Migration
Master AngularJS to Angular migration, including hybrid apps, component conversion, dependency injection changes, and routing migration.
When to Use This Skill
- Migrating AngularJS (1.x) applications to Angular (2+)
- Running hybrid AngularJS/Angular applications
- Converting directives to components
- Modernizing dependency injection
- Migrating routing systems
- Updating to latest Angular versions
- Implementing Angular best practices
Migration Strategies
1. Big Bang (Complete Rewrite)
- Rewrite entire app in Angular
- Parallel development
- Switch over at once
- Best for: Small apps, green field projects
2. Incremental (Hybrid Approach)
- Run AngularJS and Angular side-by-side
- Migrate feature by feature
- ngUpgrade for interop
- Best for: Large apps, continuous delivery
3. Vertical Slice
- Migrate one feature completely
- New features in Angular, maintain old in AngularJS
- Gradually replace
- Best for: Medium apps, distinct features
Hybrid App Setup
// main.ts - Bootstrap hybrid app
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { UpgradeModule } from "@angular/upgrade/static";
import { AppModule } from "./app/app.module";
platformBrowserDynamic()
.bootstrapModule(AppModule)
.then((platformRef) => {
const upgrade = platformRef.injector.get(UpgradeModule);
// Bootstrap AngularJS
upgrade.bootstrap(document.body, ["myAngularJSApp"], { strictDi: true });
});
// app.module.ts
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { UpgradeModule } from "@angular/upgrade/static";
@NgModule({
imports: [BrowserModule, UpgradeModule],
})
export class AppModule {
constructor(private upgrade: UpgradeModule) {}
ngDoBootstrap() {
// Bootstrapped manually in main.ts
}
}
Component Migration
AngularJS Controller → Angular Component
// Before: AngularJS controller
angular
.module("myApp")
.controller("UserController", function ($scope, UserService) {
$scope.user = {};
$scope.loadUser = function (id) {
UserService.getUser(id).then(function (user) {
$scope.user = user;
});
};
$scope.saveUser = function () {
UserService.saveUser($scope.user);
};
});
// After: Angular component
import { Component, OnInit } from "@angular/core";
import { UserService } from "./user.service";
@Component({
selector: "app-user",
template: `
<div>
<h2>{{ user.name }}</h2>
<button (click)="saveUser()">Save</button>
</div>
`,
})
export class UserComponent implements OnInit {
user: any = {};
constructor(private userService: UserService) {}
ngOnInit() {
this.loadUser(1);
}
loadUser(id: number) {
this.userService.getUser(id).subscribe((user) => {
this.user = user;
});
}
saveUser() {
this.userService.saveUser(this.user);
}
}
AngularJS Directive → Angular Component
// Before: AngularJS directive
angular.module("myApp").directive("userCard", function () {
return {
restrict: "E",
scope: {
user: "=",
onDelete: "&",
},
template: `
<div class="card">
<h3>{{ user.name }}</h3>
<button ng-click="onDelete()">Delete</button>
</div>
`,
};
});
// After: Angular component
import { Component, Input, Output, EventEmitter } from "@angular/core";
@Component({
selector: "app-user-card",
template: `
<div class="card">
<h3>{{ user.name }}</h3>
<button (click)="delete.emit()">Delete</button>
</div>
`,
})
export class UserCardComponent {
@Input() user: any;
@Output() delete = new EventEmitter<void>();
}
// Usage: <app-user-card [user]="user" (delete)="handleDelete()"></app-user-card>
Service Migration
// Before: AngularJS service
angular.module("myApp").factory("UserService", function ($http) {
return {
getUser: function (id) {
return $http.get("/api/users/" + id);
},
saveUser: function (user) {
return $http.post("/api/users", user);
},
};
});
// After: Angular service
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Observable } from "rxjs";
@Injectable({
providedIn: "root",
})
export class UserService {
constructor(private http: HttpClient) {}
getUser(id: number): Observable<any> {
return this.http.get(`/api/users/${id}`);
}
saveUser(user: any): Observable<any> {
return this.http.post("/api/users", user);
}
}
Dependency Injection Changes
Downgrading Angular → AngularJS
// Angular service
import { Injectable } from "@angular/core";
@Injectable({ providedIn: "root" })
export class NewService {
getData() {
return "data from Angular";
}
}
// Make available to AngularJS
import { downgradeInjectable } from "@angular/upgrade/static";
angular.module("myApp").factory("newService", downgradeInjectable(NewService));
// Use in AngularJS
angular.module("myApp").controller("OldController", function (newService) {
console.log(newService.getData());
});
Upgrading AngularJS → Angular
// AngularJS service
angular.module('myApp').factory('oldService', function() {
return {
getData: function() {
return 'data from AngularJS';
}
};
});
// Make available to Angular
import { InjectionToken } from '@angular/core';
export const OLD_SERVICE = new InjectionToken<any>('oldService');
@NgModule({
providers: [
{
provide: OLD_SERVICE,
useFactory: (i: any) => i.get('oldService'),
deps: ['$injector']
}
]
})
// Use in Angular
@Component({...})
export class NewComponent {
constructor(@Inject(OLD_SERVICE) private oldService: any) {
console.log(this.oldService.getData());
}
}
Routing Migration
// Before: AngularJS routing
angular.module("myApp").config(function ($routeProvider) {
$routeProvider
.when("/users", {
template: "<user-list></user-list>",
})
.when("/users/:id", {
template: "<user-detail></user-detail>",
});
});
// After: Angular routing
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
const routes: Routes = [
{ path: "users", component: UserListComponent },
{ path: "users/:id", component: UserDetailComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
Additional patterns and templates
More detailed templates and worked examples live in references/details.md. Read that file for the full pattern library.
Files in this skill
2angular-migration skill questions
How do I install the angular-migration skill in Claude Code?
Run npx degit wshobson/agents/plugins/framework-migration/skills/angular-migration ~/.claude/skills/angular-migration. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the angular-migration skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How can I use an Angular service within an AngularJS application?
You can make an Angular service available to AngularJS by using the downgradeInjectable function from @angular/upgrade/static.