MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Angular Migration

Angular Migration is an code AI skill with a core value of Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or ...

Last verified on: 2026-07-07

Quick Facts

Category code
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level Low
mkdir -p ./skills/angular-migration && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/angular-migration/SKILL.md -o ./skills/angular-migration/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Angular Migration


Master AngularJS to Angular migration, including hybrid apps, component conversion, dependency injection changes, and routing migration.


Use this skill when


- 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


Do not use this skill when


- You are not migrating from AngularJS to Angular

- The app is already on a modern Angular version

- You need only a small UI fix without framework changes


Instructions


1. Assess the AngularJS codebase, dependencies, and migration risks.

2. Choose a migration strategy (hybrid vs rewrite) and define milestones.

3. Set up ngUpgrade and migrate modules, components, and routing.

4. Validate with tests and plan a safe cutover.


Safety


- Avoid big-bang cutovers without rollback and staging validation.

- Keep hybrid compatibility testing during incremental migration.


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


typescript
// 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 });
  });

typescript
// 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

javascript
// 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);
  };
});

typescript
// 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

javascript
// 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>
    `
  };
});

``

🎯 Best For

  • Claude users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Angular Migration to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Angular Migration compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Angular Migration?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Angular Migration?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/angular-migration/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills