// 30 tips tagged "claude-md"
When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.
Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.
You're not limited to a single CLAUDE.md at the project root. Drop additional CLAUDE.md files into subdirectories to give Claude module-specific context — different conventions for the frontend vs backend, special rules for a legacy module, or testing guidelines that only apply to one package.
Instead of writing a CLAUDE.md from scratch, run /init and let Claude analyze your project — it reads your directory structure, package files, config, and conventions, then generates a tailored CLAUDE.md with the right commands, architecture notes, and coding standards already filled in.
The biggest productivity gains come from combining Claude Code features — CLAUDE.md sets the rules, custom commands automate prompts, hooks enforce standards, memory persists context, and plan mode + fast mode let you shift gears. Together, they make Claude Code better every day you use it.
Put example prompts for common tasks directly in your CLAUDE.md — "to add a new API endpoint, say X" — so every developer on the team gets the same quality results without each person figuring out the best way to phrase requests from scratch.
Drop a CLAUDE.md into any subdirectory and its rules only apply when Claude is working in that part of the codebase — different coding standards for the API vs the frontend, stricter rules for the payments module, or special instructions for generated code.
Instead of writing CLAUDE.md from scratch, run /init and let Claude read your project structure, dependencies, and conventions to generate a starter file — pre-filled with the right commands, patterns, and rules for your specific stack.
Define your project's domain terms in CLAUDE.md — what a "tenant" means vs a "user", what "settlement" refers to in your billing system — so Claude uses the correct vocabulary in code, variable names, comments, and explanations every time.
Use separate CLAUDE.md files or conditional sections so Claude follows different rules depending on the context — strict and non-destructive in CI, verbose in development, focused on code quality during reviews — all from the same project.
Add a short persona description to your CLAUDE.md to control how Claude communicates — terse one-liners vs detailed explanations, formal vs casual tone, or domain-specific vocabulary — so every response matches how your team actually talks.
Your CLAUDE.md grows organically and accumulates contradictions, outdated rules, and missing context over time. Ask Claude to audit it against your actual codebase — it flags rules that don't match reality and suggests what's missing.