ES · Leer en español Explore for free

Template · Basic · 5 min

Free CLAUDE.md and AGENTS.md generator for Claude Code

Fill in a form and download a CLAUDE.md, an AGENTS.md or both, with live warnings for vague rules, pasted keys and badly written imports.

Cover: Free CLAUDE.md and AGENTS.md generator for Claude Code

Tested with Claude Code 2.1.316 · reviewed

See the files on GitHub Free · MIT license

Try it here

It runs in your browser: nothing is sent to any server.

Project
Commands (copy them exactly as you run them)
Rules (one per line)
Output

    
    

    What's included

    The tool is above: you fill in your project's name, stack, commands, rules and gotchas, and it generates a CLAUDE.md, an AGENTS.md or both (a shared AGENTS.md + a CLAUDE.md that imports it with @AGENTS.md). As you type, it checks for what the official documentation advises against, and at the end you download the files. It works offline, without sign-up and without sending anything: everything happens in your browser. The generated text is in Spanish; the English version in the repository's en/ folder generates it in English.

    The code (a single JavaScript file with no dependencies, an example index.html and its Node tests) is in the free repository ctrlia-generador-claude-md.

    What it generates and why with those rules

    The official documentation says Claude treats CLAUDE.md as context, not as mandatory configuration, and gives three rules the tool applies: concrete, verifiable instructions ("use 2 spaces", "run npm test before committing"), fewer than 200 lines per file and nothing contradictory. That is why the form does not ask for the folder tree or the dependency list (Claude reads them from the code), and does ask for what you cannot see: how to check the work, hidden conventions, paths it must not touch and known gotchas. The output is organized in sections with headings and bullets, as the documentation recommends.

    It fits with the CLAUDE.md that works recipe: the recipe explains the why and the levels (user, project, local, path rules); the generator produces the project file.

    Form fields

    AGENTS.md logic (verified in the documentation)

    Since 2.1.277, with the default value of /config → Project instructions (claude-md-or-agents-md), Claude Code reads AGENTS.md only if there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the working directory or above it; ~/.claude/CLAUDE.md and .claude/rules/ do not count. If both exist, CLAUDE.md wins.

    That is why the "both" option generates a CLAUDE.md whose first line is @AGENTS.md, followed by a "Claude Code" section with the specific bits: it is the official "Share one file with other coding tools" pattern, it does not read AGENTS.md twice and it also works in sessions where direct reading is not available. We do not suggest the symlink ln -s AGENTS.md CLAUDE.md by default: the documentation warns that on Windows Git turns it into a one-line text file and that the Edit and Write tools do not write through the link. Inside AGENTS.md, Claude Code expands @imports, but other tools may not, and the tool warns you about it.

    Checks

    Errors (they block the download):

    Warnings (they do not block):

    Backticks in commands are stripped so they do not break the formatting. The preview uses textContent, so nothing you type is interpreted as HTML.

    Privacy and accessibility

    The page has no inline scripts and no external origins: a single script served from ctrlia.dev, with no fetch, no storage and no analytics of its own. The download uses a Blob and a temporary link with the download attribute, revoked after one second; there is no server receiving the text. Every field has its label, groups are in a fieldset with a legend, the warning list has aria-live="polite" for screen readers and the preview is keyboard-focusable. The logic (generate and validate) is separate from the interface so it can be tested with Node.

    How to use it

    1. Fill in what Claude cannot see in the code

    Start with the command for all tests and for a single test: it is the most useful part of the file. Then the conventions that cannot be deduced from the code, the paths it must not touch without asking and the known gotchas. Leave out the folder tree and the dependencies.

    2. Choose the output

    If you only use Claude Code, "CLAUDE.md only". If the repository is also used by Codex, Cursor or other agents, "AGENTS.md + CLAUDE.md that imports it", and put what is Claude-only in the "Claude Code only" field.

    3. Fix the warnings and download

    Errors block the download; warnings do not, but read them: a vague rule is useless and a no-exceptions prohibition works better in permissions or in a hook. Download the file and save it at the root of the repository.

    4. Check that Claude Code loads it

    Open Claude Code in that folder and run /context: CLAUDE.md should appear under Memory files (if you only use AGENTS.md you will see the line "no CLAUDE.md found; AGENTS.md loaded: …"). Ask a question that depends on the file, for example "how do I run a single test?", and check that it answers with your command.

    /context
    /doctor prompt-audit

    /doctor prompt-audit (2.1.283 or later) makes Claude look for contradictory instructions or ones that point to files that do not exist.

    5. Keep it short

    Over time, add only what you have already had to correct twice, move long procedures into skills (the your first skill recipe) and prohibitions into permissions or hooks. If your file grows past 200 lines, split it by path with .claude/rules/. And if you also want to review your settings.json, use the settings checker.

    The files

    Real output from the repository's English version (en/generator.js) with the "AGENTS.md + CLAUDE.md that imports it" option for a FastAPI project (the tool on this page generates the text in Spanish). AGENTS.md:

    # Project: orders-api (Python 3.12 + FastAPI)
    
    REST API for orders.
    
    ## Commands
    - Install: `uv sync`
    - Dev server: `uv run fastapi dev app/main.py`
    - All tests: `uv run pytest -q`
    - Single test: `uv run pytest tests/test_x.py -q`
    - Lint: `uv run ruff check .`
    - Types: `uv run mypy app`
    
    ## Definition of done
    - Passes `uv run pytest -q` with no errors.
    
    ## Conventions (what you can't see in the code)
    - 4-space indentation
    - SQL queries go in app/repos/, never in the endpoints
    - Detailed style: @docs/style.md
    
    ## Do not touch
    - `migrations/` (ask before changing it)
    - `.github/workflows/` (ask before changing it)
    
    ## Known gotchas
    - Integration tests need Postgres: docker compose up -d db
    
    ## Git
    - Branches: feat/… or fix/…
    - Commits: in English, imperative mood
    
    ## Language
    - Reply and write comments in English.

    And the CLAUDE.md that imports it:

    @AGENTS.md
    
    ## Claude Code
    - Use plan mode for changes in app/payments/

    With that data the tool shows two warnings: the line with "never" would work better as a permission rule or a hook, and the @docs/style.md inside AGENTS.md is expanded by Claude Code, but other tools may read it as plain text.

    The repository has all the tool's files:

    FileWhat it is
    en/generator.jsLogic (generate, validate) and interface, no dependencies and no inline code
    en/index.htmlExample page with the form, loading generator.js with <script src>
    en/tests.jsNode checks
    en/example/The data for the example above and the two files it generates

    The Spanish originals (generador.js, pruebas.js, ejemplo/…) are at the repository root.

    To try it on your machine:

    git clone https://github.com/carlosp5751258-lgtm/ctrlia-generador-claude-md
    cd ctrlia-generador-claude-md/en
    node tests.js          # → ok: generator … ok: example

    Then open en/index.html in your browser. Sources: Claude Code memory, commands and the CHANGELOG.

    FAQ

    CLAUDE.md or AGENTS.md?

    If you only use Claude Code, CLAUDE.md. If the repository is also used by Codex, Cursor or other agents, a shared AGENTS.md and a CLAUDE.md with @AGENTS.md for the Claude-specific bits. Since 2.1.277 Claude Code reads AGENTS.md only when there is no CLAUDE.md.

    Is my information sent anywhere?

    No. The file is generated in your browser by a script from ctrlia.dev and downloaded directly; the page makes no requests with what you type.

    How many lines should it have?

    The official documentation recommends fewer than 200 per file; the tool warns you if you go over. Whatever only matters in one folder goes into path rules in .claude/rules/.

    Why does it warn me about "nunca" (never) in a rule?

    Because CLAUDE.md is context, not a guarantee. Anything without exceptions (do not read .env, do not push --force) is always enforced with permission deny rules or a hook.

    Can I use a symlink instead of @AGENTS.md?

    It works if nobody uses Windows; the documentation warns that Git on Windows turns it into a one-line file and that Claude does not edit through the link. The @AGENTS.md import has none of those problems.

    I have a CLAUDE.local.md and Claude no longer reads my AGENTS.md. Why?

    That is the documented behavior: CLAUDE.local.md counts as a CLAUDE.md. Put @AGENTS.md in a CLAUDE.md or change /config → Project instructions to claude-md-and-agents-md.

    The whole library