cursorrules

A set of coding rules for TypeScript, React, and Next.js projects, focused on making program behavior clear, reducing unnecessary complexity, and using types and APIs to prevent mistakes.

In plain words
What is it for?
Use it to guide engineering decisions in TypeScript, React, and Next.js codebases. The input provides principles and commitments but not a complete list of later instructions.
Why use it?
It gives the agent consistent guidance for designing code and handling edge cases before implementation begins.

Cursor rule for Cursor

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/kerim-sabic/elite-engineer/cursorrules
Clone the repo
git clone --depth 1 https://github.com/Kerim-Sabic/elite-engineer

Made for: Cursor.

Per session 2,899 This file is loaded in full into every session.
When invoked 2,899 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.02899 $0.02899
Opus 5 $0.01450 $0.01450
Sonnet 5 $0.00580 $0.00580
Haiku 4.5 $0.00290 $0.00290

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

Security

Grade A, and why

cursorrules 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 3d 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.

.cursorrules · 269 lines

How it starts

The opening of the file, as written. The whole thing — 269 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elite Engineer — Cursor Rules

The operating system for elite software engineering in TypeScript, React, and Next.js.

Every principle traces to a named source. Every directive is actionable.

THE STANDARD

Code exhibits taste — Torvalds' term for finding the formulation where special cases disappear. Seek representations where edge cases become impossible, the type system proves correctness, and the API guides users into the pit of success.

Five commitments:

  1. Carmack's vigilance — Make state visible. Prefer straightline execution. Distrust abstraction that hides what's happening.
  2. Hickey's discipline — Simple ≠ easy. Simple means "one fold" (does one thing). Easy means "nearby" (familiar). Choose simple.
  3. Brooks' realism — Most complexity is essential (domain-inherent), not accidental (tool-introduced). Model the domain correctly first.
  4. Metz's patience — "Duplication is far cheaper than the wrong abstraction." Start with Shameless Green. Abstract only with 3+ concrete instances.
  5. Ousterhout's strategy — Tactical programmers optimize for the next feature. Strategic programmers optimize for great design. Invest 10-20% in design improvements.

BEFORE THE FIRST LINE

Answer before writing code:

  1. What is the essential complexity? (Brooks) — What's inherent to the domain?
  2. Where are the boundaries? (Evans) — Use domain vocabulary for all names.
  3. What is the pit of success? (Mariani) — Make correct usage easier than incorrect.
  4. Is this the simplest solution? (Hickey) — Fewest moving parts, fewest ways to misuse.
  5. Should I abstract? (Metz) — Only with 3+ instances. Otherwise, duplicate.

ARCHITECTURE LAWS

Deep Modules Win (Ousterhout)

A module's value = functionality provided minus interface complexity. useAuth() returning { user, login, logout, isLoading } while hiding token management is deep. A hook requiring callers to manage tokens and headers is shallow.

Define Errors Out of Existence (Ousterhout)

deleteItem(id) succeeds whether the item exists or not — postcondition satisfied either way.

Read the full file on GitHub · 269 lines

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. 3d ago First seen · 269 lines · 2,899 tokens per session scan A 8897168f1ed8

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Kerim-Sabic/elite-engineer (5 stars, last pushed 4mo ago), licensed MIT. It adds 2,899 tokens to every session, about $0.0145 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.