personal-finance / rules
Cursor rule1 starsChanged todayMITView on GitHub
Angular patterns: smart and presentational components, API service, resources, interceptors, routing and guards, overlays, accessibility
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-coding-style.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-patterns.mdc into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Every list view handles loading, empty and error states explicitly.
- Very specific: line 21
Use HttpClient (with withFetch()), never raw fetch, so interceptors apply.
≈ “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 patterns: smart and presentational components, API service, resources, interceptors, routing and guards, overlays, accessibility"
globs: **/src/app/**/*.ts,**/src/app/**/*.html,**/*.component.ts,**/*.service.ts,**/*.interceptor.ts,**/*.routes.ts
alwaysApply: false
---
<!-- Generated by armature from stack-angular/rules/angular/patterns.md. Edit the source rule, not this file. -->
# Angular patterns
## Components
- Pages (smart) own data loading and mutations; presentational components take inputs, emit outputs and hold only
UI state.
- Shared building blocks (page header, empty state, status badge, modal, select, date field) live once in `shared/`
and are reused; a second copy is a review finding.
- Every list view handles loading, empty and error states explicitly; a reload keeps the previous data on screen
and shows a quiet indicator instead of blanking.
## Data access
- One API service in `core/` wraps `HttpClient` and returns typed results; components never build URLs.
- Use `HttpClient` (with `withFetch()`), never raw `fetch`, so interceptors apply.
- The backend computes business figures; the UI only displays them.
## Interceptors (functional, `withInterceptors([...])`)
- Session expiry: a 401 sends the user to sign in and back to the same page.
- Timeouts on API calls, longer for uploads, with a clear message.
- XSRF: `withXsrfConfiguration` when the API issues an XSRF cookie.
- Interceptors never log request or response bodies.
## Routing
- Lazy-load features with `loadComponent` / `loadChildren`; `withComponentInputBinding()` binds route params to
inputs.
- Functional guards; `canMatch` for routes a user may not load at all. Hiding a link is not access control.
## Overlays
CDK overlays (dialogs, selects, menus) render in the browser top layer by default in recent CDK versions, which hides
toasts behind open dialogs. Provide `{ provide: OVERLAY_DEFAULT_CONFIG, useValue: { usePopover: false } }` once in the
app config when the app shows toasts, and show a form's errors inside its dialog.
## RxJS
`switchMap` for "latest wins" (search), `concatMap` for ordered writes, `exhaustMap` for submit buttons; no nested
subscribes.
## Accessibility
Semantic elements, labelled controls, focus moved into dialogs and back on close, keyboard paths for every action,
visible focus.
<!-- Adapted from affaan-m/ECC rules/angular/patterns.md (MIT) at d2ef268; merged with the owner's conventions from personal-finance-sdd (core/api service, functional interceptors for 401, timeouts and XSRF, shared page components, liveResource keeping data on reload, backend computes figures) and NEXUS knowledge/angular/cdk-overlay-top-layer.md. -->
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.

