Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind
npx playbooks add skill angular/angular --skill angular-developer
ng build to ensure there are no build errors. If there are errors, analyze the error messages and fix them before proceeding. Do not skip this step, as it is critical for ensuring the generated code is correct and functional.If no guidelines are provided by the user, here are some default rules to follow when creating a new Angular project:
Execution Rules for ng new:
When asked to create a new Angular project, you must determine the correct execution command by following these strict steps:
Step 1: Check for an explicit user version.
npx.npx @angular/cli@<requested_version> new <project-name>Step 2: Check for an existing Angular installation.
ng version in the terminal to check if the Angular CLI is already installed on the system.ng new <project-name>Step 3: Fallback to Latest.
ng version command fails (indicating no Angular installation exists), you must use npx to fetch the latest version.npx @angular/cli@latest new <project-name>When working with Angular components, consult the following references based on the task:
<ng-content> slots and fallback content. Read [queries-and-projection.md](references/queries-and-projection.md)@defer. Read [deferrable-views.md](references/deferrable-views.md)@boundary/@error, retrying with $reset. Read [error-boundary.md](references/error-boundary.md)Template expressions: Avoid expensive work in templates (e.g. building arrays or objects, filtering, sorting), since it re-runs on every change detection cycle. Reading signals (count()) and cheap calls are fine. Derive other values with computed(), a pure pipe, or a child component. See [Avoiding expensive work in templates](references/components.md#avoiding-expensive-work-in-templates).
If you require deeper documentation not found in the references above, read the documentation at https://angular.dev/guide/components.
When managing state and data reactivity, use Angular Signals and consult the following references:
signal, computed), reactive contexts, and untracked. Read [signals-overview.md](references/signals-overview.md)linkedSignal): Creating writable state linked to source signals. Read [linked-signal.md](references/linked-signal.md)resource): Fetching asynchronous data directly into signal state. Read [resource.md](references/resource.md)effect): Logging, third-party DOM manipulation (afterRenderEffect), and when NOT to use effects. Read [effects.md](references/effects.md)When communicating with backend services, use Angular HTTP APIs and consult the following reference:
provideHttpClient, HttpClient, interceptors, and httpResource. Read [http-client.md](references/http-client.md)In most cases for new apps, prefer signal forms. When making a forms decision, analyze the project and consider the following guidelines:
When implementing dependency injection in Angular, follow these guidelines:
inject() function. Read [di-fundamentals.md](references/di-fundamentals.md)providedIn: 'root' option, and injecting into components or other services. Read [creating-services.md](references/creating-services.md)InjectionToken, useClass, useValue, useFactory, and scopes. Read [defining-providers.md](references/defining-providers.md)inject() is allowed, runInInjectionContext, and assertInInjectionContext. Read [injection-context.md](references/injection-context.md)EnvironmentInjector vs ElementInjector, resolution rules, modifiers (optional, skipSelf), and providers vs viewProviders. Read [hierarchical-injectors.md](references/hierarchical-injectors.md)When formatting values in templates, creating custom pipes, or reusing pipe-like logic in TypeScript, consult the following reference. Prefer pipes in templates; outside templates, avoid injecting pipe classes just to call transform().
When building accessible custom components for any of the following patterns: Accordion, Listbox, Combobox, Menu, Tabs, Toolbar, Tree, Grid, consult the following reference:
When implementing navigation in Angular, consult the following references:
<router-outlet>, nested outlets, and named outlets. Read [show-routes-with-outlets.md](references/show-routes-with-outlets.md)RouterLink and programmatic navigation with Router. Read [navigate-to-routes.md](references/navigate-to-routes.md)CanActivate, CanMatch, and other guards for security. Read [route-guards.md](references/route-guards.md)ResolveFn. Read [data-resolvers.md](references/data-resolvers.md)If you require deeper documentation or more context, visit the [official Angular Routing guide](https://angular.dev/guide/routing).
When implementing styling and animations in Angular, consult the following references:
When writing or updating tests, consult the following references based on the task:
TestBed. Read [testing-fundamentals.md](references/testing-fundamentals.md)RouterTestingHarness for reliable navigation tests. Read [router-testing.md](references/router-testing.md)When working with Angular tooling, consult the following references:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.