mcpbeat

Angular State Management

hoangnguyen0403/angular-state-management

Implement application state with Angular Signals, computed derivations, and NgRx Signal Store. Use when implementing reactive state with signal(), computed(), effect(), or @ngrx/signals in Angular.

2k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
536
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill angular-state-management

What comes with it

5 970 bytes besides the instruction
evals/evals.json
references/signal-store.md

The instruction itself

9 sections, as written by the author

State Management

Priority: P1 (HIGH)

1. Use Signals for All State

  • Keep internal signals private; expose publicly via asReadonly().

See signal store pattern for signal-based service and store examples.

2. Derive State with computed()

  • Use computed() for totals, filtered lists, derived values — pure and cached.
  • Use linkedSignal(() => source()) for dependent writable state that resets when source changes.
  • Use untracked() to read signal inside computed()/effect() without creating dependency.

3. Scale with Signal Store

  • For complex features, use @ngrx/signals (signalStore) with withState, withComputed, withMethods, and withEntities().

4. Handle Side Effects

  • Use effect() only for side effects (logging, localStorage sync, DOM manipulation).
  • Never update signals inside effect() — causes circular dependencies.
  • Treat signal values as immutable — update with .set() or .update(v => ...).

Anti-Patterns

  • No state logic in components: Delegate to Signal Store or Service.
  • No BehaviorSubject for state: Use Signals; keep RxJS only for complex event streams.

References

  • Signal Store Pattern

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • Never update signals inside effect()
  • resets when source changes

How to use it

Copy the folder

Take hoangnguyen0403/angular-state-management from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.