PluginBench
Skill
Pass
Audit score 90

angular-architect

jeffallan/claude-skills

Generates Angular 17+ standalone components, NgRx state management, RxJS patterns, and optimized routing for enterprise applications.

What is angular-architect?

Angular Architect is a specialist skill for building Angular 17+ applications with standalone components, signals, and enterprise-grade patterns. Use it when designing component architecture, setting up NgRx state management, implementing RxJS reactive patterns, configuring advanced routing, optimizing bundle performance, or writing comprehensive tests.

  • Generates Angular 17+ standalone components with OnPush change detection and signals
  • Configures advanced routing with lazy loading, guards, and resolvers
  • Implements NgRx store, effects, selectors, and entity adapters for state management
  • Applies RxJS patterns including proper subscription management with takeUntilDestroyed
  • Optimizes bundle performance and verifies production builds
  • Writes unit and integration tests with >85% coverage using TestBed

How to install angular-architect

npx skills add https://github.com/jeffallan/claude-skills --skill angular-architect
Prerequisites
  • Angular 17 or higher
  • Node.js and npm installed
  • Basic understanding of standalone components and RxJS
  • TypeScript with strict mode enabled
Claude Code
Cursor
Windsurf
Cline

How to use angular-architect

  1. 1.Analyze your application requirements and identify component structure, state needs, and routing architecture
  2. 2.Design the architecture using standalone components and signals, planning state flow and NgRx store structure if needed
  3. 3.Implement features by generating standalone components with OnPush strategy and reactive patterns
  4. 4.Set up NgRx store, effects, and selectors; verify store hydration and action flow with Redux DevTools
  5. 5.Apply performance optimizations and run `ng build --configuration production` to verify bundle size
  6. 6.Write unit and integration tests with TestBed, ensuring >85% coverage threshold is met

Use cases

Good for
  • Building new Angular 17+ applications with standalone component architecture
  • Setting up NgRx state management for complex application state
  • Implementing reactive patterns with RxJS observables and operators
  • Configuring lazy-loaded feature modules with route guards
  • Optimizing bundle size and performance in production builds
Who it's for
  • Senior Angular developers
  • Enterprise application architects
  • Teams building Angular 17+ applications
  • Developers implementing complex state management
  • Performance-focused development teams

angular-architect FAQ

When should I use signals vs observables?

Use signals for local component state and computed values. Use observables for async operations, streams, and state management with NgRx. Combine them with `toSignal()` and `toObservable()` when needed.

How do I manage subscriptions in standalone components?

Use `takeUntilDestroyed()` with the injected `DestroyRef` to automatically unsubscribe when the component is destroyed. Alternatively, use the `async` pipe in templates.

What's the recommended approach for NgRx in Angular 17+?

Use standalone feature stores with `createFeatureSelector` and `createSelector`. Verify store state with Redux DevTools before proceeding. Keep reducers pure and handle errors in effects.

How do I optimize bundle size?

Use lazy loading for feature modules, enable tree-shaking with OnPush change detection, use `trackBy` in *ngFor loops, and run `ng build --configuration production` to identify and flag regressions.

What testing coverage is required?

Aim for >85% code coverage. Write tests for components using TestBed, test services with mocked dependencies, and test NgRx effects and reducers separately.

Full instructions (SKILL.md)

Source of truth, from jeffallan/claude-skills.


name: angular-architect description: Generates Angular 17+ standalone components, configures advanced routing with lazy loading and guards, implements NgRx state management, applies RxJS patterns, and optimizes bundle performance. Use when building Angular 17+ applications with standalone components or signals, setting up NgRx stores, establishing RxJS reactive patterns, performance tuning, or writing Angular tests for enterprise apps. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: frontend triggers: Angular, Angular 17, standalone components, signals, RxJS, NgRx, Angular performance, Angular routing, Angular testing role: specialist scope: implementation output-format: code related-skills: typescript-pro, test-master

Angular Architect

Senior Angular architect specializing in Angular 17+ with standalone components, signals, and enterprise-grade application development.

Core Workflow

  1. Analyze requirements - Identify components, state needs, routing architecture
  2. Design architecture - Plan standalone components, signal usage, state flow
  3. Implement features - Build components with OnPush strategy and reactive patterns
  4. Manage state - Setup NgRx store, effects, selectors as needed; verify store hydration and action flow with Redux DevTools before proceeding
  5. Optimize - Apply performance best practices and bundle optimization; run ng build --configuration production to verify bundle size and flag regressions
  6. Test - Write unit and integration tests with TestBed; verify >85% coverage threshold is met

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Componentsreferences/components.mdStandalone components, signals, input/output
RxJSreferences/rxjs.mdObservables, operators, subjects, error handling
NgRxreferences/ngrx.mdStore, effects, selectors, entity adapter
Routingreferences/routing.mdRouter config, guards, lazy loading, resolvers
Testingreferences/testing.mdTestBed, component tests, service tests

Key Patterns

Standalone Component with OnPush and Signals

import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-user-card',
  standalone: true,
  imports: [CommonModule],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    <div class="user-card">
      <h2>{{ fullName() }}</h2>
      <button (click)="onSelect()">Select</button>
    </div>
  `,
})
export class UserCardComponent {
  firstName = input.required<string>();
  lastName = input.required<string>();
  selected = output<string>();

  fullName = computed(() => `${this.firstName()} ${this.lastName()}`);

  onSelect(): void {
    this.selected.emit(this.fullName());
  }
}

RxJS Subscription Management with takeUntilDestroyed

import { Component, OnInit, inject } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { UserService } from './user.service';

@Component({ selector: 'app-users', standalone: true, template: `...` })
export class UsersComponent implements OnInit {
  private userService = inject(UserService);
  // DestroyRef is captured at construction time for use in ngOnInit
  private destroyRef = inject(DestroyRef);

  ngOnInit(): void {
    this.userService.getUsers()
      .pipe(takeUntilDestroyed(this.destroyRef))
      .subscribe({
        next: (users) => { /* handle */ },
        error: (err) => console.error('Failed to load users', err),
      });
  }
}

NgRx Action / Reducer / Selector

// actions
export const loadUsers = createAction('[Users] Load Users');
export const loadUsersSuccess = createAction('[Users] Load Users Success', props<{ users: User[] }>());
export const loadUsersFailure = createAction('[Users] Load Users Failure', props<{ error: string }>());

// reducer
export interface UsersState { users: User[]; loading: boolean; error: string | null; }
const initialState: UsersState = { users: [], loading: false, error: null };

export const usersReducer = createReducer(
  initialState,
  on(loadUsers, (state) => ({ ...state, loading: true, error: null })),
  on(loadUsersSuccess, (state, { users }) => ({ ...state, users, loading: false })),
  on(loadUsersFailure, (state, { error }) => ({ ...state, error, loading: false })),
);

// selectors
export const selectUsersState = createFeatureSelector<UsersState>('users');
export const selectAllUsers = createSelector(selectUsersState, (s) => s.users);
export const selectUsersLoading = createSelector(selectUsersState, (s) => s.loading);

Constraints

MUST DO

  • Use standalone components (Angular 17+ default)
  • Use signals for reactive state where appropriate
  • Use OnPush change detection strategy
  • Use strict TypeScript configuration
  • Implement proper error handling in RxJS streams
  • Use trackBy functions in *ngFor loops
  • Write tests with >85% coverage
  • Follow Angular style guide

MUST NOT DO

  • Use NgModule-based components (except when required for compatibility)
  • Forget to unsubscribe from observables (use takeUntilDestroyed or async pipe)
  • Use async operations without proper error handling
  • Skip accessibility attributes
  • Expose sensitive data in client-side code
  • Use any type without justification
  • Mutate state directly in NgRx
  • Skip unit tests for critical logic

Output Templates

When implementing Angular features, provide:

  1. Component file with standalone configuration
  2. Service file if business logic is involved
  3. State management files if using NgRx
  4. Test file with comprehensive test cases
  5. Brief explanation of architectural decisions

Documentation