With how many AI tools there are now, it isn't very easy to impress me. But if a tool has impressed me enough to open my terminal every day (something I once used to be terrified of), you know it's something worth talking about. Despite not being a developer professionally, Claude Code is a tool that falls into that category exactly. I know I'm not the only one. Claude Code's been all over, and it's for good reason.
But no matter how long you've been using a tool, there are bound to be some features you haven't explored just yet. And with how quickly Anthropic is adding new features to its products, the list of things you might be missing is only getting longer with each passing day. Ironically though, the one feature that completely changed how I use the tool wasn't some new flashy addition. Instead, it was one of the most basic things you can set up within it.
Setting up a CLAUDE.md file is the most basic (yet most impactful) thing you can do
One file to rule them all
When you begin a new project within Claude Code, there's no big setup wizard walking you through configuration. You open your terminal, head to the relevant directory, type the magic word claude, and that's it. You can then begin prompting the tool to build whatever you want, and it'll get to work right away. While you might come across features like Claude Skills and the ability to connect it to all the other tools you use through MCP servers as you code, there's one much simpler feature you should be configuring before you even begin prompting: a CLAUDE.md file. This, as suggested by the file extension, is nothing but a good old markdown file.
However, what makes it special is that Claude reads it at the start of every single session. This means that the contents of that file becomes persistent context that shapes how the tool works for you! The best part about the CLAUDE.md file is that it can be scoped to a specific project, your personal workflow across all projects, or even your entire organization. This means that you can tweak Claude Code's behavior at whatever level makes sense for you. Given that my day-to-day doesn't involve coding and I use Claude Code for personal projects, separate CLAUDE.md files for each project have been the sweet spot for me.
So, what should you include in your CLAUDE.md file?
Write it once, never repeat yourself again
Unlike Claude Code's auto memory, which is written by Claude itself based on learnings and patterns it picks up as you continue using it, CLAUDE.md files are designed to give you the control over exactly what context Claude walks into every session with. For instance, if you notice that Claude keeps using a framework that you don't want it to, or formats its code in a way that doesn't really match your preference, you can add that as a rule in your CLAUDE.md file. This way, instead of repeating yourself every session and telling it to stop doing something, you write it once and Claude follows it from that point on. Anthropic's own support documentation states that you should treat the CLAUDE.md file as the place where you write down what you'd otherwise re-explain.
Some excellent examples they've included are when Claude repeats a mistake twice, a code review catches something Claude should have known about the codebase, you type the same correction or clarification that you typed during your last session, and most interestingly, context a new teammate would need to be productive.
The way you structure your CLAUDE.md file is extremely important too. Remember, the tool reads it at the beginning of each session. Just like any task AI does, it consumes tokens. So, a bloated, messy file means you're wasting context on things that don't matter. Anthropic recommends keeping the markdown file under 200 lines and making your rules specific enough to verify. So, "always use the Claude in Chrome extension" will always work way better than "test your code at the end of each session." The more specific you are, the better.
Another tip Anthropic gives is using markdown headers and bullets to group related instructions. The AI lab mentions that Claude scans structure the same way a reader would, so organized sections with clear headings are going to get you much better results than a wall of unformatted text. It's also important to ensure your rules in the CLAUDE.md file don't contradict each other. If that's the case, Claude might pick one arbitrarily (meaning it might very well not be the one you wanted).
I use Claude Code a lot to actually learn programming and the fundamentals better, which means having clear comments in the code really helps. But the way Claude adds comments by default is somewhat vague and generic. They don't really help you understand what's going on, especially when you're learning. Initially, I'd just instruct Claude after it had generated all the code to add relevant comments. I then realized I was wasting time as well as tokens, so I added a simple rule to my CLAUDE.md telling it to always write comments that explain the reasoning behind the code.
I instructed it specifically to explain why something is being done, rather than just what the code is doing. Now, every file it generates comes with useful context baked in from the start. This is just one very simple example of how a CLAUDE.md file can save you the hassle of repeating yourself, but the possibilities go way beyond that.
Claude can generate a CLAUDE.md file for you too
Yes, you can make the AI do it for you
Now, I know I just mentioned that CLAUDE.md files are meant to be written by you, but that doesn't really mean you have to start from a blank page. Claude Code has a /init command that analyzes your codebase and generates a starting CLAUDE.md for you automatically. It picks up on build commands, test instructions, and project conventions it finds in your code. So, if you already have a codebase you're working on and it doesn't have a CLAUDE.md file, run the /init command right away! It might not be perfect right off the bat, but it'll give you a solid foundation to refine from there.
The way I've been setting up my CLAUDE.md files is slightly different, though. When I set up my note-taking system in Claude Code, I didn't write the CLAUDE.md file myself at all. Instead, I gave Claude an example of notes I had taken during my last semester and asked it to pick up on my patterns — how I structure things, what formatting I use, how I organize information. It used those patterns to build out the entire CLAUDE.md file for me. The result was a system that already knew how I liked things done before I even started using it.
Trust me, it makes a bigger difference than you think
The crux of it is that the CLAUDE.md file is something Claude Code reads at the beginning of every session, and how you get it there is entirely up to you. Write it yourself, let /init generate one, or feed Claude your existing work and let it figure out your preferences. Whatever gets you to a file that makes Claude work the way you want it to. That said, it can genuinely make or break your Claude Code experience, and I realized that far too late.
