Generate modern Cursor Project Rules (.mdc) automatically on RepoRules.dev →
← Back to home

Example outputs

Real package.json files → detected stack → generated standards. No templates — every rule references specific detected libraries.

Next.js + Prisma + Zod

Input

{
  "dependencies": {
    "next": "^15.0",
    "react": "^19.0",
    "tailwindcss": "^4.0",
    "prisma": "^6.0",
    "@prisma/client": "^6.0",
    "zod": "^3.23"
  }
}

Detected Stack

  • - Next.js 15 App Router
  • - React 19 Server Components
  • - Tailwind CSS v4
  • - Prisma ORM with PostgreSQL
  • - Zod validation

Generated Standards

  • Prefer Server Components by default

    Next.js 15 + React 19. Server Components reduce client bundle size and improve data fetching consistency.

  • Never fetch data in client components

    App Router pattern. Server Components fetch data, pass as props to client leaves. Prevents waterfall requests.

  • Wrap multi-table writes in Prisma transactions

    Prisma $transaction ensures atomicity. Without it, partial writes create inconsistent state.

  • Validate all external input with Zod schemas

    Define schemas in lib/schemas/. Zod infers TypeScript types, eliminating duplication.

  • Use Server Actions for form mutations

    Next.js 15 native pattern. Avoids API routes for form submissions, keeps logic co-located.

FastAPI + SQLAlchemy

Input

{
  "dependencies": {
    "fastapi": "^0.115",
    "uvicorn": "^0.32",
    "sqlalchemy": "^2.0",
    "pydantic": "^2.9",
    "alembic": "^1.14"
  }
}

Detected Stack

  • - Python 3.12+
  • - FastAPI 0.115
  • - SQLAlchemy 2.0 ORM
  • - Pydantic v2 schemas
  • - Alembic migrations

Generated Standards

  • Use Pydantic v2 model_validate, not dict()

    Pydantic v2's model_validate provides strict type checking. dict() bypasses validation.

  • Never use sync SQLAlchemy sessions in async routes

    FastAPI is async-native. Sync sessions block the event loop. Use AsyncSession exclusively.

  • Alembic migrations required before deploy

    Without alembic upgrade head in CI, schema drift will cause production errors.

  • Return Pydantic response models, never raw ORM objects

    ORM objects leak internal DB structure. Pydantic models define public API contracts.

  • Use lifespan context for DB pool initialization

    FastAPI lifespan replaces deprecated on_event. Ensures clean startup/shutdown of connection pools.

Go + Chi + sqlc

Input

{
  "dependencies": {
    "go": "1.23",
    "chi": "^5.1",
    "sqlc": "^1.27",
    "pgx": "^5.7",
    "validator": "^10"
  }
}

Detected Stack

  • - Go 1.23
  • - Chi router
  • - sqlc for type-safe SQL
  • - pgx PostgreSQL driver
  • - validator v10

Generated Standards

  • Never write raw SQL strings — use sqlc generated code

    sqlc generates type-safe Go from SQL. Prevents SQL injection and type mismatches at compile time.

  • Context passed as first parameter to every function

    Go convention. Enables request-scoped cancellation and timeout propagation.

  • Validate all request structs before processing

    validator tags on structs catch bad input at the boundary. Never trust payloads, even internal ones.

  • Wrap errors with fmt.Errorf and %w, never return bare errors

    Go 1.13+ error wrapping preserves the error chain. Callers can use errors.Is and errors.As.

  • Use pgx pool, not single connection

    pgxpool manages connection lifecycle. Single connections leak and don't recover from network failures.

Try it with your own repo

Generate Standards