Change is something that's always terrified me. But of course, it's inevitable and there's no running from it. While what I said certainly applies more on a personal level, it maps surprisingly well onto how I use apps daily. Once I get comfortable with the way I use a tool, I have a bad habit of refusing to question whether my way is any good.
That said, I've been trying to change this habit of mine, and my Claude Code setup has probably seen the most improvement because of it. I've spent the past few months digging through Reddit threads, and even stealing some tips from Claude Code's creator. But the one change that made the biggest difference, and the one I put off the longest, was ridiculously simple: I started using CLAUDE.md files. And if you're still ignoring this file, trust me when I say this: please, please stop ignoring it.
Want to stay in the loop with the latest in AI? The XDA AI Insider newsletter drops weekly with deep dives, tool recommendations, and hands-on coverage you won't find anywhere else on the site. Subscribe by modifying your newsletter preferences!
A CLAUDE.md files is the best way to give your project persistent memory
No more "as I mentioned earlier"
By now, you're likely familiar with the benefits of an AI tool storing context about you and your projects. You tell it something once, like your stack, your preferences, your weird folder structure, and it remembers. It saves you the hassle of repeating yourself over and over again, and pretty much every AI tool you use has some version of this. A CLAUDE.md file is basically how Claude Code does it, but the way it works is fundamentally different.
Rather than a memory system that works dynamically behind the scenes, this is simply a markdown file that sits in your project root. Unlike the rest of the memory features where the LLM intelligently picks up your patterns and preferences passively behind the scenes, a CLAUDE.md file is designed to primarily be written by you. You basically write a file that says: here's how this specific project works, here's how I want you to behave, here's what you should avoid, and so on.
Claude Code loads this markdown file at the start of every session, meaning it already has all the context about your project and rules it needs to follow before it even starts working.
CLAUDE.md files work on a per-project basis
Your app project doesn't need to know about your homework
An important distinction I want to highlight here is that CLAUDE.md files are typically used on a project-to-project basis. For instance, the memory feature you'll find within regular Claude chat is designed to learn about you as a person, and it carries that context across every conversation you have.
A CLAUDE.md file is scoped to a specific project. The rules you write for your e-commerce app have nothing to do with a project you're working on for your programming class, and they shouldn't. Each project gets its own file with its own instructions, and Claude Code only loads the one that's relevant to whatever directory you're working in.
That said, there's also a global CLAUDE.md file that applies across all your projects. The global file is meant for personal preferences like your coding style or communication preferences, and they exist more so as a complement and sit underneath whatever project-specific rules take priority.
How you structure your CLAUDE.md file matters
A bloated file is worse than no file at all
Now that you have a good idea of what a CLAUDE.md file is, you might be wondering what it's like in action. Full transparency here, my use of Claude Code isn't similar to a developer's (since I'm not a developer by profession yet). I primarily use it to create side-projects, vibe-code tools to improve my workflow, and for a lot of use-cases that have nothing to do with code.
For instance, one way I use Claude Code daily is as a note-taking system. Coincidentally, the entire system is reliant on the very same CLAUDE.md file I'm talking about in this article. I have a folder on my desktop called SemesterNotes, and when I open Claude Code inside it, it reads a CLAUDE.md file that tells it what courses I'm taking, what my folder structure looks like, and how I want my notes formatted and organized. So, when I come back after a lecture and dump a messy wall of text about what I learned that day, Claude already knows exactly how to format it and where to file it without me saying a word about any of that. I set it up once, and I haven't had to touch it since.
Claude Code's real power comes from the tweaks nobody wants to talk about
Claude Code gets better when you stop chasing flashy workflows and start tightening the boring setup details.
All that said, the way you structure your CLAUDE.md file is extremely important. Anthropic themselves have published some excellent guidance on this, and honestly, who better to listen to than the people who built the tool? Their documentation recommends treating the file as the place where you write down what you'd otherwise have to re-explain every session — things like when Claude keeps repeating the same mistake, when a code review catches something Claude should have already known, or when you find yourself typing the same correction you typed yesterday. If you're explaining it twice, it should be in the file. On the structural side, Anthropic recommends keeping the file under 200 lines and making your rules specific enough to actually verify. They also recommend using markdown headers and bullets to group related instructions.
Take two minutes to set one up, trust me
I'm frankly embarrassed how long it took for me to begin setting up CLAUDE.md files for every project I create, but better late than never, right? The best part is you can get a quick version of it by running the /init command inside any existing project. Claude Code will scan your directory, detect your stack, and generate a starter CLAUDE.md for you. It won't be perfect, and you'll certainly want to trim out the obvious stuff and add your own preferences.
Software & AI Deals: Discounts on tools and subscriptions
However, it gives you something to work with in seconds rather than starting from a blank file. From there, just keep adding on the file naturally. Every time you catch yourself repeating an instruction, add it to the file. Every time Claude does something you don't like, write a rule against it!
