angular-developer: Angular's Official Code Generation and Architecture Guidance Skill

Preface

When using tools like Cursor or Gemini CLI to have an Agent write Angular code, the common problem is not “can it generate TypeScript” but whether the generated result is consistent with the current Angular version, whether it uses new APIs like Signals, httpResource, and Signal Forms, and whether the scaffolding commands correctly use the local CLI or npx. A generic “write a component” prompt can hardly cover these details.

Below we introduce the angular-developer Skill maintained by the Angular team in the angular/skills repository: it embeds official style guidelines, topic-specific reference documents, and executable CLI rules into Agent instructions, providing practices aligned with angular.dev across scenarios such as creating projects, components, services, HTTP, forms, and routing.

What Is This

angular-developer is an Agent Skill (SKILL.md format). Its description specifies: generate Angular code and provide architectural guidance; trigger when creating projects, components, services, or HTTP communication, and when best practices are needed for reactivity (signals, linkedSignal, resource, httpResource), queries and content projection, forms, dependency injection, routing, server-side and hybrid rendering (SSR, prerendering, hydration), accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, naming conventions, or CLI tools.

Metadata (visible in the materials):

The same repository also provides angular-new-app (focused on creating new applications and project structures using the CLI); this article focuses on angular-developer. The repository README explains: Skill content is maintained in skills/dev-skills/ within angular/angular and synced to this infrastructure repository; feedback can be submitted via angular/angular Issues. This series is also listed under the Angular official Skills category in VoltAgent/awesome-agent-skills.

Core Features

The Skill body uses Angular Developer Guidelines as the overarching framework and links to topic-specific Markdown files under references/. The following capabilities are all drawn from the fetched content, without expanding on details from truncated sections.

Global Execution Conventions

  1. Determine the project’s Angular version first, then provide advice; APIs and best practices differ significantly between major versions. When creating a new project with the CLI, do not hardcode a version number if the user hasn’t specified one.
  2. Generated code follows the Angular style guide; scaffolding should prioritize the Angular CLI (components, services, directives, pipes, routes, etc.) to ensure structural consistency.
  3. After generating code, ng build must be executed; fix errors based on the output and do not skip this step—the Skill treats this as a critical step to ensure compilability.

Creating a New Project (ng new)

When there are no additional user constraints, the latest stable version of Angular is used by default; new projects should prioritize Signal Forms for form management (the materials note this is stable in Angular v22 and later, see references/signal-forms.md for details).

The execution order for ng new is strictly defined; the Agent must follow the steps to select the appropriate command:

Step 1: User specifies a version

  • Use npx, don’t rely on the locally installed CLI:
npx @angular/cli@<requested_version> new <project-name>

Step 2: No version specified, and the local CLI is available

  • First run ng version; if successful, use the local/global installation directly:
ng new <project-name>

Step 3: No version specified, and ng version fails

  • Use npx to fetch the latest CLI:
npx @angular/cli@latest new <project-name>

Components and Templates

Consult reference documents based on the task, including but not limited to:

  • Basics: component structure, metadata, self-closing tags, template control flow (@if, @for, @switch) → references/components.md
  • Inputs/Outputs: Signal inputs, transforms, model inputs; Signal outputs → inputs.md, outputs.md
  • Host, naming (“Intent over Role” in Angular v20+), queries and <ng-content> projection, @defer deferrable views → corresponding references/*.md

Deeper content can point to https://angular.dev/guide/components.

Reactivity and Data

Centered on Signals: signal / computed, reactive contexts, untracked; linkedSignal, resource for async data, effect and afterRenderEffect, and when not to use effects—each covered in dedicated files under references/.

HTTP

Use the Angular HTTP API: provideHttpClient, HttpClient, interceptors, httpResource → references/http-client.md.

Forms

New projects on v22+ should prioritize Signal Forms; existing or older projects should match the current strategy (template-driven or reactive forms), referencing signal-forms.md, template-driven-forms.md, reactive-forms.md.

Dependency Injection

From DI basics, inject(), services and providedIn: 'root', to InjectionToken, useClass/useValue/useFactory, injection contexts, hierarchical injectors and modifiers—covered in separate files like references/di-*.md.

Other Listed Topics

The materials also explicitly reference: Pipes, Angular Aria (headless accessible components like Accordion, Listbox, Combobox, etc.), Routing (route definitions, etc., body continues after the truncation point). The description additionally covers trigger scenarios for SSR/prerendering/hydration, animations, styling and testing, CLI, etc.

Installation and Activation

The official repository README explains: Agent Skills are designed for Agent tools like Gemini CLI and Antigravity; specific activation methods should follow each tool’s documentation, or you can use the community tool skills.sh.

Community installation entry point (unified command provided by the repository):

npx skills add https://github.com/angular/skills

This command adds the entire angular/skills repository (including angular-developer and angular-new-app). If you use Cursor, Codex CLI, Claude Code, etc., refer to their respective documentation to configure the Skill directory or SKILL.md to a path readable by the Agent; the official README does not list Cursor-specific configuration items separately, so no paths are fabricated here.

Documentation links (listed by the official):

Typical Usage

The essence of usage is: propose Angular development tasks in a conversation; the Agent loads this Skill and generates code and self-checks according to the guidelines and references/.

  1. Create a new application: specify the project name and whether to lock the Angular version; the Agent should follow the three steps above to choose ng new or npx @angular/cli@... new, and prefer Signal Forms in new projects on v22+.
  2. Add feature modules: e.g., “add a deferrable-loaded block to the list page” → consult deferrable-views.md; “fetch API with httpResource” → http-client.md.
  3. Final verification: after generating or modifying code, the Skill requires running:
ng build

If there are errors, parse the build output, fix them, and then continue.

You don’t need to paste the entire style guide into your prompt; the Skill’s description already defines a broad trigger surface covering component, service, HTTP, routing, SSR, ARIA, testing, and other keyword scenarios.

Use Cases and Notes

Who It’s For

  • Developers who use Agents to write or modify Angular daily, wanting output that closely matches official documentation and current major version capabilities (Signals, new control flow, Signal Forms, etc.).
  • Teams that need to unify the “version first, then CLI, then ng build” workflow, reducing cases where Agents skip compilation checks.

Limitations and Notes

  • The Skill is a guidance and reference index; deep details are in references/*.md and angular.dev; whether the Agent correctly opens the corresponding reference every time depends on the tool’s ability to load Skill resources.
  • Version sensitivity: always let the Agent first identify the Angular version in the repository; when the user specifies an older version, must use npx @angular/cli@<version> to avoid inconsistency with the global CLI.
  • Contributions and bugs: functional changes should be submitted in angular/angular’s skills/dev-skills/; this repository is a sync outlet, and Issues follow the Angular documentation template.
  • The angular-new-app in the same repository is more focused on “building applications from scratch”; if the task is purely scaffolding, install both and choose based on the scenario.

Conclusion

angular-developer embeds the Angular team’s development conventions, topic-specific references, and hard rules like ng new / ng build into an Agent Skill, making it suitable as the default context for Angular development within Agent tools. Start installation with npx skills add https://github.com/angular/skills, then mount it according to the Skills documentation of your IDE or CLI.

Official URL: https://github.com/angular/skills/tree/main/angular-developer

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye