by affaan-m·ecc
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 CSS), testing, or CLI tooling.
linkedSignal, or resourceAlways 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.
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.
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.
If no guidelines are provided by the user, use these defaults 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:
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.mdlinkedSignal): Creating writable state linked to source signals. Read linked-signal.mdresource): Fetching asynchronous data directly into signal state. Read resource.mdeffect): Logging, third-party DOM manipulation (afterRenderEffect), and when NOT to use effects. Read effects.mdIn most cases for new apps, prefer signal forms. When making a forms decision, analyze the project and consider the following guidelines:
If the application version supports Signal Forms and this is a new form, prefer signal forms.
For older applications or existing forms, match the application's current form strategy.
Signal Forms: Use signals for form state management. Read signal-forms.md
Template-driven forms: Use for simple forms. Read template-driven-forms.md
Reactive forms: Use for complex forms. Read reactive-forms.md
When implementing dependency injection in Angular, follow these guidelines:
inject() function. Read di-fundamentals.mdprovidedIn: 'root' option, and injecting into components or other services. Read creating-services.mdInjectionToken, useClass, useValue, useFactory, and scopes. Read defining-providers.mdinject() is allowed, runInInjectionContext, and assertInInjectionContext. Read injection-context.mdEnvironmentInjector vs ElementInjector, resolution rules, modifiers (optional, skipSelf), and providers vs viewProviders. Read hierarchical-injectors.mdWhen 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.mdRouterLink and programmatic navigation with Router. Read navigate-to-routes.mdCanActivate, CanMatch, and other guards for security. Read route-guards.mdResolveFn. Read data-resolvers.mdIf you require deeper documentation or more context, visit the official Angular Routing guide.
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.mdRouterTestingHarness for reliable navigation tests. Read router-testing.mdWhen working with Angular tooling, consult the following references:
null or undefined as initial signal form field values — use '', 0, or [] insteadform.field.valid() — use form.field().valid()min, max, value, disabled, or readonly HTML attributes on [formField] inputs — define these as schema rules insteadinject() outside an injection context — use runInInjectionContext when neededeffect() for derived state that should use computed()$parent.$index in nested @for loops — Angular does not support $parent; use let outerIdx = $index insteadtdd-workflow — test-driven development workflow applicable to Angular components and servicessecurity-review — security checklist for web applications including Angular-specific concernsfrontend-patterns — general frontend patterns for context on React/Next.js approaches包含 15 个子 Skill 的测试用例生成流水线,从产品说明书读取、需求分析、测试策略、正负向用例编写、质量审查到 Excel 输出。
通用 Simulink HIL 建模、重构、迁移、评审和发布规范。用于设计 Plant/Control/IO/Bus/Fault/Monitor 架构,定义 Subsystem、Bus、ValueType、MonBus 和 Variant 接口,治理数据字典、参数、采样时间、多核任务、引用组件和初始化流程,检查 .slx/.mdl/.sldd/MATLAB Project,或为实时 HIL 模型生成合规报告、迁移方案、测试计划与发布证据。
航空电子系统 ICD 接口控制文件(AVIAGE SYSTEMS 格式)转标准 Template 格式转换专家,适用于 ICD 转换、接口控制文件格式统一和帧结构解析。
面向航空电子 ICD Excel 文件的标准 Template 格式转换 Skill,支持协议帧分析、颜色编码识别、字段元数据索引、帧长度校验和 Excel 输出。
Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code.
>- Use after competitive-platform-analysis has produced a tiered competitor set. Scores each competitor across nine weighted dimensions (positioning, voice, visual craft, offer packaging, evidence, enterprise-readiness, thought leadership, pricing, client's strategic tension) with explicit 1–5 rubrics and a tension-plot. Precedes competitive-report-structure.