personal-finance / rules
Cursor rule1 starsChanged todayMITView on GitHub
Angular coding style: standalone components, signals, inject(), OnPush, block control flow, templates, forms, styles
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,243 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository84 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/angular-patterns.mdcCursor rule
- .cursor/rules/angular-security.mdcCursor rule
- .cursor/rules/angular-testing.mdcCursor rule
- .cursor/rules/common-code-review.mdcCursor rule
- .cursor/rules/common-coding-style.mdcCursor rule
- .cursor/rules/common-development-workflow.mdcCursor rule
- .cursor/rules/common-security.mdcCursor rule
- .cursor/rules/common-testing.mdcCursor rule
- .cursor/rules/csharp-coding-style.mdcCursor rule
- .cursor/rules/csharp-data-access.mdcCursor rule
- .cursor/rules/csharp-patterns.mdcCursor rule
- .cursor/rules/csharp-security.mdcCursor rule
- .cursor/rules/csharp-testing.mdcCursor rule
- .cursor/rules/design-design-system.mdcCursor rule
- .cursor/rules/project-backend.mdcCursor rule
- .cursor/rules/project-security.mdcCursor rule
- .cursor/rules/project-testing.mdcCursor rule
- .cursor/rules/project-web.mdcCursor rule
- .cursor/rules/typescript-coding-style.mdcCursor rule
- .cursor/rules/typescript-patterns.mdcCursor rule
- .cursor/rules/typescript-security.mdcCursor rule
- .cursor/rules/typescript-testing.mdcCursor rule
- angular-guideSkill
- break-uiSkill
- dotnet-create-command-querySkill
- dotnet-create-entitySkill
- dotnet-create-moduleSkill
- dotnet-ef-migrationSkill
- emil-design-engSkill
- frontend-designSkill
- impeccableSkill
- review-animationsSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- ui-ux-pro-maxSkill
- angular-guideSkill
- break-uiSkill
- dotnet-create-command-querySkill
- dotnet-create-entitySkill
- dotnet-create-moduleSkill
- dotnet-ef-migrationSkill
- emil-design-engSkill
- frontend-designSkill
- impeccableSkill
- review-animationsSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-implementSkill
- The first 60 shown.
The file
We split this angular-coding-style.mdc into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Check the installed Angular version (package.json, ng version) before writing code: APIs differ between majors.
- Very specific: line 12
Use the CLI's conventions for that version, including its file naming (recent versions drop the .component suffix.
- Distinctive: line 38
No logic in templates beyond simple conditions.
- Very specific: line 39
Every user-visible string goes through the repo's i18n pipe or $localize, with keys added to every language file in the same change.
- Distinctive: line 45
Follow the repo's choice: Signal Forms (v21+), typed Reactive Forms for complex forms, template-driven only for trivial ones.
≈ “Common” is an estimate: at least 1 in 5 of the 6,809 Cursor rule 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
--- description: "Angular coding style: standalone components, signals, inject(), OnPush, block control flow, templates, forms, styles" globs: **/src/app/**/*.ts,**/src/app/**/*.html,**/*.component.ts,**/*.component.html,**/*.service.ts,**/*.directive.ts,**/*.pipe.ts,**/*.guard.ts,**/angular.json alwaysApply: false --- <!-- Generated by armature from stack-angular/rules/angular/coding-style.md. Edit the source rule, not this file. --> # Angular coding style ## Version first Check the installed Angular version (`package.json`, `ng version`) before writing code: APIs differ between majors. Use the CLI's conventions for that version, including its file naming (recent versions drop the `.component` suffix; follow what the repo already does). After a change, the build and tests in the gate must pass. ## Components - Standalone components only; `ChangeDetectionStrategy.OnPush` on every component (or zoneless, as configured). - Signal APIs: `input()` / `input.required()`, `output()`, `model()`, `viewChild()`. No `@Input()`/`@Output()` decorators in new code. - `inject()` for dependencies; no constructor injection. `InjectionToken` for non-class values. - One component, service or pipe per file; feature folders (`features/<feature>/`), shared UI in `shared/` or the repo's `ui/` folder, cross-cutting services in `core/`. ## Signals - `signal` for local state, `computed` for derived values, `linkedSignal` for writable state that resets when its source changes. - `resource()` / `rxResource()` for async data into signals; no manual `subscribe` to load data. - `effect()` only for side effects outside Angular (logging, third-party DOM, storage). Never to copy one signal into another: use `computed` or `linkedSignal`. - Observables at the edges (HTTP, router events); convert with `toSignal` / `rxResource`. Any manual subscription uses `takeUntilDestroyed()`. ## Templates - Block control flow: `@if`, `@for (x of xs(); track x.id)`, `@switch`, `@defer` for heavy below-the-fold parts. `track` always names a stable id. - No logic in templates beyond simple conditions; computed signals or pure pipes instead of method calls. - Every user-visible string goes through the repo's i18n pipe or `$localize`, with keys added to every language file in the same change. - Formatting of money, dates and numbers through the repo's shared pipes, never ad hoc in the template. ## Forms Follow the repo's choice: Signal Forms (v21+), typed Reactive Forms for complex forms, template-driven only for trivial ones. Errors appear next to the field. ## Styles - Component styles stay encapsulated; `:host` for the host element; no `ViewEncapsulation.None` outside a design system. - Tailwind utilities and CSS custom properties from the theme; no raw colours (see the design rule if installed). ## Formatting Prettier (or the repo's formatter) is part of the gate; run its check before finishing. <!-- Adapted from affaan-m/ECC rules/angular/coding-style.md (MIT) at d2ef268; merged with the owner's conventions from personal-finance-sdd (Angular 22, standalone + OnPush + inject(), signals and rxResource, ngx-translate keys in every language file, shared money/date pipes, Prettier in the gate). Ordo's ECC copy has no Angular rules. -->
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.

