angular-general

A set of coding rules for Angular components written in TypeScript, targeting Angular 18 and Jest. It covers readable code, performance, project style checks, and maintainability.

In plain words
What is it for?
Use it when creating or changing Angular component TypeScript files, including their functions, imports, naming, loops, and test-related code.
Why use it?
It gives the coding agent consistent boundaries for component code and helps avoid deeply nested, hard-to-maintain implementations.

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/toptalentcoder/cursor-awesomerules/angular-general
Clone the repo
git clone --depth 1 https://github.com/toptalentcoder/Cursor-AwesomeRules
Per session 334 This file is loaded in full into every session.
When invoked 334 The same file — it is already loaded in full.
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.00334 $0.00334
Opus 5 $0.00167 $0.00167
Sonnet 5 $0.00067 $0.00067
Haiku 4.5 $0.00033 $0.00033

Measured yesterday 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 yesterday.

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.

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

What it actually says


description: General rules for Angular components, focusing on code quality, performance, and maintainability. globs: **/*.component.ts

  • 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. yesterday 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 toptalentcoder/Cursor-AwesomeRules (6 stars, last pushed 1y ago), licensed CC0-1.0. It adds 334 tokens to every session, about $0.0017 per session on Opus 5. 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.