code-style

A set of coding rules for TypeScript projects, covering language, naming, imports, types, and code hygiene. It also defines which languages to use in code, product text, and chat replies.

In plain words
What is it for?
Use it when writing or reviewing TypeScript, project rules, comments, identifiers, documentation, and user-facing text.
Why use it?
It gives the project consistent conventions and helps prevent unsafe or invalid TypeScript patterns.

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/evilfreelancer/zaezd/code-style
Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/zaezd

Made for: Cursor.

Per session 860 This file is loaded in full into every session.
When invoked 860 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.00860 $0.00860
Opus 5 $0.00430 $0.00430
Sonnet 5 $0.00172 $0.00172
Haiku 4.5 $0.00086 $0.00086

Measured yesterday against content hash 4c577c1b6c69, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-style 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.

.cursor/rules/code-style.mdc · 80 lines

How it starts

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

Code style

Language

  • Code, comments, identifiers, docstrings, commit messages: English.
  • Agent rule files and briefs (.cursor/rules/*.mdc, .claude/rules/*.md, AGENTS.md, CLAUDE.md): English, unless the project owner asks otherwise; then switch every tree at once so the Rules Sync diff stays reviewable.
  • User-facing product copy (the trip board, the user guide): Russian, following the microcopy rules in specs/05-interfeys.md.
  • Chat replies to the user: Russian.

TypeScript

  • Node >= 22.6, ESM only ("type": "module"). Relative imports carry the .ts extension; the toolchain runs TypeScript through Node's native type stripping, so only erasable syntax is allowed: no enum, no namespace, no parameter properties, no decorators. Use const objects with as const instead of enum.
  • strict is on, together with noUncheckedIndexedAccess, exactOptionalPropertyTypes and verbatimModuleSyntax. Type-only imports use import type.
  • any is forbidden and the linter enforces it. External payloads enter as unknown and are narrowed by an explicit parser in src/sources/. Everything downstream of that parser is a domain type.
  • Prefer type aliases for data, discriminated unions over optional-field soup, and readonly arrays for anything crossing a module boundary.
  • Named exports only; one clear responsibility per module. A file above roughly 300 lines is a signal to split, and a single file holding two thousand lines is an explicit reviewer complaint in specs/08-repozitoriy.md.

Errors and absence

  • A missing field is undefined and stays visible as missing all the way to the UI. Never substitute a default, a guess or a web-search answer for data a source did not return. This is the product's core promise, not a style preference.
  • Throw typed errors carrying the source name and the arguments that failed (class SourceError extends Error), not bare strings.
  • Optional enrichment never throws outward: it resolves to undefined after its timeout and the caller renders the absence.

Read the full file on GitHub · 80 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. yesterday First seen · 80 lines · 860 tokens per session scan A 4c577c1b6c69

Subscribe to this mod's changes

code-style is a cursor rule published in the GitHub repository EvilFreelancer/zaezd (1 stars, last pushed 13d ago), licensed MIT. It adds 860 tokens to every session, about $0.0043 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.