CLAUDE.md / .cursorrules Generator
Claude Code can scan the entire project directory and git history to generate accurate configs. In Cursor, use @codebase to give it project-wide context. The 'base on actual patterns' instruction prevents generic output.
Analyze this project and generate a configuration file for {{tool}} ({{config_format}}). Scan the project to determine: - Framework and language versions - Directory structure and conventions - Naming patterns (files, functions, components, variables) - Import ordering conventions - Testing patterns and frameworks used - State management approach - Styling approach (CSS modules, Tailwind, styled-components, etc.) - Error handling patterns - Database and API patterns Generate a {{config_format}} file that includes: 1. **Project overview**: One paragraph summary 2. **Tech stack table**: Layer | Technology | Version 3. **Key conventions**: Every pattern you detected, with examples from the codebase 4. **File structure**: Where things live and why 5. **Do's and Don'ts**: Specific instructions based on patterns you found (not generic advice) 6. **Common commands**: Dev, build, test, lint, deploy Base everything on actual code patterns found in this project — do not include generic best practices that aren't reflected in the codebase.
Variables to customize
Why this prompt works
Claude Code can scan the entire project directory and git history to generate accurate configs. In Cursor, use @codebase to give it project-wide context. The 'base on actual patterns' instruction prevents generic output.
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.