cursorrules

A set of Cursor instructions for building frontend applications with a specified technology stack and development process. Cursor is a coding editor with built-in AI assistance.

In plain words
What is it for?
Use it to guide frontend code generation and reviews involving TypeScript, React, routing, Vite, tests, CI, UI components, Tailwind CSS, forms, and related tools.
Why use it?
It gives the agent consistent choices for languages, frameworks, testing, styling, and code quality. It also points new projects toward the newer .cursor/rules format because this file is kept for compatibility.

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/barrosohub/frontend-stack-blueprint/cursorrules
Clone the repo
git clone --depth 1 https://github.com/barrosohub/frontend-stack-blueprint

Made for: Cursor.

Per session 1,746 This file is loaded in full into every session.
When invoked 1,746 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 92% 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.01746 $0.01746
Opus 5 $0.00873 $0.00873
Sonnet 5 $0.00349 $0.00349
Haiku 4.5 $0.00175 $0.00175

Measured yesterday against content hash a799ce202802, 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 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

92% identical to frontend-stack-blueprint — 11 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.

.cursorrules · 147 lines

How it starts

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

Frontend Stack Blueprint

⚠️ DEPRECATION: This .cursorrules file is kept for backward compatibility. Cursor now reads from .cursor/rules (modern format). New projects should use .cursor/rules instead.

Canonical frontend stack for any new project. Platform-agnostic. This file defines the technology decisions and rules an AI coding agent MUST follow when generating frontend code.

Stack

  • TypeScript ≥7 (strict mode, no any)
  • React ≥19.2.7 (function product components; class Error Boundaries allowed)
  • TanStack Router ≥1 (default) or React Router ≥8
  • pnpm (priority package manager) · Node.js >=22.22 · Bun ≥1 (runtime alternative)
  • Vite ≥8 (requires Node.js >=22.22)
  • Vitest ≥4 (4.x recommended) + Playwright ≥1.61 for deployed UI
  • Protected CI merge gate + Husky + lint-staged + ESLint + Prettier
  • Base UI · Radix/React Aria alternatives · shadcn/ui (recommended) · Floating UI · Embla · cmdk
  • Tailwind CSS ≥4 + clsx + tailwind-merge (cn() utility required)
  • Motion (formerly Framer Motion) — import from 'motion/react'
  • DESIGN.md Design Contract (provisional, optional): root DESIGN.md → generated Tailwind 4 tokens
  • React Hook Form + Zod
  • Data Access (optional): Prisma ≥7
  • Authentication (optional): Better Auth ≥1
  • Managed Services (optional): Neon Postgres | Cloudflare D1 | Cloudflare R2 | Cloudflare KV | Resend
  • date-fns ≥4.1 (+@date-fns/tz)
  • Zustand · TanStack Query ≥5 (TanStack Store remains under evaluation)
  • Lexical (primary) · ProseMirror (fallback) · Shiki
  • Advanced Capabilities (optional): Markdown · TanStack Table · Recharts · Mermaid · CodeMirror · xterm/node-pty · Yjs · PDF.js
  • Format.js · react-intl
  • Sentry · OpenTelemetry · Statsig (capability-gated)
  • Lucide (default icon library)

Architecture (MANDATORY)

  • Structure by feature/domain, NEVER by file type
  • Composition over inheritance — hooks for logic reuse
  • Strong typing: strict mode, no any; explicit public boundaries and useful local inference
  • DRY: extract only after stable shared semantics are proven
  • KISS: components ≤150 lines, functions ≤30 lines
  • YAGNI: no speculative features or abstractions
  • React Compiler 1.x: incremental opt-in after compatibility and performance validation

Read the full file on GitHub · 147 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 · 147 lines · 1,746 tokens per session scan A a799ce202802

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository barrosohub/frontend-stack-blueprint (3 stars, last pushed 1mo ago), licensed MIT. It adds 1,746 tokens to every session, about $0.0087 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to frontend-stack-blueprint, differing in 11 lines, and is treated as a copy.