PromptFork

.cursorrules for a strict TypeScript + React codebase

A tuned .cursorrules file that keeps Cursor's agent on-convention: strict types, no dead code, match existing patterns.

Open in Studio
Prompt
Generate a `.cursorrules` file for a TypeScript + React + [framework] project. The rules should make the AI:

- Match existing file structure, naming, and import style before writing anything new; read neighboring files first.
- Never use `any`; prefer precise types and discriminated unions. No non-null `!` unless justified in a comment.
- Keep components small; extract logic into hooks/utils. No inline business logic in JSX.
- Never add dependencies without asking. Prefer the standard library and existing utils.
- No comments that restate code; only explain non-obvious 'why'.
- Accessibility: semantic elements, labels for icon buttons, visible focus.
- When unsure, ask a single clarifying question instead of guessing.

Output only the `.cursorrules` file contents.
Source
promptfork seed
License
CC-BY-4.0
Published
6/23/2026

More prompts you might like

Generate an opinionated Cursor ruleset for a Next.js App Router plus TS monorepo

Produces a complete, opinionated Cursor rules file for a Next.js App Router TypeScript monorepo, with every rule paired with a one-line rationale so the agent follows your stack instead of inventing patterns.

#cursor#cursorrules
New

Generate an opinionated Cursor ruleset for a Python data-engineering repo

Produces a complete Cursor rules file for a Python data-engineering codebase covering DAG conventions, testing, type hints, the SQL/Python boundary, and env handling, each rule justified so the agent respects your pipelines.

#cursor#cursorrules
New

Generate an opinionated Cursor ruleset for a Rust or C++ systems repo

Produces a complete Cursor rules file for a Rust or C++ systems codebase covering ownership, unsafe policy, error handling, concurrency, and build rules, each justified so the agent writes memory-safe, idiomatic code.

#cursor#cursorrules
New

Next.js 15 App Router page with streaming, caching, and server data

Scaffold a production App Router page: Server Component data fetching, Suspense streaming for instant TTFB, correct cache strategy (fetch cache vs unstable_cache vs revalidatePath), loading/error boundaries, and generateMetadata — with the non-obvious patterns most tutorials skip.

New

Tailwind analytics dashboard with animated stat cards, dark mode, and skeleton loading

Production-grade dashboard layout: KPI cards with counting animations and trend sparklines, a chart area, activity table — all with dark mode, skeleton loading states, and responsive breakpoints defined to the pixel.

New

Supabase RLS: owner-write, public-read policies for a table

Generate correct, non-recursive RLS policies so anyone reads published rows and only owners edit their own.

New