<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aditi</title>
    <description>The latest articles on DEV Community by Aditi (@aditi2905).</description>
    <link>https://dev.to/aditi2905</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F977256%2F0087d34c-9947-434d-bd84-3f6c8dc445e6.jpg</url>
      <title>DEV Community: Aditi</title>
      <link>https://dev.to/aditi2905</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aditi2905"/>
    <language>en</language>
    <item>
      <title>Here’s How I Get the Most Out of My CLAUDE.md</title>
      <dc:creator>Aditi</dc:creator>
      <pubDate>Mon, 14 Sep 2026 07:33:07 +0000</pubDate>
      <link>https://dev.to/aditi2905/heres-how-i-get-the-most-out-of-my-claudemd-1682</link>
      <guid>https://dev.to/aditi2905/heres-how-i-get-the-most-out-of-my-claudemd-1682</guid>
      <description>&lt;p&gt;Every time I started a new session with Claude, I found myself repeating the same instructions. Which commands to use, how I wanted the code written, what to test. I kept copy-pasting the same saved message from my notes whenever I started a new chat.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;That’s when I found out about the CLAUDE.md file.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It gives those recurring instructions a place in your project, so Claude can read them across sessions without you having to repeat yourself.&lt;/p&gt;

&lt;p&gt;There are plenty of ways to write a CLAUDE.md file, but here’s how I like to approach it for maximum benefits. I’ll walk you through the structure I use, what I include, and what I leave out, with a few examples you can adapt to your own project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where should you put CLAUDE.md?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqm3u7vrz9xz3let2r4y4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqm3u7vrz9xz3let2r4y4.png" alt="Organize GIF" width="220" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start with your project’s root folder, the same place you’d usually find the README. Create a file named CLAUDE.md, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
 - CLAUDE.md
 - README.md
 - package.json
 - src/
 - tests/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit the file to Git so your teammates can use the same guidance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;You can also keep this file at .claude/CLAUDE.md&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As the project grows, you might need different instructions for particular areas. In such cases, you can create CLAUDE.md at sub-directory paths as well. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
 - CLAUDE.md
 - src/
   - frontend/
     - CLAUDE.md
   - backend/
     - CLAUDE.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a start, one file at the root is enough. Add more when different parts of your project actually need different instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replace good intentions with actual instructions
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;An instruction that feels clear to you can still be vague to your agent.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzj0xrvdqz9b1j6knnzap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzj0xrvdqz9b1j6knnzap.png" alt="Instructions GIF" width="220" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, if you keep giving prompts like these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write clean code&lt;/li&gt;
&lt;li&gt;Follow best practices&lt;/li&gt;
&lt;li&gt;Test thoroughly&lt;/li&gt;
&lt;li&gt;Keep the architecture consistent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These sound like good instructions, but they leave a lot for your AI agent to guess. Think from its perspective: what does thorough testingmean in your project, and which best practices should it follow? You know what you mean, but your agent needs those details spelled out.&lt;/p&gt;

&lt;p&gt;Here’s a more useful version for an example TypeScript API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Route handlers belong in src/routes/&lt;/li&gt;
&lt;li&gt;Put database queries in src/repositories&lt;/li&gt;
&lt;li&gt;Validate request bodies with the existing Zod schemas&lt;/li&gt;
&lt;li&gt;Return errors through src/lib/api-error.ts&lt;/li&gt;
&lt;li&gt;For bug fixes, add a regression test covering the reported failure&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Now these are concrete decisions to follow.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Write Down the Commands Your Project Uses
&lt;/h2&gt;

&lt;p&gt;A project might have unit tests, integration tests, browser tests, and several ways to start the app. In such cases, writing “Run the tests after any edit” doesn’t give concrete steps to the agent.&lt;/p&gt;

&lt;p&gt;For a hypothetical project using pnpm and Vitest, you could write:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commands&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run these from the repository root.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install dependencies: pnpm install&lt;/li&gt;
&lt;li&gt;Start development server: pnpm dev&lt;/li&gt;
&lt;li&gt;Type-check: pnpm typecheck&lt;/li&gt;
&lt;li&gt;Run unit tests once: pnpm exec vitest run&lt;/li&gt;
&lt;li&gt;Run one test file: pnpm exec vitest run &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The working directory and prerequisites matter as much as the command.&lt;/p&gt;

&lt;p&gt;Before adding these, run them yourself. A copied command that starts watch mode or needs an undocumented service creates another problem to debug.&lt;/p&gt;

&lt;p&gt;Also, avoid making every tiny change trigger every expensive check. Describe the checks that make sense for your project and let CI enforce the required gates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capture the project quirks that look like mistakes
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This is where the file can earn its place.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Suppose an API represents money in integer cents. A price of $19.99 travels through the system as 1999. Without that context, a perfectly reasonable looking change could introduce inconsistent values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better way:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Money&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API and database amounts use integer cents&lt;/li&gt;
&lt;li&gt;Convert to display currency only in the UI&lt;/li&gt;
&lt;li&gt;Reuse formatMoney() from src/lib/money.ts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or suppose an older mobile client depends on an unusual response:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compatibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;POST/subscriptions return HTTP 200 for duplicate requests&lt;/li&gt;
&lt;li&gt;Older mobile clients depend on this behaviour&lt;/li&gt;
&lt;li&gt;Preserve it unless the task explicitly changes the API contract
That last sentence also leaves room for intentional change. You don’t want a historical note to become an unexplained rule nobody can revisit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjtnorb1ody0hc81pcxmf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjtnorb1ody0hc81pcxmf.png" alt="Mistakes GIF" width="220" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A short explanation of why something exists can prevent an unnecessary fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn recurring corrections into reusable guidance
&lt;/h2&gt;

&lt;p&gt;Imagine Claude adds a new date formatting library when the project already has a shared formatter.&lt;/p&gt;

&lt;p&gt;You could respond with:&lt;/p&gt;

&lt;p&gt;Don’t add &lt;strong&gt;unnecessary&lt;/strong&gt; dependencies.&lt;/p&gt;

&lt;p&gt;But the next task might produce the same disagreement about what unnecessary means.&lt;/p&gt;

&lt;p&gt;A better instruction would be:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check package.json and src/lib/ for an existing solution before adding a runtime dependency&lt;/li&gt;
&lt;li&gt;For dates, reuse src/lib/date.ts&lt;/li&gt;
&lt;li&gt;If a new dependency is needed, explain what the existing tools cannot handle&lt;/li&gt;
&lt;li&gt;It identifies the check, points to the relevant code, and explains how to handle an exception.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be selective, though. One unusual task doesn’t always justify a permanent rule. Ask whether the correction will still matter next month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep temporary work out of permanent instructions
&lt;/h2&gt;

&lt;p&gt;A note like this has an expiry date:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We are fixing the checkout bug today.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The failing account is test-user-42.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Try increasing the timeout first.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These kinds of instructions don’t belong in CLAUDE.md because, if they’re left there after the work is done, they can cause confusion later.&lt;/p&gt;

&lt;p&gt;That’s why I prefer keeping task-specific instructions in separate files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu6f1hwi9stjnruj2gmbg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu6f1hwi9stjnruj2gmbg.png" alt="Multiple files" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claude Code supports path-scoped rules in .claude/rules/.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simple format for your CLAUDE.md
&lt;/h2&gt;

&lt;p&gt;Start with the information Claude needs to work on your project: what it does, how to run it, which conventions to follow, and how to check changes. You can use this structure and fill in the details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project overview
 - Briefly explain what this project does and its main technologies.

Useful commands
 - Set up the project: [command]
 - Run locally: [command]
 - Run tests: [command]
 - Check formatting and linting: [command]

Mention where to run these commands and any required setup.

Where things live
 - Point to the main source code, tests, and important documentation.
 - Include locations that may be difficult to find or easy to confuse.

Project conventions
 - Describe the patterns to follow and existing helpers to reuse.
 - Focus on decisions that aren't obvious from reading the code.

Things to watch out for
 - Explain unusual behavior that must be preserved.
 - Identify generated files and how they should be updated.
 - Give a short reason for each restriction.

Checking changes
 - Explain how to choose and run the relevant checks.
 - Ask Claude to report what it checked and anything it couldn't verify.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don’t have to fill every section. If there’s nothing useful to say under one, leave it out. Replace the placeholders with real commands and paths before using the file.&lt;/p&gt;




&lt;p&gt;That brings us to the end of this blog! If there’s a practice you find helpful when writing your CLAUDE.md, share it in the comments. I’d love to give it a try.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Originally published on &lt;a href="https://medium.com/@the_infinity/heres-how-i-get-the-most-out-of-my-claude-md-843db3f321f9" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;. Follow me there for more articles on AI tools and software development.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
