agentleFS
itsmuskanagarwalitsmuskanagarwal/claude-pack/skills/angular-migration/SKILL.md

angular-migration

Skill0 starsChanged 4 months agoMITView on GitHub

Migrate Angular code between framework generations — NgModule to standalone components, or classic NgRx store to signals store. Use when the user asks to modernize/migrate Angular components or state, mentions standalone components or signals, or when angular-enterprise's migration posture section says a module is due. Each variant has its own codemod/manual/verify sequence — do not mix variants in one pass.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Codemod: use the Angular CLI schematic if the repo's Angular version ships one (ng generate @angular/core:standalone) — run it per-target, …

    line 19
  2. Very specific:

    Manual steps: verify imports: array on each converted component lists only what it actually uses (schematics sometimes over-include).

    line 22
  3. Distinctive:

    Codemod: no reliable automated codemod for this direction as of current Angular/NgRx tooling — treat as manual, and say so.

    line 36
  4. Distinctive:

    Never run a codemod repo-wide in one shot — per-component/per-slice, so a failure doesn't block everything else and each step stays …

    line 49
  5. Distinctive:

    Never leave a component or slice half-migrated across a session boundary without recording it in session-state — "half-standalone" is an …

    line 51
  6. Distinctive:

    Never claim a codemod exists for classic→signals when none does.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- owner: Muskan, added: 2026-07-16, model: claude-sonnet-5, review: quarterly -->

Angular Migration

Shared rule (both variants)

Migrations are their own scoped task — never opportunistic ("while I'm in here"). Require characterization tests on the target before starting if none exist (consult characterization-tests). Run the verify commands after every component/slice, not once at the end.

Variant A — NgModule → Standalone

  1. Order: leaf components first (no other component depends on them), then containers, then the module's routing config, then delete the NgModule last, once nothing imports it.
  2. Codemod: use the Angular CLI schematic if the repo's Angular version ships one (ng generate @angular/core:standalone) — run it per-target, not repo-wide, so failures are isolated to one component.
  3. Manual steps: verify imports: array on each converted component lists only what it actually uses (schematics sometimes over-include); check barrel/index re-exports still resolve; update any NgModule.declarations reference that pointed at the converted component.
  4. Verify: build + the component's tests green + the app boots (smoke check on a route that renders this component) before moving to the next one.

Variant B — Classic NgRx store → Signals store

  1. Order: migrate one feature slice's state at a time (actions → reducer → selectors → effects, in that order within the slice); never half-migrate a slice (some selectors on signals, others still classic) — that's a harder-to-debug intermediate state than either pure form.
  2. Codemod: no reliable automated codemod for this direction as of current Angular/NgRx tooling — treat as manual, and say so; don't imply automation that doesn't exist.
  3. Manual steps: replace Store.select(selector) + async pipe with the signals-store equivalent read; convert effects to the signals-store pattern one at a time; keep the old reducer/selector file until the slice's tests pass against the new implementation, then delete it (not before — keeping both lets you diff behavior if something looks off).
  4. Verify: full test suite for the slice green, plus a manual equivalence spot-check (consult /equiv-plan if the slice has complex derived-state logic) before deleting the old files.

Anti-patterns

  • Never run a codemod repo-wide in one shot — per-component/per-slice, so a failure doesn't block everything else and each step stays revertible.
  • Never leave a component or slice half-migrated across a session boundary without recording it in session-state — "half-standalone" is an easy state to lose track of.
  • Never claim a codemod exists for classic→signals when none does; the gap itself is useful information to the user planning the migration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.