z1: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from guidovizoso/z1. It costs 337 tokens per session, scanned A, original, MIT.

A set of coding rules for TypeScript projects, especially projects using React and JSX for user interfaces. It defines preferred file structure, naming, syntax, validation, and error-handling practices.

In plain words
What is it for?
Use it when writing or reviewing TypeScript components, functions, forms, server actions, and related files.
Why use it?
It gives the coding agent consistent project conventions, reducing inconsistent styles, duplicated code, and missed error cases.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is guidovizoso/z1's own configuration. It tells Cursor how to work on z1 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything z1 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to guidovizoso/z1. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/guidovizoso/z1/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/guidovizoso/z1

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/guidovizoso/z1/cursorrules/github.svg)](https://agentmods.dev/rules/guidovizoso/z1/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/guidovizoso/z1/cursorrules"><img src="https://agentmods.dev/badge/rules/guidovizoso/z1/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/guidovizoso/z1/cursorrules"><img src="https://agentmods.dev/badge/rules/guidovizoso/z1/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 337 This file is loaded in full into every session.
When invoked 337 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00337 $0.00337
Opus 5.5 $0.00135 $0.00135
Sonnet 5.5 $0.00067 $0.00067
Haiku 4.5 $0.00034 $0.00034

Measured 2mo ago against content hash c89313317a2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 50 lines

What it actually says

Code Style and Structure:

  • Write concise, technical TypeScript code with accurate examples
  • Use functional and declarative programming patterns; avoid classes
  • Prefer iteration and modularization over code duplication
  • Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
  • Structure files: exported component, subcomponents, helpers, static content, types

Naming Conventions:

  • Use lowercase with dashes for directories (e.g., components/auth-wizard)
  • Favor named exports for components

TypeScript Usage:

  • Use TypeScript for all code; prefer interfaces over types
  • Avoid enums; use maps instead
  • Use functional components with TypeScript interfaces

Syntax and Formatting:

  • Use the "function" keyword for pure functions
  • Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
  • Use declarative JSX

Error Handling and Validation:

  • Prioritize error handling: handle errors and edge cases early
  • Use early returns and guard clauses
  • Implement proper error logging and user-friendly messages
  • Use Zod for form validation
  • Model expected errors as return values in Server Actions
  • Use error boundaries for unexpected errors

UI and Styling:

  • Use Shadcn UI, Radix, and Tailwind Aria for components and styling
  • Implement responsive design with Tailwind CSS; use a mobile-first approach

Performance Optimization:

  • Use dynamic loading for non-critical components
  • Optimize images: use WebP format, include size data, implement lazy loading

Key Conventions:

  • Optimize Web Vitals (LCP, CLS, FID)

Follow Tanstack Start docs for Data Fetching, Rendering, and Routing

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. 2mo ago First seen · 50 lines · 337 tokens per session scan A c89313317a2c

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository guidovizoso/z1 (10 stars, last pushed 1y ago), licensed MIT. It adds 337 tokens to every session, about $0.0013 per session on Opus 5.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.

Related

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesguidovizoso/z1Cursor rule101y agoMITA337Cursor
django-pythonPostHog/posthogCursor rule41kyesterdaynoneA1,586Cursor
react-typescriptPostHog/posthogCursor rule41kyesterdaynoneA0Cursor
rustPostHog/posthogCursor rule41kyesterdaynoneA903Cursor
react-typescriptPostHog/posthog-fossCursor rule728yesterdayMITA0Cursor
ai-agent-specialistPatrickJS/awesome-cursorrulesCursor rule41k5mo agoCC0-1.0A530Cursor
react-chakra-ui---typescript-usageholtwood/awesome-cursorrules-zhCursor rule24118d agoMITA0Cursor