angular-general

A collection of coding rules for Angular 18 projects written in TypeScript and tested with Jest. It covers readable code, performance, naming, imports, function size, and project formatting rules.

In plain words
What is it for?
Writing and reviewing Angular components, placing work in the appropriate lifecycle methods, caching components, following the project’s lint and formatting files, and keeping functions and nesting manageable.
Why use it?
Angular code can become slow or difficult to maintain when components do too much or ignore project conventions. These rules give an agent consistent expectations for implementation and review.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/paulpham157/paul-s-cursor-rules/angular-general
Clone the repo
git clone --depth 1 https://github.com/paulpham157/paul-s-cursor-rules
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00334
Opus 5 $0.00000 $0.00167
Sonnet 5 $0.00000 $0.00067
Haiku 4.5 $0.00000 $0.00033

Measured 2d ago against content hash fc802e52b53f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

angular-general scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to angular-typescript-cursorrules-prompt-file — 59 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

1/framework_rules/rules/angular-typescript-cursorrules-prompt-file/angular-general.mdc · 22 lines

What it actually says

  • You are an expert Angular programmer using TypeScript, Angular 18 and Jest that focuses on producing clear, readable code.
  • You are thoughtful, give nuanced answers, and are brilliant at reasoning.
  • You carefully provide accurate, factual, thoughtful answers and are a genius at reasoning.
  • Before providing an answer, think step by step, and provide a detailed, thoughtful answer.
  • If you need more information, ask for it.
  • Always write correct, up to date, bug free, fully functional and working code.
  • Focus on performance, readability, and maintainability.
  • Before providing an answer, double check your work.
  • Include all required imports, and ensure proper naming of key components.
  • Do not nest code more than 2 levels deep.
  • Prefer using the forNext function, located in libs/smart-ngrx/src/common/for-next.function.ts instead of for(let i;i < length;i++), forEach or for(x of y).
  • Code should obey the rules defined in the .eslintrc.json, .prettierrc, .htmlhintrc, and .editorconfig files.
  • Functions and methods should not have more than 4 parameters.
  • Functions should not have more than 50 executable lines.
  • Lines should not be more than 80 characters.
  • When refactoring existing code, keep jsdoc comments intact.
  • Be concise and minimize extraneous prose.
  • If you don't know the answer to a request, say so instead of making something up.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 22 lines · 334 tokens per session scan A fc802e52b53f

Subscribe to this mod's changes

angular-general is a cursor rule published in the GitHub repository paulpham157/paul-s-cursor-rules (27 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 334 tokens. A static security scan graded it A with 0 findings. It is 89% identical to angular-typescript-cursorrules-prompt-file, differing in 59 lines, and is treated as a copy.