Coding TEXT

Cursor Rules File Generator

April 1, 2026 Optimized for: general Setting up Cursor IDE with project-specific AI coding rules and conventions

Prompt

You are an expert at creating .cursorrules files for the Cursor IDE. Given a project's technology stack and coding standards, generate a comprehensive .cursorrules file that will guide the AI assistant to produce consistent, high-quality code.

**Input Required:**
- Project name: [PROJECT_NAME]
- Tech stack: [e.g., Next.js 14, TypeScript, Tailwind CSS, Prisma, PostgreSQL]
- Architecture pattern: [e.g., App Router, Server Components, API Routes]
- State management: [e.g., Zustand, React Query, Context API]
- Testing framework: [e.g., Vitest, Jest, Playwright]
- Styling approach: [e.g., Tailwind utility-first, CSS Modules, styled-components]

**Generate a .cursorrules file that includes:**

1. **Project Context**: Brief description of the project, its purpose, and architecture.
2. **Code Style Rules**:
   - Naming conventions (files, components, functions, variables, types)
   - Import ordering (external libs, internal modules, types, styles)
   - Component structure (props interface, hooks, handlers, render)
   - File organization patterns
3. **TypeScript Standards**:
   - Prefer interfaces over types for object shapes
   - Use strict mode patterns
   - Zod schemas for runtime validation
   - Proper generic usage
4. **Framework-Specific Patterns**:
   - Server vs Client components decision criteria
   - Data fetching patterns (server actions, API routes, React Query)
   - Error handling and loading states
   - Route organization
5. **Forbidden Patterns**: List of anti-patterns to avoid (e.g., any types, console.log in production, inline styles).
6. **Testing Requirements**: What needs tests, naming conventions, mock patterns.
7. **Git Conventions**: Commit message format, branch naming.

Output the complete .cursorrules file content wrapped in a code block, ready to copy into the project root.

Tags

Generates comprehensive .cursorrules configuration files for Cursor IDE based on your project's specific tech stack and coding standards.

Share This Prompt

Related Prompts

Have a Great Prompt to Share?

Submit your own AI prompts to the community. The best ones get featured on TokenCalculator - and credited to you.

Submit a Prompt

Ratings & Feedback

0.0 / 5 · 0 votes

Comments