Development · Prompt
Cursor Rule Generator Prompt Template
Prompt template for generating framework-specific Cursor rules files in .mdc format
This prompt template guides an LLM to research current best practices and produce tailored Cursor rule files (.mdc) for any specified framework. It enforces structured frontmatter and clear guidelines while pruning redundant advice.
The prompt
Prompt text (replace {{FRAMEWORK}} and insert latest <date>):
"you are prompt engineer. you are creating rules the {{FRAMEWORK}} framework
# STEPS:
1. research for latest <date> best practices, rules, coding guidelines for the framework {{FRAMEWORK}} for latest <date>
2. create a rule in markdown format
3. It must always follow the <prompt_layout>
# MUST FOLLOW RULES:
- NEVER ADD wrap double ticks around description or globs
- use full sentences and avoid ":"
- if possible always prefer the typescript variant instead of js when using the framework
- AVOID redundant rules
- AVOID common webdesign and web development rules. only framework & library specific rules
- AVOID rules that are well known and obvious (LLMS already know these rules)
- YOU HAVE TO ADD RULES that extremely important for the current framework version.
# FORMAT:
1. remove all bold ** markdown asterisk. not needed
2. remove the "#" h1 heading
<prompt_layout>
Filename: add-{{INSERT_FILENAME}}.mdc
---
description: {{framework+version}}
globs: {{add here file globs like "**/*.tsx,**/*.jsx"}}
alwaysApply: {{if this rule should be globally applied or not true|false}}
---
You are an expert in {{add here framework, typescript, libraries}}. You are focusing on producing clear, readable code.
You always use the latest stable versions of {{framework+version}} and you are familiar with the latest features and best practices.
# Project Structure
- {{add here best practice prompt structure}}
# Code Style
- {{add here coding style}}
# Usage
- {{add here best practice prompt structure}}
- {{add here more best practice headers + lists which are absolute important}}
</prompt_layout>"
Author's caveat: use generated rules only as a base and adapt them; wrong rules can mess up code generation.
What it's for
- Generate tailored Cursor .mdc configuration files for specific web frameworks
- Update AI coding guidelines to align with recent framework updates and best practices
- Standardize code style and project structure instructions across development teams
Key points
- Predefined frontmatter layout supporting description, globs, and application flags
- Framework version-specific research instruction to avoid outdated syntax
- Constraints against redundant or overly generic web development rules
- Enforced preference for TypeScript standards over JavaScript
- Formatted markdown output tailored directly for Cursor rules configuration
Pricing
Free
Details
- Type
- Prompt
- Category
- Development
- Topic
- Developer Prompts
- Open source
- No
- Platforms
- Web, other
- For
- Developers using Cursor IDE who want automated framework guidelines
- Tags
- cursor, prompts, developer tools, ai coding, coding standards
Why it was saved
- @kevinkern: Copy-paste template to generate version-aware, framework-specific Cursor rules with a fixed output layout.
Related
Cursor rules to keep Claude 3.7 Sonnet focused and non-destructive
Practical eight-step setup and workflow guide for building MVPs with Cursor
Practical rules and workflows for getting reliable code from Cursor agents
A single-line prompt for iterative code refactoring with AI
Context engineering framework for making AI coding agents reliable at scale
Open directory and CLI for discovering and installing AI agent skills
Updated