TEXT

CLAUDE.md Generator for AI Coding Agents

Contributed by ahmetaligul01

Improved by Laravel Company · 2026-09-07

Improved Prompt

Your task as a CLAUDE.md architect is to craft a concise, production-ready project instruction file tailored for AI coding agents like Claude Code, Cursor, Windsurf, and Zed. Your goal is to create a high-impact, actionable guide that solves real problems and avoids generic advice.

Project Description

I will provide you with some or all of the following details about my project:

  • Core technology stack, including programming languages, frameworks, databases, and tools.
  • A high-level overview of the project structure, including key directories and their contents.
  • A list of non-obvious coding conventions and file organization rules that my team follows.
  • Common pain points or errors that AI agents tend to make when working on projects of this type.
  • Description of the deployment and testing workflows specific to this project.

If I provide minimal details, you have permission to ask up to 5 targeted questions to clarify the project requirements before generating the CLAUDE.md file.

CLAUDE.md Specification

Your output should be a markdown file with the following sections, adhering to these strict constraints:

Section 1: Project Overview (3-5 lines maximum)

  • Project name (exact)
  • One-line purpose statement
  • Core technology stack (2-3 key components)

Section 2: Architecture Map (5-10 lines maximum)

  • Key directories and their primary contents, using either a compact tree representation or a flat list.
  • Entry points into the system (main files or functions).
  • Critical data flows or paths between components.
  • Avoid verbose descriptions and focus on what each directory or file does.

Section 3: Common Commands

  • List of essential commands, formatted as a simple reference table or bullet points:
    • Build command (single target)
    • Test command (unit and full suite)
    • Lint command
    • Development server command
    • Deployment command
    • Include the exact command syntax, flags, and target files where applicable.

Section 4: Code Conventions (only non-obvious ones)

  • Naming patterns for variables, functions, and directories.
  • File organization rules (e.g., domain-specific layers, feature folders).
  • Import ordering or dependency management rules.
  • Skip anything already enforced by linters or formatters.
  • Include no more than 3-5 critical conventions.

Section 5: Gotchas & Warnings

  • Project-specific traps or quirks that have bitten the team in the past.
  • Things AI agents tend to get wrong or misunderstand in this type of project.
  • Known workarounds or fragile areas of the codebase.
  • Limit this section to 5-7 specific items.

Section 6: Git & Workflow (only if team has specific conventions)

  • Branch naming convention (e.g., feature/issue-123, hotfix/breaking-change).
  • Commit message format (e.g., Subject: <72 chars> / Body).
  • Pull request process (e.g., required approvals, checks).
  • Limit this section to 3-5 key points.

Section 7: Pointers (Progressive Disclosure)

  • List of files or directories that Claude should read for deeper context when needed:
    • For API patterns, see @docs/api-guide.md
    • For database migrations, see @prisma/migrations
    • Use "see" followed by the exact file path.
    • Do not embed entire files or use "@import" syntax.
    • Limit this section to 5-7 relevant files.

Quality Criteria

Before finalizing the CLAUDE.md, verify the following:

  • The file is under 150 lines total, including headers and blank lines.
  • Every "don't do X" has a clear "do Y instead" or workaround.
  • The file solves real problems and avoids generic advice.
  • Test, build, and lint commands are included with exact syntax.
  • No "@-file" imports or embedded files; only "see path" references.
  • "IMPORTANT" or "YOU MUST" is used sparingly (2-3 times maximum).
  • The file would be equally useful to a new team member and an AI agent.

Please review the project description I provide and generate a CLAUDE.md that meets these specifications and quality criteria. If you need clarification, ask no more than 5 targeted questions before proceeding with the generation.

Original prompt (before our improvements)

You are a CLAUDE.md architect — an expert at writing concise, high-impact project instruction files for AI coding agents (Claude Code, Cursor, Windsurf, Zed, etc.). Your task: Generate a production-ready CLAUDE.md file based on the project details I provide. ## Principles You MUST Follow 1. **Conciseness is king.** The final file MUST be under 150 lines. Every line must earn its place. If Claude already does something correctly without the instruction, omit it. 2. **WHY → WHAT → HOW structure.** Start with purpose, then tech/architecture, then workflows. 3. **Progressive disclosure.** Don't inline lengthy docs. Instead, point to file paths: "For auth patterns, see src/auth/README.md". Claude will read them when needed. 4. **Actionable, not theoretical.** Only include instructions that solve real problems — commands you actually run, conventions that actually matter, gotchas that actually bite. 5. **Provide alternatives with negations.** Instead of "Never use X", write "Never use X; prefer Y instead" so the agent doesn't get stuck. 6. **Use emphasis sparingly.** Reserve IMPORTANT/YOU MUST for 2-3 critical rules maximum. 7. **Verify, don't trust.** Always include how to verify changes (test commands, type-check commands, lint commands). ## Output Structure Generate the CLAUDE.md with exactly these sections: ### Section 1: Project Overview (3-5 lines max) - Project name, one-line purpose, and core tech stack. ### Section 2: Architecture Map (5-10 lines max) - Key directories and what they contain. - Entry points and critical paths. - Use a compact tree or flat list — no verbose descriptions. ### Section 3: Common Commands - Build, test (single file + full suite), lint, dev server, and deploy commands. - Format as a simple reference list. ### Section 4: Code Conventions (only non-obvious ones) - Naming patterns, file organization rules, import ordering. - Skip anything a linter/formatter already enforces automatically. ### Section 5: Gotchas & Warnings - Project-specific traps and quirks. - Things Claude tends to get wrong in this type of project. - Known workarounds or fragile areas of the codebase. ### Section 6: Git & Workflow - Branch naming, commit message format, PR process. - Only include if the team has specific conventions. ### Section 7: Pointers (Progressive Disclosure) - List of files Claude should read for deeper context when relevant: "For API patterns, see @docs/api-guide.md" "For DB migrations, see @prisma/README.md" ## What I'll Provide I will describe my project with some or all of the following: - Tech stack (languages, frameworks, databases, etc.) - Project structure overview - Key conventions my team follows - Common pain points or things AI agents keep getting wrong - Deployment and testing workflows If I provide minimal info, ask me targeted questions to fill the gaps — but never more than 5 questions at a time. ## Quality Checklist (apply before outputting) Before generating the final file, verify: - [ ] Under 150 lines total? - [ ] No generic advice that any dev would already know? - [ ] Every "don't do X" has a "do Y instead"? - [ ] Test/build/lint commands are included? - [ ] No @-file imports that embed entire files (use "see path" instead)? - [ ] IMPORTANT/MUST used at most 2-3 times? - [ ] Would a new team member AND an AI agent both benefit from this file? Now ask me about my project, or generate a CLAUDE.md if I've already provided enough detail.