Cursor & Windsurf Rules Generator (.cursorrules / .windsurfrules)
Generate a custom, context-rich project rules file that stops AI coding agents from making recurring mistakes.
Interactive Prompt Playground
{{TECH_STACK}}{{PROJECT_CONVENTIONS}}{{BANNED_PATTERNS}}You are an AI Coding Agent Architect and author of world-class `.cursorrules` / `.windsurfrules` system prompts. Generate a comprehensive project constitution rules file for our repository: Tech Stack & Architecture: ``` Next.js 15 (App Router), TypeScript strict, Tailwind CSS, Lucide React, Zustand ``` Key Project Conventions & Directories: ``` Directory structure: - app/ -> Next.js App Router pages and layouts - components/ -> Reusable UI components - lib/ -> Pure utility functions and API clients - store/ -> Zustand stores All UI components must support dark mode and use CSS design tokens. ``` Recurring AI Hallucinations / Mistakes to Ban: ``` - NEVER use 'any' in TypeScript - NEVER use useEffect for data fetching that can be done in Server Components - NEVER install external libraries without explicit permission - NEVER use inline styles or raw color codes (use theme tokens) ``` Generate a clean, structured `.cursorrules` markdown configuration containing: 1. **Role & Operating Identity**: Clear persona and code style philosophy. 2. **Strict Code & Tech Stack Guidelines**: - Language rules (Strict TypeScript, no `any`, explicit return types). - Component & UI rules (Tailwind, Lucide icons, naming conventions). - State & data fetching rules (RSC, Server Actions, error handling). 3. **Banned Patterns & Anti-Rules (DO NOT DO)**: - Explicit negative constraints preventing recurring mistakes. 4. **File & Directory Anatomy**: - Where new components, utils, and tests must be placed. 5. **Git & Commit Formatting**: - Conventional commit message format. Output the complete, ready-to-save `.cursorrules` file.
How to Use This Prompt
- Fill in your tech stack, folder conventions, and banned anti-patterns.
- Save the generated output as `.cursorrules` or `.windsurfrules` in your project root.
Engineering Tips & Best Practices
- Keep rules concise and grouped by task domain; overly long rule files cause models to ignore lower sections.
What This Prompt Inspects
Key failure modes, design principles, and quality standards evaluated during execution.
Explicit Negative Constraints
Blocks recurring AI mistakes by specifying what NOT to do.
Directory Map
Enforces consistent file placement across the codebase.
Type-Level Discipline
Mandates strict TypeScript boundaries and banned keyword filters.
SprintKit Workflow Integrations
Complementary interactive tools and workflows across SprintKit to accelerate your engineering process.
Related Prompts
Explore related developer prompts in this workflow domain.
Autonomous Coding Agent Implementation Plan Generator
Instruct coding agents (Cursor, Claude Code, Cline) to generate actionable multi-step implementation plans before touching code.
Test-Driven Development (TDD) Agent Loop Prompt
Force AI coding agents to follow the Red-Green-Refactor cycle: write failing tests first, then write minimal code to pass.
Multi-File Codebase Exploration & Architectural Onboarding
Prompt an agent to analyze an unfamiliar codebase and deliver an architectural breakdown, data flows, and gotchas.