$npx -y skills add omnigentx/jarvis --skill angular-developerGenerates 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 (compon
| 1 | # Angular Developer Guidelines |
| 2 | |
| 3 | 1. Always analyze the project's Angular version before providing guidance, as best practices and available features can vary significantly between versions. If creating a new project with Angular CLI, do not specify a version unless prompted by the user. |
| 4 | |
| 5 | 2. When generating code, follow Angular's style guide and best practices for maintainability and performance. Use the Angular CLI for scaffolding components, services, directives, pipes, and routes to ensure consistency. |
| 6 | |
| 7 | 3. Once you finish generating code, run `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. |
| 8 | |
| 9 | ## Creating New Projects |
| 10 | |
| 11 | When creating a new Angular application, consult the detailed scaffolding guide: Read [angular-new-app.md](references/angular-new-app.md) |
| 12 | |
| 13 | If no guidelines are provided by the user, here are same default rules to follow when creating a new Angular project: |
| 14 | |
| 15 | 1. Use the latest stable version of Angular unless the user specifies otherwise. |
| 16 | 2. Use Signals Forms for form management in new projects (available in Angular v21 and newer) [Find out more](references/signal-forms.md). |
| 17 | |
| 18 | **Execution Rules for `ng new`:** |
| 19 | When asked to create a new Angular project, you must determine the correct execution command by following these strict steps: |
| 20 | |
| 21 | **Step 1: Check for an explicit user version.** |
| 22 | |
| 23 | - **IF** the user requests a specific version (e.g., Angular 15), bypass local installations and strictly use `npx`. |
| 24 | - **Command:** `npx @angular/cli@<requested_version> ng new <project-name>` |
| 25 | |
| 26 | **Step 2: Check for an existing Angular installation.** |
| 27 | |
| 28 | - **IF** no specific version is requested, run `ng version` in the terminal to check if the Angular CLI is already installed on the system. |
| 29 | - **IF** the command succeeds and returns an installed version, use the local/global installation directly. |
| 30 | - **Command:** `ng new <project-name>` |
| 31 | |
| 32 | **Step 3: Fallback to Latest.** |
| 33 | |
| 34 | - **IF** no specific version is requested AND the `ng version` command fails (indicating no Angular installation exists), you must use `npx` to fetch the latest version. |
| 35 | - **Command:** `npx @angular/cli@latest ng new <project-name>` |
| 36 | |
| 37 | ## Components |
| 38 | |
| 39 | When working with Angular components, consult the following references based on the task: |
| 40 | |
| 41 | - **Fundamentals**: Anatomy, metadata, core concepts, and template control flow (@if, @for, @switch). Read [components.md](references/components.md) |
| 42 | - **Inputs**: Signal-based inputs, transforms, and model inputs. Read [inputs.md](references/inputs.md) |
| 43 | - **Outputs**: Signal-based outputs and custom event best practices. Read [outputs.md](references/outputs.md) |
| 44 | - **Host Elements**: Host bindings and attribute injection. Read [host-elements.md](references/host-elements.md) |
| 45 | |
| 46 | If you require deeper documentation not found in the references above, read the documentation at `https://angular.dev/guide/components`. |
| 47 | |
| 48 | ## Reactivity and Data Management |
| 49 | |
| 50 | When managing state and data reactivity, use Angular Signals and consult the following references: |
| 51 | |
| 52 | - **Signals Overview**: Core signal concepts (`signal`, `computed`), reactive contexts, and `untracked`. Read [signals-overview.md](references/signals-overview.md) |
| 53 | - **Dependent State (`linkedSignal`)**: Creating writable state linked to source signals. Read [linked-signal.md](references/linked-signal.md) |
| 54 | - **Async Reactivity (`resource`)**: Fetching asynchronous data directly into signal state. Read [resource.md](references/resource.md) |
| 55 | - **Side Effects (`effect`)**: Logging, third-party DOM manipulation (`afterRenderEffect`), and when NOT to use effects. Read [effects.md](references/effects.md) |
| 56 | |
| 57 | ## Forms |
| 58 | |
| 59 | In most cases for new apps, **prefer signal forms**. When making a forms decision, analyze the project and consider the following guidelines: |
| 60 | |
| 61 | - if the application is using v21 or newer and this is a new form, **prefer signal forms**. |
| 62 | -For older applications or when working with existing forms, use the appropriate form type that matches the applications current form strategy. |
| 63 | |
| 64 | - **Signal Forms**: Use signals for form state management. Read [signal-forms.md](references/signal-forms.md) |
| 65 | - **Template-driven forms**: Use for simple forms. Read [template-driven-forms.md](references/template-driven-forms.md) |
| 66 | - **Reactive forms**: Use for complex forms. Read [reactive-forms.md](references/reactive-forms.md) |
| 67 | |
| 68 | ## Dependency Injection |
| 69 | |
| 70 | When implementing dependency injectio |