Angular Modern APIS
Developmentangular-modern-apisAngular Modern APIS is an Agent Skill for development published in the mgechev/skillgrade repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Guidelines for using modern Angular APIs (signals, inject, control flow)
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/mgechev/skillgrade/blob/HEAD/examples/angular-modern/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/angular-modern-apis, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Angular Modern APIs
This skill describes the mandatory coding standards for Angular components in our codebase.
Rules
All Angular components must follow these rules:
- Use signal-based inputs — Use
input()andoutput()instead of@Input()and@Output()decorators - Use
inject()for DI — Useinject()function instead of constructor parameter injection - Use built-in control flow — Use
@if,@for,@switchinstead of*ngIf,*ngFor,*ngSwitch
Examples
Signal inputs (correct)
import { Component, input, output } from '@angular/core';
@Component({ ... })
export class UserProfileComponent {
name = input.required<string>();
age = input(0);
saved = output<void>();
}
inject() for DI (correct)
import { Component, inject } from '@angular/core';
import { UserService } from './user.service';
@Component({ ... })
export class UserProfileComponent {
private userService = inject(UserService);
}
Built-in control flow (correct)
@if (user()) {
<h1>{{ user().name }}</h1>
} @else {
<p>No user found</p>
}
@for (item of items(); track item.id) {
<li>{{ item.name }}</li>
}