# 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 is 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](https://xiry.app/topics/development.md)
- 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, 31 May 2025](https://x.com/kevinkern/status/1928887270968361461): Copy-paste template to generate version-aware, framework-specific Cursor rules with a fixed output layout.

## Related

- [TAME Cursor Rules for Claude 3.7 Sonnet](https://xiry.app/resources/tame-cursor-rules-for-claude-3-7-sonnet): Cursor rules to keep Claude 3.7 Sonnet focused and non-destructive (Prompt, Free)
- [8-Step Cursor Beginner Workflow](https://xiry.app/resources/8-step-cursor-beginner-workflow): Practical eight-step setup and workflow guide for building MVPs with Cursor (Tip, Free)
- [Cursor Agent Best Practices](https://xiry.app/resources/cursor-agent-best-practices): Practical rules and workflows for getting reliable code from Cursor agents (Tip, Free)
- [Most Obvious Thing to Improve Prompt](https://xiry.app/resources/most-obvious-thing-to-improve-prompt): A single-line prompt for iterative code refactoring with AI (Prompt, Free)
- [The Coding Agent Harness](https://xiry.app/resources/the-coding-agent-harness): Context engineering framework for making AI coding agents reliable at scale (Framework, Free)
- [Skills.sh](https://xiry.app/resources/skills-sh): Open directory and CLI for discovering and installing AI agent skills (Web app, Free)

Updated 11 October 2026. Page: https://xiry.app/resources/cursor-rule-generator-prompt-template

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
