.cursorrules Optimization
The 50-line limit and 'no generic advice' constraint produces focused rules files. Listing the full stack upfront gives Cursor the context to generate stack-specific patterns.
Generate a .cursorrules file for my project: Tech stack: {{tech_stack}} Framework: {{framework}} (version {{version}}) Language: {{language}} Testing: {{test_framework}} Styling: {{styling_approach}} The rules file should include: 1. Project context (stack, structure, key directories) 2. Code style rules (naming, imports, file organization) 3. Framework-specific patterns (e.g., prefer server components, use App Router) 4. Error handling conventions 5. What NOT to do (common anti-patterns for this stack) Keep it under 50 lines. Every rule should be specific and actionable — no generic advice like "write clean code".
Variables to customize
Why this prompt works
The 50-line limit and 'no generic advice' constraint produces focused rules files. Listing the full stack upfront gives Cursor the context to generate stack-specific patterns.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.