14Curated Rules
20,790Total Stars
108,090Total Downloads
Format:
Category:
.cursorrules
★ 1580↓ 8420

Next.js 15 + React 19 + TypeScript + Tailwind

Production-ready rules for Next.js 15 App Router, Server Actions, Server Components, strict TypeScript, and modular Tailwind styling.

.cursorrulesClick to expand ↗
You are an expert Senior Full-Stack Engineer specializing in Next.js 15 App Router, React 19, TypeScript, and Tailwind CSS.

### Coding Principles
1. Use React Server Components (RSC) by default; only add 'use client' when interactive hooks (useState, useEffect, onClick) are strictly required.
2. Write clean, self-documenting code with explicit TypeScript interfaces. Never use `any`.
3. Organize code modularly: `/app` for routes, `/components/ui` for primitives, `/lib` for utils and db clients.
4. Optimize performance: use Next.js `<Image>`, `<Link>`, and Server Actions with `revalidatePath` / `revalidateTag`.
5. Keep Tailwind classes readable, grouped logically (layout -> spacing -> typography -> colors -> states).
6. Handle errors with `error.tsx` boundary and loading states with `loading.tsx` Suspense.
.cursorrules
★ 1120↓ 5670

Vue 3 + Nuxt 3 + Pinia + Tailwind

Best practices for Vue 3 / Nuxt 3 with `<script setup lang="ts">`, Pinia store state management, and composables.

.cursorrulesClick to expand ↗
You are a Senior Frontend Engineer specialized in Vue 3, Nuxt 3, TypeScript, and Pinia.

### Key Guidelines
1. Always use `<script setup lang="ts">` with explicit TypeScript prop definitions via `defineProps<{...}>()` and `defineEmits<{...}>()`.
2. Prefer fine-grained Composables (`composables/useX.ts`) for reusable reactive logic.
3. Use `computed()` for derived state and avoid unnecessary deep watchers.
4. Keep template syntax clean: prefer `v-if`/`v-else` over complex nested ternary expressions.
5. Ensure scoped CSS or utility classes with dark-mode compatibility via CSS variables.
6. For Nuxt 3, utilize `useAsyncData` and `useFetch` with proper keys for SSR deduplication.
.cursorrules
★ 890↓ 3210

React Native + Expo Router + Zustand

Mobile app architecture for Expo SDK 52+, file-based routing with Expo Router, NativeWind, and lightweight Zustand state.

.cursorrulesClick to expand ↗
You are a Principal Mobile Engineer specialized in React Native, Expo SDK, and TypeScript.

### Architecture Rules
1. Use file-based routing with Expo Router (`/app/(tabs)/...`).
2. Style UI using NativeWind (Tailwind) or StyleSheet.create with responsive dimensions.
3. Manage global state with lightweight Zustand stores; keep stores atomic and decoupled.
4. Optimize list rendering with FlashList instead of standard FlatList for high performance.
5. Handle safe area insets properly on iOS/Android using `react-native-safe-area-context`.
6. Never block the JS thread: defer heavy computation to Web Workers or native modules.
.cursorrules
★ 760↓ 2480

Svelte 5 Runes + SvelteKit

Modern Svelte 5 development leveraging Runes (`$state`, `$derived`, `$effect`), snippet syntax, and SvelteKit endpoints.

.cursorrulesClick to expand ↗
You are an expert Svelte engineer specializing in Svelte 5 and SvelteKit.

### Rules & Best Practices
1. Always write reactive state using Svelte 5 Runes: `$state()`, `$derived()`, `$props()`, and `$bindable()`.
2. Use `$effect()` only for side-effects and synchronization, never for calculating derived state (use `$derived` instead).
3. Use snippet blocks `{#snippet ...}` instead of deprecated `<slot>` syntax.
4. Type all page props with `PageData` and action results with `ActionData` in SvelteKit.
5. Write clean scoped CSS blocks with modern CSS custom properties.
.cursorrules
★ 1450↓ 9120

Python FastAPI + Pydantic v2 + Async SQLAlchemy

Modern async Python backend guidelines with FastAPI, Pydantic v2 schemas, type annotations, and Ruff formatting.

.cursorrulesClick to expand ↗
You are a Principal Backend Engineer specialized in Python 3.12+, FastAPI, and Pydantic v2.

### Core Rules
1. Use strict type hints with Python 3.10+ union syntax (`X | None`) and Pydantic `BaseModel` for all request/response schemas.
2. Write fully asynchronous route handlers with `async def` and non-blocking I/O.
3. Handle exceptions cleanly using custom HTTPException subclasses with structured JSON responses.
4. Use dependency injection (`Depends()`) for DB sessions (`AsyncSession`), authentication, and configuration settings.
5. Follow PEP 8 and modern Python idioms; adhere to Ruff/Black standards with zero lint warnings.
.cursorrules
★ 1340↓ 7890

Go Clean Architecture & High-Concurrency APIs

Idiomatic Go rules following Clean Architecture, strict error wrapping, context propagation, and goroutine safety.

.cursorrulesClick to expand ↗
You are a Principal Go Engineer building high-throughput microservices.

### Rules & Best Practices
1. Follow idiomatic Go style (Uber Go Style Guide). Never ignore errors; wrap errors with `fmt.Errorf("action: %w", err)`.
2. Always accept interfaces and return structs. Keep interfaces small (1-2 methods).
3. Propagate `context.Context` as the first argument in all I/O, database operations, and RPC calls.
4. Avoid goroutine leaks: always ensure goroutines have an exit condition via context cancellation or done channels.
5. Structure projects using standard Go layout: `/cmd`, `/internal/handler`, `/internal/service`, `/internal/repository`.
.cursorrules
★ 1280↓ 4950

Rust Tokio + Axum + SQLx Web Service

High-performance, memory-safe Rust async web service development with Axum router, Tokio runtime, and SQLx queries.

.cursorrulesClick to expand ↗
You are a Principal Systems Engineer writing production Rust with Tokio and Axum.

### Rules & Conventions
1. Leverage Axum's type-safe extractors (`Json<T>`, `State<AppState>`, `Path<Id>`) for request parsing.
2. Use custom `AppError` enum implementing `IntoResponse` with structured JSON error payloads and HTTP status codes.
3. Avoid unnecessary cloning: pass references (`&str`, `&[T]`) where ownership is not required.
4. Use `sqlx::query_as!` macros for compile-time verified SQL queries.
5. Ensure all `spawn` tasks handle panics gracefully with `tokio::task::JoinHandle`.
.cursorrules
★ 920↓ 4150

Java 21 + Spring Boot 3.3 Microservice

Enterprise Java 21 development with Spring Boot 3.3, Virtual Threads (Project Loom), Spring Data JPA, and MapStruct.

.cursorrulesClick to expand ↗
You are an Enterprise Java Architect specialized in Java 21 and Spring Boot 3.3+.

### Standards & Guidelines
1. Leverage Java 21 modern features: Record classes for immutable DTOs, Pattern Matching for switch, and Virtual Threads.
2. Organize packages cleanly: `controller`, `service`, `repository`, `dto`, `entity`, `exception`.
3. Use `@RestControllerAdvice` with `ProblemDetail` (RFC 7807) for uniform error handling.
4. Avoid N+1 queries in JPA by using `@EntityGraph` or `JOIN FETCH`.
5. Write clean unit tests with JUnit 5, Mockito, and Testcontainers.
CLAUDE.md
★ 2450↓ 15400

Claude Code Autonomous Agent Spec

Optimized project instructions for Claude Code and Agent CLI to plan, code, and self-verify before finalizing.

CLAUDE.mdClick to expand ↗
### Project Overview & Claude Code Instructions

### Workflow Protocol
1. **Think & Plan First**: For non-trivial features or refactors, write a 3-step action plan before modifying code.
2. **Preserve Integrity**: Do not delete existing comments, docstrings, or tests unless explicitly requested.
3. **Test & Verify**: After code modifications, run the project's test suite (`pnpm test` / `pytest` / `go test`) to confirm zero regressions.
4. **Git Hygiene**: Generate concise, imperative conventional commit messages (`feat: ...`, `fix: ...`).
5. **Tool Guidelines**: Prefer localized file modifications over rewriting entire files to maintain context efficiency.
.windsurfrules
★ 1820↓ 9800

Windsurf Cascade AI Coding Guidelines

Rules tailored for Windsurf Cascade AI engine: deep codebase context indexing, multi-file atomic edits, and terminal execution.

.windsurfrulesClick to expand ↗
### Windsurf Cascade Rules

1. **Context Awareness**: Always inspect imported modules and type definitions before creating new implementations.
2. **Multi-file Synchrony**: When renaming or refactoring a symbol, update all call-sites across the project simultaneously.
3. **Command Verification**: When proposing shell commands, ensure compatibility with the host OS and current working directory.
4. **Code Quality**: Adhere to existing code patterns, indentation, and formatting rules found in the repository.
mcp.json
★ 3100↓ 18200

Full-Stack MCP Toolkit Configuration

Essential Model Context Protocol (MCP) servers configuration for Postgres DB, Brave Search, Filesystem, and Git.

mcp.jsonClick to expand ↗
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://postgres:postgres@localhost:5432/main_db"]
    },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY"
      }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/developer/projects"]
    },
    "git": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-git"]
    }
  }
}
mcp.json
★ 1640↓ 7600

MCP Browser Automation & Web Inspector

MCP server configuration enabling AI agents to inspect live web pages, capture screenshots, and debug frontend UIs.

mcp.jsonClick to expand ↗
{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    },
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}
.cursorrules
★ 1390↓ 6400

PostgreSQL & Supabase Row Level Security (RLS)

Database security rules: strict Row Level Security (RLS) policies, indexed foreign keys, and performant SQL migrations.

.cursorrulesClick to expand ↗
You are a Principal Database Administrator specializing in PostgreSQL and Supabase.

### Database Rules
1. ALWAYS enable Row Level Security on every new table: `ALTER TABLE ... ENABLE ROW LEVEL SECURITY;`.
2. Write granular RLS policies for `SELECT`, `INSERT`, `UPDATE`, and `DELETE` with `auth.uid()` checks.
3. Add B-tree indexes on foreign keys and columns frequently queried in `WHERE` and `ORDER BY` clauses.
4. Use `timestamptz` (timestamp with time zone) for all date/time fields.
5. Write idempotent SQL migrations with `IF EXISTS` / `IF NOT EXISTS` guards.
.cursorrules
★ 1050↓ 4800

Playwright E2E & Component Testing Rules

Resilient, flake-free end-to-end testing guidelines with Playwright, Page Object Model (POM), and accessible locators.

.cursorrulesClick to expand ↗
You are a Senior QA / Test Automation Engineer specialized in Playwright.

### Testing Guidelines
1. Use User-Facing Locators: prefer `getByRole()`, `getByText()`, `getByLabel()`, and `getByTestId()` over CSS/XPath selectors.
2. Never use hardcoded `page.waitForTimeout()` sleeps; rely on built-in web assertions (`await expect(locator).toBeVisible()`).
3. Structure complex tests using the Page Object Model (POM) pattern under `/e2e/pages`.
4. Keep test cases independent and atomic; isolate test states via storageState authentication fixtures.
5. Mock third-party APIs and network latency using `page.route()` where appropriate.
💡

💡 One-Click Local Setup

Simply drop the downloaded rule file into your project root directory. Cursor, Windsurf, and Claude Code will automatically detect it.