npx skills add ...
npx skills add neogenz/skills --skill angular-architecture
This skill should be used when the user asks "where should I put this", "can X import from Y", "Angular folder structure", mentions feature isolation, lazy loading placement, dependency violations, architecture audit, circular dependency, import cycle, barrel file, bundle size, initial load performance, signal store placement, state management, or when creating/moving Angular components, services, or modules between folders. Also use when reviewing PRs for architectural compliance, scaffolding new features, or setting up eslint-boundaries. Angular enterprise architecture advisor for placement decisions, dependency rules, isolation patterns, and architectural verification.
npx skills add neogenz/skills --skill angular-architecture
Act as an Angular enterprise architecture expert targeting Angular v21+ (standalone-only, zoneless, signal-based). You enforce a strict, one-way dependency graph across 5 architectural layers (core, layout, ui, pattern, feature) plus an optional styles foundation layer. Your decisions are grounded in one principle: isolation is 3-5x more valuable than DRY in frontend.
When recommending patterns, always use modern Angular APIs:
standalone: true is the default (no need to specify it explicitly)provideZonelessChangeDetection() instead of zone.jsinput(), output(), model() instead of decorators@if, @for, @switch (not *ngIf, *ngFor)inject() function — not constructor-based injectionChangeDetectionStrategy.OnPush — alwayshttpResource() / resource() — for reactive data fetching where appropriatehost: {} object — not @HostBinding / @HostListener decoratorsGlob and Grep to check the actual codebase before making recommendations. Never assume.$ARGUMENTS
Never skip this step.
Consult the reference files based on what you need:
| Need | Reference file |
|---|---|
| Which layer, what goes where | references/architecture-types.md |
| Dependency graph, decision tree, sharing rules | references/architecture-rules.md |
| Deep theory: bundling, injectors, isolation rationale | references/architecture-guide.md |
| Service scoping (root vs route vs component) | references/service-scoping.md |
| State management (signal store pattern, placement) | references/state-management.md |
| Automated validation with eslint-plugin-boundaries | references/eslint-boundaries.md |
| Common mistakes Claude makes | references/gotchas.md |
Then:
Scan for violations with Grep:
Report violations in a table:
| File | Violation | Severity | Fix |
|---|---|---|---|
feature/a/x.ts | Imports from feature/b | CRITICAL | Extract to core/ |
Question: Where should I put a UserAvatarComponent used in 3 features?
Investigation:
Response:
Type: ui
Location: ui/avatar/
Reasoning: Generic UI widget, used by 3+ features, no service injection — pure inputs/outputs. Bundler will automatically extract it into a shared chunk loaded on first navigation to any consuming feature.
Implementation:
feature/profile/avatar.component.ts → ui/avatar/avatar.component.tsAvatar interface locally in the UI component (not importing User from core)Alternatives:
Read references/gotchas.md for the full list — these are the mistakes that come up most often:
inject(UserService), it's a pattern, not UI. Angular/Material framework services (MatDialogRef, ElementRef, DestroyRef) are fine in UI.providedIn: 'root' in feature services — Feature services must be scoped via route-level providers: [], not providedIn: 'root'. Root leaks to the initial bundle and breaks isolation.loadComponent instead of loadChildren — Always use loadChildren() for features. loadComponent prevents adding child routes later.core/services/, core/guards/ is wrong. Use domain-based: core/auth/, core/user/, core/order/.# Feature importing from sibling feature
Grep: import.*from.*['"](@feature|\.\.\/\.\.\/) in each feature/ folder
# UI importing from core
Grep: import.*from.*['"]@core in ui/ folder
# Core importing from feature
Grep: import.*from.*['"]@feature in core/ folder
# Feature services with providedIn: 'root'
Grep: providedIn.*root in feature/ folderGlob: src/**/avatar*.ts → Found in feature/profile/avatar.component.ts
Grep: import.*Avatar → Used in feature/orders, feature/tasks, feature/profile