/angular-philosophies:angular-philosophiesfrom angular-philosophies
Opinionated style guide for Angular apps covering components, NgRx SignalStore, httpResource, Nx workspace structure, forms, i18n, accessibility, testing, and tooling. Follow when writing, changing, reviewing, or testing Angular code.
Ships in angular-philosophies. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Follow these rules when you work on Angular code. Where the project you are in has its own rules (an AGENTS.md, a CLAUDE.md), those win over this skill.
references/ before writing code. The rules further down are a summary, and the chapter has the reasons and the exceptions.templates/ instead of writing a pattern from scratch.| Task | Read | Copy from |
|---|---|---|
| Deciding where code goes, adding a library | references/01-architecture.md | templates/config/eslint.boundaries.js |
| Writing or changing a component or template | references/02-components.md | templates/signal-store/order-list.component.ts |
| Writing or changing a store | references/03-signal-store.md | templates/signal-store/order-list.store.ts |
| Reading or writing server data, interceptors, errors | references/04-data-access.md | templates/signal-store/order-list.store.ts, api-status.ts |
| Choosing a toolkit extension, devtools, storage sync | references/05-toolkit.md | templates/signal-store/guarded-devtools.ts, layout.store.ts |
| Writing a custom store feature, or stores that must coordinate | references/06-custom-features.md | templates/signal-store/with-*.ts, cart.store.ts |
| Forms, routes, translations, right-to-left | references/07-forms-routing-i18n.md | |
| Anything visual or interactive | references/08-accessibility.md | templates/a11y/contrast.ts |
| Writing a spec | references/09-testing.md | templates/testing/ (toolkit and examples/) |
| Lint, format, commits, scripts | references/10-tooling.md | templates/config/ |
Angular 22 (standalone, zoneless, signals), TypeScript 6.0 strict, @ngrx/signals 22, @ngrx-toolkit/core 22, Nx, pnpm, Jest 30. Do not introduce a version Angular does not list as supported.
httpResource, signal APIs, router, forms) over a new dependency.TODO with a reason; never rewrite inside a feature branch.scope:* tag and one type:* tag in its project.json.@nx/enforce-module-boundaries; dependencies flow only downward through util, data-access, core, ui, feature, shell.scope:shared import a domain.index.ts; do not export * runtime code.@shop/..., @/...); never use ../../ across feature or library boundaries.type:util code free of Angular injection; pass language and configuration as parameters.no-restricted-imports in the library's own ESLint config.if (guest)-style mode flag to a shared function.<name>.component.ts, <name>.store.ts, <name>.service.ts, <name>.model.ts, <feature>.routes.ts, and keep each spec beside its source.standalone: true, and without changeDetection (OnPush is the Angular 22 default).inject() in field initialisers; do not use constructors for injection.host: {} object; never @HostBinding or @HostListener.input(), model(), output(), viewChild(); do not use the decorator forms in new code.provideZonelessChangeDetection(); every value a template reads must be a signal.computed or linkedSignal to derive state; use effect() only for side effects outside Angular.@if, @for (always with track), @switch, @empty, @defer; never *ngIf, *ngFor, ngClass or ngStyle.computed.HttpClient; they take inputs and emit outputs.type:feature libraries and presentational components in type:ui libraries.data-testid to interactive elements and to elements that tests assert on.loadComponent with a .then(m => m.XComponent) for routed components.@Injectable({ providedIn: 'root' }) for stateless services; put shared state in a signal store.signalStore the facade, API layer and state layer for its slice; components never inject HttpClient or a data service..subscribe() in a component; use signals, resources or rxMethod.load() method that a component must call after a filter changes; derive reads from state with resources.providers: [XStore].{ providedIn: 'root' }; put cross-feature state in a library store.initialState, and expose reset() when the store outlives its page.patchState; never mutate arrays or objects in place.withComputed; inject dependencies with inject() inside withProps, withMethods or withHooks._ and expose a deliberate method when callers need them.page to 1 in every filter setter.any.rxMethod only when operators are needed; choose switchMap, exhaustMap or concatMap deliberately.withStorageSync, never with hand-written localStorage calls.httpResource via withResource); never with a load() method.defaultValue and { errorHandling: 'previous value' }; never write ?. or ?? on a resource value in a component.defaultValue.apiStatus so a page has one loading state and one error state.withMutations and httpMutation; never use httpResource for POST, PATCH, PUT or DELETE.onSuccess.const in the model file.HttpContext token for exceptions.@ngrx-toolkit/core for Angular 22 (@angular-architects/ngrx-toolkit for 21 and earlier), with the same major as Angular.withResource, withMutations/httpMutation, guardedDevtools, withMapper and withStorageSync as the standard extensions.withImmutableState, withReset, withConditional, withUndoRedo or withCallState only when a real need appears, and update the inventory in the same change.withDataService, withEntityResources, withPagination, withRedux, createEffects or withFeatureFactory.withFeature from @ngrx/signals instead of withFeatureFactory, and patchState from @ngrx/signals instead of the toolkit's.withDevtools directly; call guardedDevtools(name, ...) from one shared file.withMapper to redact secret-shaped keys when a store's tracked state holds a full entity row.withStorageSync and a select that lists only what should survive a reload; place it right after withState.signalStoreFeature only after the same block has been copied between stores three times.status field (idle | loading | success | error) instead of separate loading, error and loaded flags in rxMethod stores.withRequestStatus with resources or mutations; they already track their own status.type<>() as its first argument so the compiler checks order.withFeature, not withFeatureFactory.withLinkedState or linkedSignal for state that follows other state instead of an effect that sets signals.signalMethod for reactions that need no operators, and rxMethod when they do.@ngrx/signals/events event groups.nonNullable controls.canDeactivate guard.loadComponent or loadChildren; keep one <feature>.routes.ts per feature.withComponentInputBinding() and read route values through input(), not ActivatedRoute.title; build guards with factory functions such as createRoleGuard.dir computed from the language store and bind it on the root element.ms-*, pe-*, text-start, start-*), never physical left and right.aria-invalid and show the error as text.<button> and <a> for interactive elements; never a clickable <div>.role="alert" or aria-live.prefers-reduced-motion.TestBed.configureTestingModule directly, { provide, useValue } for services, HttpTestingController or as jest.Mock in specs.@/core/test.fakeService(X, () => ({ ... })) in the factory form, at module level, one per inject().httpResource, with fakeHttp; let unknown URLs fail loudly.describe per world; use a new top-level describe with options.providers for anything a test cannot change through a fake.it, and use it.each for variants of one check.satisfies the real model.await view.whenStable(); for stores flush effects and then settle the resource.pnpm nx ...); use Nx generators and targets instead of ng generate and ng build in an Nx workspace.pnpm nx affected -t lint,test for CI and pre-push checks.strict, noImplicitOverride, noPropertyAccessFromIndexSignature, noImplicitReturns and strictTemplates; never disable a strict flag to pass a build.@nx/enforce-module-boundaries, angular-eslint, and the template accessibility rules.any; if unavoidable, add an eslint-disable comment with the reason beside it.trailingComma: all, arrowParens: avoid, one attribute per line, imports sorted @angular, rxjs, third-party, relative.AGENTS.md at the root and in areas with their own rules; keep the root file short.references/00-philosophy.md (opens in a new tab)references/01-architecture.md (opens in a new tab)references/02-components.md (opens in a new tab)references/03-signal-store.md (opens in a new tab)references/04-data-access.md (opens in a new tab)references/05-toolkit.md (opens in a new tab)references/06-custom-features.md (opens in a new tab)references/07-forms-routing-i18n.md (opens in a new tab)references/08-accessibility.md (opens in a new tab)references/09-testing.md (opens in a new tab)references/10-tooling.md (opens in a new tab)references/11-using-with-ai.md (opens in a new tab)templates/a11y/contrast.spec.ts (opens in a new tab)templates/a11y/contrast.ts (opens in a new tab)templates/config/commitlint.config.js (opens in a new tab)templates/config/eslint.boundaries.js (opens in a new tab)templates/config/tsconfig.strict.json (opens in a new tab)templates/signal-store/api-status.spec.ts (opens in a new tab)templates/signal-store/api-status.ts (opens in a new tab)templates/signal-store/cart-events.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub tomavic/angular-philosophies --plugin angular-philosophies