ngx-clerk v0.x to v1.0 Migration Skill

Migrate Angular apps from ngx-clerk v0.x to v1.0 with provideClerk, signals, and canActivateClerk.

53|13|Updated Mar 24, 2024
One-click install
npx skills add https://github.com/anagstef/ngx-clerk --skill ngx-clerk-v0-x-to-v1-0-migration-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ngx-clerk v0.x to v1.0 Migration Skill
Source: https://github.com/anagstef/ngx-clerk/tree/main
Command: npx skills add https://github.com/anagstef/ngx-clerk --skill ngx-clerk-v0-x-to-v1-0-migration-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading from ngx-clerk v0.x to v1.0 breaks existing Angular apps due to API changes such as initialization, signal-based state, and renamed redirect options.

Core Features & Use Cases

  • Dependency & initialization migration: Move from ClerkService.__init() to provideClerk() using Angular providers so Clerk initializes via APP_INITIALIZER.
  • Template and code updates for signals: Replace RxJS observable patterns like clerk.user$ | async and clerk.user$ subscriptions with clerk.user() signal reads (including @if template syntax).
  • Routing guard and redirect prop updates: Swap ClerkAuthGuardService for canActivateClerk and rename redirect-related properties (e.g., afterSignInUrlsignInFallbackRedirectUrl).

Quick Start

Ask the AI to generate a migration checklist and code-change plan to upgrade your Angular project from ngx-clerk v0.x to v1.0, covering provideClerk(), signals, the auth guard, and redirect prop renames.

Frequently Asked Questions about ngx-clerk v0.x to v1.0 Migration Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate ngx-clerk initialization to v1.0?

Migrating ngx-clerk initialization to v1.0 replaces ClerkService.__init() with the provideClerk() function, using Angular EnvironmentProviders so Clerk initializes via APP_INITIALIZER.

How do I convert ngx-clerk RxJS observables to Angular signals?

Converting ngx-clerk RxJS observables to Angular signals replaces clerk.user$ | async and user$ subscriptions with clerk.user() signal reads, including @if template syntax updates.

What is the best way to update ngx-clerk auth guards for v1.0?

Updating ngx-clerk auth guards for v1.0 swaps ClerkAuthGuardService for the canActivateClerk function to wire routing behavior to Clerk Core 3 changes.

Why are my ngx-clerk redirect props breaking after upgrading?

ngx-clerk redirect props break after upgrading because v1.0 renames option keys, requiring updates like changing afterSignInUrl to signInFallbackRedirectUrl to match the new API.

Does ngx-clerk v1.0 require Angular signals for auth state?

Yes, ngx-clerk v1.0 requires Angular signals for auth state access, moving away from RxJS observable patterns to use signal reads like clerk.user() in templates and code.

What changes when upgrading Angular apps to ngx-clerk v1.0?

Upgrading Angular apps to ngx-clerk v1.0 updates initialization via provideClerk, converts RxJS observables to signals, updates guard wiring to canActivateClerk, and renames redirect props.