Rules File Writer
This is the meta-prompt — it generates the configuration that makes all other prompts work better. Cursor creates .cursorrules; Windsurf creates .windsurfrules. The 'evidence-based' instruction prevents generic boilerplate rules.
Analyze this project and write a {{rules_format}} file ({{file_name}}). Scan the project and detect: 1. **Language & framework**: Versions, key dependencies 2. **Code style**: Indentation, quotes, semicolons, trailing commas (check .eslintrc, .prettierrc, or infer from code) 3. **Naming conventions**: Files (kebab-case, PascalCase?), functions, components, constants, types 4. **Import patterns**: Ordering, path aliases, barrel exports 5. **Component patterns**: Functional vs class, prop drilling vs context, state management library 6. **Testing patterns**: Framework, file naming (*.test.ts vs *.spec.ts), assertion style 7. **Project structure**: Where things live and the rationale Write the rules file with: - Project overview section - Tech stack summary - Specific do's and don'ts based on actual patterns found - File structure guide - Common commands (dev, build, test, lint, deploy) - Example code snippets showing the "right way" for this project Make every rule specific and evidence-based. Instead of "use descriptive names," say "use camelCase for functions, PascalCase for components, SCREAMING_SNAKE for constants" — based on what you actually found in the code.
Variables to customize
Why this prompt works
This is the meta-prompt — it generates the configuration that makes all other prompts work better. Cursor creates .cursorrules; Windsurf creates .windsurfrules. The 'evidence-based' instruction prevents generic boilerplate rules.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Get thorough code reviews with actionable feedback tailored to your language, framework, and standards.
Context-Aware Code CompletionProviding the surrounding code and project context lets the model match existing patterns exactly. The constraint against modifying existing code prevents unwanted side effects.
Inline Code SuggestionConstraining suggestions to match existing style and scope produces insertions that feel native to the codebase. The 'no explanation' rule mimics real inline completion behavior.
Code ExplanationThe audience level parameter adjusts complexity automatically. Requiring a usage example ensures the explanation is practical, not just theoretical.