angular-conventions
Skill1 starsChanged 7 days agoMITView on GitHub
Modern Angular (v18+) coding standards — signals, standalone, OnPush, inject(), built-in control flow. Use when writing, refactoring or reviewing Angular code.
In this repository7 other files it gives its agents.
- appstore-payouts-to-excelSkill
- clean-git-summarySkill
- conventional-commitSkill
- create-commitSkill
- invoice-processingSkill
- ksef-invoiceSkill
- xlsx-toolkitSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Import only the pipes/directives used, never CommonModule.
- Very specific: line 19
Update with set/update returning new objects/arrays — never mutate.
- Very specific: line 28
No method calls in bindings ({{ total() }} of a computed is fine, {{ calcTotal() }} is not) — use computed() or a pure pipe.
- Very specific: line 33
No silent catchError(() => of(null)) — log and expose an error state.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Angular Conventions
Project rules (lint config, existing patterns) override these.
Components:
- Standalone (default since v19 — don't write
standalone: true). AlwaysChangeDetectionStrategy.OnPush. - Import only the pipes/directives used, never
CommonModule. - Host bindings in
host: {}metadata, not@HostBinding/@HostListener. - Template-only members
protected; internals#private.
Signals:
input(),input.required(),output(),model()— no@Input/@Output, noSignalsuffix, no aliases.- State
signal(), derivedcomputed(), writable derivedlinkedSignal(). - Update with
set/updatereturning new objects/arrays — never mutate. effect()only for real side effects (DOM libs, analytics), never to copy state between signals.
DI:
readonly #api: ApiService = inject(ApiService);— empty or no constructor.- Stateless services
providedIn: 'root'; config through typedInjectionToken<T>.
Templates:
@if,@for,@switchonly. Every@forhastrack item.id($indexonly for primitives); add@emptywhere a list can be empty.- No method calls in bindings (
{{ total() }}of acomputedis fine,{{ calcTotal() }}is not) — usecomputed()or a pure pipe. [class.x]/[style.x]instead ofngClass/ngStyle.
Types and errors:
- No
any. External data isunknown, narrowed by a type guard or schema (Zod/Valibot). - No silent
catchError(() => of(null))— log and expose an error state. Noconsole.log.
@Component({
selector: 'app-user-card',
templateUrl: './user-card.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
host: { '[class.active]': 'active()', '(click)': 'select.emit(user().id)' },
})
export class UserCardComponent {
readonly user = input.required<User>();
readonly active = input(false);
readonly select = output<string>();
readonly #format: NameFormatter = inject(NameFormatter);
protected readonly name = computed(() => this.#format.full(this.user()));
}Tests: *.spec.ts next to the file; test inputs, outputs and user interaction, not private details.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

