CLAUDE.md Generator for Claude Code

CLAUDE.md is the instructions file Claude Code reads at the start of every session: your build and test commands, your conventions, and the rules you’d otherwise repeat in every chat. This free CLAUDE.md generator asks about your stack, commands and guardrails and writes a lean file that follows Claude Code’s official memory guidance, with a length check and the right place to save it.

It runs in your browser. Nothing you type is sent anywhere, and the download is made on your own computer.

Free generator

Write a lean CLAUDE.md for your project

Answer a few questions about your codebase: the stack, the commands, the rules. You get a clean CLAUDE.md that follows Claude Code's official memory guidance, with a length check and the right place to save it. Copy it or download the file.

The project

Languages

Only what Claude couldn't guess from a quick look.

Commands

Fill in the ones you use. The examples change with your first language.

Layout and style

List the non-obvious places. Skip what folder names already say.

Code style

Workflow and guardrails

Workflow

Guardrails

Save it as

Checks

    Unlock the advanced presets: hooks, subagents and permissions

    Get a matching .claude/settings.json (permission rules from your commands, a .env lock and an auto-format hook), a code-reviewer subagent and a path-scoped testing rule, all built from your answers.

    Free. You also get the HOW TO // AI newsletter once a week. Unsubscribe any time.

    Next: install Claude Code, build a structured Claude prompt or set up a Claude API key.

    Sources: Claude Code docs on CLAUDE.md and memory, permissions, settings, hooks and subagents, checked October 18, 2026. Token counts are estimates. Everything runs in your browser; nothing you type is sent anywhere.

    How to use the CLAUDE.md generator

    1. Pick an example to see a finished file, or start blank.
    2. Choose your languages and fill in the commands you actually run.
    3. Add the parts Claude can’t see for itself: where things live, style rules, guardrails and gotchas.
    4. Choose where to save it, then copy it or download the file.
    5. In Claude Code, run /context and check that it’s listed under Memory files.

    What is CLAUDE.md?

    Every Claude Code session starts with a fresh context window. CLAUDE.md files carry knowledge across sessions: Claude Code loads them at the start of every conversation and reads them as instructions. Anthropic’s docs describe the right content as the things you’d otherwise re-explain, such as build commands, conventions, project layout and “always do X” rules.

    One thing to know up front: Claude treats CLAUDE.md as context, not enforced configuration. It reads the file and tries to follow it, and the more specific and concise your instructions are, the more consistently it does.

    Where to put your CLAUDE.md

    FileWho it applies toUse it for
    ./CLAUDE.md or ./.claude/CLAUDE.mdEveryone on the project, shared through gitBuild and test commands, conventions, project layout
    ./CLAUDE.local.mdJust you, in this project (add it to .gitignore)Your sandbox URLs, preferred test data
    ~/.claude/CLAUDE.mdJust you, in every projectPersonal style and tooling preferences
    Managed policy fileEveryone in your organizationCompany standards set by IT or DevOps

    Claude Code loads CLAUDE.md files from the folder you start it in and every folder above it, and picks up CLAUDE.md files in subfolders when it works on files there. All of them are combined, not overridden, so avoid rules that contradict each other.

    What to put in CLAUDE.md, and what to leave out

    • Add to it when Claude repeats a mistake. The docs’ triggers: Claude makes the same mistake twice, a code review catches something Claude should have known, or you type the same correction you typed last session.
    • Make every rule checkable. “Use 2-space indentation” instead of “Format code properly”, and “API handlers live in src/api/handlers/” instead of “Keep files organized”.
    • Stay under 200 lines. Longer files use more context and get followed less. Move rules that only matter for some files into .claude/rules/ with a paths setting, and multi-step procedures into skills.
    • Skip what Claude can see. Claude Code’s /doctor checkup trims directory layouts, dependency lists and architecture overviews Claude can work out from the code, and keeps pitfalls, reasons and conventions.
    • Use headings and bullets. Organized sections are easier for Claude to follow than dense paragraphs.

    CLAUDE.md vs rules, permissions and hooks

    ToolWhat it doesEnforced?
    CLAUDE.mdInstructions Claude reads every sessionNo: guidance Claude tries to follow
    .claude/rules/ filesInstructions that can load only for matching filesNo: guidance
    Permission rules in .claude/settings.jsonAllow, ask about or deny specific tools and commandsYes, by Claude Code
    HooksShell commands that run at fixed points, such as after every editYes, they always run

    If a step must happen every time, like formatting after each edit, write it as a hook. If Claude must never touch something, like your .env file, add a deny rule. The generator’s advanced presets build both from your answers.

    Related on HOW TO // AI

    Checked against Claude Code’s documentation on memory, permissions, settings, hooks and subagents on October 18, 2026.

    Frequently asked questions

    What is CLAUDE.md?

    A Markdown file of instructions that Claude Code reads at the start of every session. It holds what you'd otherwise re-explain, such as build and test commands, coding conventions and project layout.

    Where should I put my CLAUDE.md file?

    For a project, in the repository root as CLAUDE.md or in .claude/CLAUDE.md, committed so your team shares it. Personal preferences for every project go in ~/.claude/CLAUDE.md, and personal notes for one project go in CLAUDE.local.md, which you add to .gitignore.

    How long should a CLAUDE.md be?

    Claude Code's docs say to aim for under 200 lines per file. Longer files use more context and Claude follows them less reliably, and Claude Code skips a file over 4 MiB.

    Does Claude Code read AGENTS.md?

    Yes, from version 2.1.277. It reads AGENTS.md when there is no CLAUDE.md or CLAUDE.local.md in your working directory or above it. If both exist, it reads CLAUDE.md unless you change the setting or import AGENTS.md from your CLAUDE.md.

    Should I use /init or write CLAUDE.md myself?

    Both work well together. Running /init has Claude analyze your codebase and draft a starting file; then add what Claude can't discover on its own, such as team rules and gotchas, which is what this generator helps with.

    Scroll to Top