Skip to main content
skill CX Codex

angular-core — Claude Code skill: what it does, how to install

angular-core — a skill that teaches the agent modern Angular patterns: standalone components, signals instead of hooks, zoneless mode, and native control flow.

MIT 230 installs ★ 678 updated 2026-03-28

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-core -a claude-code
Open on GitHub

What angular-core does

The skill enforces strict rules for Angular code: components must be standalone, state goes through signal() and computed(), injection through inject(), no ngOnInit or ngOnChanges. It replaces lifecycle hooks with effect(), which automatically tracks input signal changes. Templates use @if, @for, @switch instead of structural directives.

It enables zoneless mode: the agent adds provideZonelessChangeDetection() and removes zone.js from the project. Without Zone.js, Angular relies on signals and OnPush, which speeds up rendering. RxJS is kept only for complex streams — debounce, race, retry; simple requests convert to async/await with firstValueFrom().

Install via npx skills add with the -a claude-code flag. The skill lands in ~/.claude/skills/core/SKILL.md, where the agent picks it up at project start.

What it helps with

  • rewrite a component to standalone with signals
  • replace ngOnInit with effect() tracking an input
  • set up zoneless mode and remove zone.js
  • convert *ngIf and *ngFor to @if and @for
  • compute derived state with computed()

Example prompts for the agent

  • Rewrite UserComponent to standalone with signals and inject()
  • Set up zoneless — add provideZonelessChangeDetection() and remove zone.js
  • Replace ngOnChanges with effect() watching userId()

How to install angular-core

1Skills CLI (Vercel)

npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-core -a claude-code

2Manually: put the files in place

~/.claude/skills/core/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/core/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about angular-core

How to install angular-core in Claude Code?

Run npx skills add Gentleman-Programming/Gentleman-Skills --skill angular-core -a claude-code. The skill installs to ~/.claude/skills/core/SKILL.md.

What does the angular-core skill do?

It teaches the agent to write Angular code with modern patterns: standalone components, signals instead of hooks, zoneless mode, native control flow. It bans @Input decorators, lifecycle hooks, and structural directives.

When to use RxJS instead of signals?

The skill reserves RxJS for complex operations: debounce, throttle, race conditions, WebSocket streams, retry logic. Simple requests and state move to signals and async/await.

Source text

SKILL.md · MIT
---
name: angular-core
description: >
  Angular core patterns: standalone components, signals, inject, control flow, zoneless.
  Trigger: When creating Angular components, using signals, or setting up zoneless.
metadata:
  author: gentleman-programming
  version: "1.0"
---

## Standalone Components (REQUIRED)

Components are standalone by default. Do NOT set `standalone: true`.

```typescript
@Component({
  selector: 'app-user',
  imports: [CommonModule],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `...`
})
export class UserComponent {}
```

---

## Input/Output Functions (REQUIRED)

```typescript
// ✅ ALWAYS: Function-based
readonly user = input.required<User>();
readonly disabled = input(false);
readonly selected = output<User>();
readonly checked = model(false);  // Two-way binding

// ❌ NEVER: Decorators
@Input() user: User;
@Output() selected = new EventEmitter<User>();
```

---

## Signals for State (REQUIRED)

```typescript
readonly count = signal(0);
readonly doubled = computed(() => this.count() * 2);

// Update
this.count.set(5);
this.count.update(prev => prev + 1);

// Side effects
effect(() => localStorage.setItem('count', this.count().toString()));
```

---

## NO Lifecycle Hooks (REQUIRED)

Signals replace lifecycle hooks. Do NOT use `ngOnInit`, `ngOnChanges`, `ngOnDestroy`.

```typescript
// ❌ NEVER: Lifecycle hooks
ngOnInit() {
  this.loadUser();
}

ngOnChanges(changes: SimpleChanges) {
  if (changes['userId']) {
    this.loadUser();
  }
}

// ✅ ALWAYS: Signals + effect
readonly userId = input.required<string>();
readonly user = signal<User | null>(null);

private userEffect = effect(() => {
  // Runs automatically when userId() changes
  this.loadUser(this.userId());
});

// ✅ For derived data, use computed
readonly displayName = computed(() => this.user()?.name ?? 'Guest');
```

### When to Use What

| Need | Use |
|------|-----|
| React to input changes | `effect()` watching the input signal |
| Derived/computed state | `computed()` |
| Side effects (API calls, localStorage) | `effect()` |
| Cleanup on destroy | `DestroyRef` + `inject()` |

```typescript
// Cleanup example
private readonly destroyRef = inject(DestroyRef);

constructor() {
  const subscription = someObservable$.subscribe();
  this.destroyRef.onDestroy(() => subscription.unsubscribe());
}
```

---

## inject() Over Constructor (REQUIRED)

```typescript
// ✅ ALWAYS
private readonly http = inject(HttpClient);

// ❌ NEVER
constructor(private http: HttpClient) {}
```

---

## Native Control Flow (REQUIRED)

```html
@if (loading()) {
  <spinner />
} @else {
  @for (item of items(); track item.id) {
    <item-card [data]="item" />
  } @empty {
    <p>No items</p>
  }
}

@switch (status()) {
  @case ('active') { <span>Active</span> }
  @default { <span>Unknown</span> }
}
```

---

## RxJS - Only When Needed

Signals are the default. Use RxJS ONLY for complex async operations.

| Use Signals | Use RxJS |
|-------------|----------|
| Component state | Combining multiple streams |
| Derived values | Debounce/throttle |
| Simple async (single API call) | Race conditions |
| Input/Output | WebSockets, real-time |
| | Complex error retry logic |

```typescript
// ✅ Simple API call - use signals
readonly user = signal<User | null>(null);
readonly loading = signal(false);

async loadUser(id: string) {
  this.loading.set(true);
  this.user.set(await firstValueFrom(this.http.get<User>(`/api/users/${id}`)));
  this.loading.set(false);
}

// ✅ Complex stream - use RxJS
readonly searchResults$ = this.searchTerm$.pipe(
  debounceTime(300),
  distinctUntilChanged(),
  switchMap(term => this.http.get<Results>(`/api/search?q=${term}`))
);

// Convert to signal when needed in template
readonly searchResults = toSignal(this.searchResults$, { initialValue: [] });
```

---

## Zoneless Angular (REQUIRED)

Angular is zoneless. Use `provideZonelessChangeDetection()`.

```typescript
bootstrapApplication(AppComponent, {
  providers: [provideZonelessChangeDetection()]
});
```

Remove ZoneJS:
```bash
npm uninstall zone.js
```

Remove from `angular.json` polyfills: `zone.js` and `zone.js/testing`.

### Zoneless Requirements
- Use `OnPush` change detection
- Use signals for state (auto-notifies Angular)
- Use `AsyncPipe` for observables
- Use `markForCheck()` when needed

---

## Resources

- https://angular.dev/guide/signals
- https://angular.dev/guide/templates/control-flow
- https://angular.dev/guide/zoneless

© gentleman-programming · MIT · Gentleman-Programming/Gentleman-Skills

Similar skills

All skills for Frontend and UI →

From the same set20

The whole set →
angular-architecture angular-architecture — a skill that decides where Angular components go, how files are named, and which style guide rules to follow. CX Codex +1 322installs pytest A skill with pytest patterns: fixtures, mocking, markers, parametrization. Kicks in when the agent writes Python tests. CX Codex +1 291installs react-native Patterns for React Native mobile development across iOS and Android. Covers typed components, navigation with Expo Router, NativeWind styling, and state management. CX Codex +1 263installs hexagonal-architecture-layers-java The hexagonal-architecture-layers-java skill structures Java services around Domain, Application, and Infrastructure layers. Use it for new services or Spring refactoring. CX Codex +1 250installs jira-task Generates structured Jira tasks following Prowler's format. Handles bug reports, feature requests, and refactoring work with proper titles, acceptance criteria, and component-based splitting. CX Codex +1 217installs github-pr github-pr guides AI agents to format pull requests using Conventional Commits and GitHub CLI commands. CX Codex +1 205installs playwright Skill for writing E2E tests on Playwright using the Page Objects pattern. Guides you through exploring real UI with MCP tools first, then writing selectors and assertions based on actual page structure. CX Codex +1 194installs elixir-antipatterns elixir-antipatterns is a Claude Code skill that guides code reviews, Ecto query tuning, and Phoenix refactoring with a catalog of 8 anti-patterns. CX Codex +1 194installs

Project sponsors

Companies that keep this analytics open