TutorialesTutorials · PrincipianteBeginner

CLAUDE.md: enséñale a Claude a trabajar como tú quieresCLAUDE.md: teach Claude to work the way you want

Un archivo CLAUDE.md le da contexto y reglas a Claude Code en cada proyecto. Aprende qué poner, dónde va y por qué te ahorra repetir lo mismo una y otra vez.A CLAUDE.md file gives Claude Code context and rules in every project. Learn what to put in it, where it goes and why it saves you repeating yourself.

  • Claude Code

CLAUDE.md es un archivo de texto donde le dejas a Claude Code las reglas e información de tu proyecto. Claude lo lee solo al empezar, así no tienes que repetir lo mismo en cada conversación. Toca cada bloque para abrirlo.

CLAUDE.md is a text file where you leave Claude Code your project’s rules and information. Claude reads it automatically at the start, so you don’t have to repeat yourself in every conversation. Tap each block to open it.

¿Para qué sirve?What is it for?

Imagina contratar a alguien y tener que explicarle TODO cada mañana. Cansado, ¿no? CLAUDE.md es ese “manual” que Claude lee una vez y recuerda: cómo es tu proyecto, qué herramientas usas, tu estilo, y lo que NO debe hacer.

Imagine hiring someone and having to explain EVERYTHING every morning. Exhausting, right? CLAUDE.md is that “handbook” Claude reads once and remembers: what your project is, which tools you use, your style, and what it should NOT do.

1 CréaloCreate it

La forma más fácil: en Claude Code escribe el comando /init y él crea un CLAUDE.md analizando tu proyecto. O créalo a mano: un archivo llamado CLAUDE.md en la carpeta principal del proyecto.

Easiest way: in Claude Code type the command /init and it creates a CLAUDE.md by analyzing your project. Or create it by hand: a file named CLAUDE.md in your project’s main folder.

2 Qué poner adentroWhat to put inside

Escríbelo en lenguaje normal, en puntos. Por ejemplo:

# Mi proyecto
- Es una página web personal hecha con Astro.
- Idioma del sitio: español primero, inglés después.

## Cómo trabajar
- Explícame los cambios en palabras simples antes de hacerlos.
- Haz commit y push cuando termine algo.

## Reglas
- No subas contraseñas ni llaves al repo.
- No instales librerías nuevas sin avisarme.

Write it in plain language, as bullet points. For example:

# My project
- It's a personal website built with Astro.
- Site language: Spanish first, English second.

## How to work
- Explain changes in simple words before making them.
- Commit and push when something is done.

## Rules
- Never push passwords or keys to the repo.
- Don't install new libraries without asking me.
3 Manténlo vivoKeep it alive

Cuando notes que le repites algo a Claude (“acuérdate de…”), agrégalo al CLAUDE.md. Con el tiempo se vuelve la memoria de tu proyecto y Claude trabaja cada vez más a tu manera.

Whenever you notice you’re repeating something to Claude (“remember to…”), add it to CLAUDE.md. Over time it becomes your project’s memory and Claude works more and more your way.

Consejos rápidosQuick tips
  • Corto y claro gana a largo y vago.
  • Escribe reglas, no novelas: puntos cortos.
  • Súbelo a GitHub: así viaja con tu proyecto.
  • ¿Algo aplica a TODOS tus proyectos? Ponlo en el CLAUDE.md de tu carpeta personal (global).
  • Short and clear beats long and vague.
  • Write rules, not essays: short bullets.
  • Commit it to GitHub: that way it travels with your project.
  • Something applies to ALL your projects? Put it in the CLAUDE.md in your home folder (global).