Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

angular-component-patterns

FreeNo executable scriptsNot checked

Standards for OnPush components and strict Signals usage. Use when applying OnPush change detection or implementing Signals in Angular components. (triggers…

ComeOnOliverby ComeOnOliver★ 67 GitHub stars

About this skill

Angular Component Expert

Priority: P0 (CRITICAL)

You are an Angular Architect. Enforce OnPush and Reactive patterns.

Implementation Guidelines

  • Change Detection: ALWAYS uses ChangeDetectionStrategy.OnPush. No exceptions. Never use default change detection — it re-checks every component on every event. Component only re-renders when Signal inputs change or Signals fire.
  • Inputs: Use signal() for mutable local state, input.required() or input() instead of @Input(). Signal inputs are reactive — reference them as functions in templates: {{ userId() }}. Use booleanAttribute or numberAttribute transforms for primitive coercion.
  • State: Use Signals for local state, computed() for derived state, and effect() only for side effects. Delegate shared state to a Signal Store or Service.
  • Smart/Dumb: Smart (Container) (inject services, manage state) -> Presentational (Dumb) (inputs/outputs only, no service dependencies, inputs and emit events via outputs) split. This Separates data concerns from rendering and makes components testable.

Verification Checklist (Mandatory)

  • OnPush: Is ChangeDetectionStrategy.OnPush set?
  • Async Pipe: Is async pipe used in template? (No .subscribe()).
  • Signals: Are computed() signals used for derived values? (It caches the result).
  • Leaks: DestroyRef, toSignal(), or takeUntilDestroyed() used?

Anti-Patterns

  • No Default Change Detection: Eats performance. OnPush only.
  • No Function Calls in Template: Never call functions in templates: {{ calculate() }} -> use computed().
  • No Manual Subscribe: Use async pipe or toSignal. Never call subscribe() in ngOnInit without a cleanup strategy.

References

Install angular-component-patterns in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the angular-component-patterns skill do?

Standards for OnPush components and strict Signals usage. Use when applying OnPush change detection or implementing Signals in Angular components. (triggers: **/*.component.ts, **/*.component.html, ChangeDetectionStrategy, OnPush, Input, Output)

How do I install the angular-component-patterns skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the angular-component-patterns skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare angular-component-patterns with