<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Damian Demasi’s Blog]]></title><description><![CDATA[A blog about Software Development, Artificial Intelligence (AI) and entrepreneurship]]></description><link>https://colocodes.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!RYOz!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4cc709d6-1395-40f6-a19e-b7f72251fea0_1280x1280.png</url><title>Damian Demasi’s Blog</title><link>https://colocodes.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 06 Jun 2026 20:07:36 GMT</lastBuildDate><atom:link href="https://colocodes.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Damian Demasi]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[colocodes@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[colocodes@substack.com]]></itunes:email><itunes:name><![CDATA[Damian Demasi]]></itunes:name></itunes:owner><itunes:author><![CDATA[Damian Demasi]]></itunes:author><googleplay:owner><![CDATA[colocodes@substack.com]]></googleplay:owner><googleplay:email><![CDATA[colocodes@substack.com]]></googleplay:email><googleplay:author><![CDATA[Damian Demasi]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How to make Claude Code actually understand and remember your project]]></title><description><![CDATA[One of the easiest mistakes to make with Claude Code is assuming that &#8220;memory&#8221; is just one thing.]]></description><link>https://colocodes.substack.com/p/how-to-make-claude-code-actually</link><guid isPermaLink="false">https://colocodes.substack.com/p/how-to-make-claude-code-actually</guid><dc:creator><![CDATA[Damian Demasi]]></dc:creator><pubDate>Mon, 13 Apr 2026 08:17:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4PWm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4PWm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4PWm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4PWm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2862805,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4PWm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!4PWm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b91f056-96d8-484a-b79f-386f26253fc7_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>One of the easiest mistakes to make with Claude Code is assuming that &#8220;memory&#8221; is just one thing. It is not.</p><p>There is <code>CLAUDE.md</code>. There are <em>rules</em>. There is auto memory. There is subagent memory. There are settings that influence how all of this behaves. And if you mix up what each layer is for, Claude can end up feeling forgetful, inconsistent, or weirdly aware of the wrong things.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://colocodes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Damian Demasi&#8217;s Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The good news is that the system is more coherent than it first looks.</p><p>The short version is this: <code>CLAUDE.md</code> is where <strong>you teach Claude how your project works</strong>. <em>Rules</em> are where you <strong>split that guidance into smaller and more targeted pieces</strong>. <em>Auto memory</em> is where <strong>Claude accumulates lessons over time</strong>. <em>Subagent memory</em> is where <strong>specialised agents build up their own knowledge base</strong>. <a href="https://code.claude.com/docs/en/memory">Anthropic&#8217;s docs</a> describe <code>CLAUDE.md</code> and <em>auto memory</em> as complementary systems that both load at the start of every conversation, while <em>rules</em> help scope instructions more precisely, especially in larger projects.</p><p>That distinction matters a lot.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YpiA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YpiA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YpiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83142,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YpiA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!YpiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddd49a36-c275-463c-8a60-21ff8354b45b_1200x628.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Because if you put everything into one giant <code>CLAUDE.md</code>, you bloat the context. If you rely on <em>auto memory</em> for permanent architecture guidance, you make the system fuzzy. And if you never structure <em>rules</em> by path or topic, Claude ends up carrying too much irrelevant instruction at once. Anthropic explicitly warns that these instructions consume tokens in the context window and recommends keeping each <code>CLAUDE.md</code> under about <code>200</code> lines.</p><p>So let&#8217;s do a proper deep dive &#129343;.</p><h2><strong>First principle. Teach the project, not just the code</strong></h2><p>A good <code>CLAUDE.md</code> is not a random pile of reminders. It should answer three questions clearly:</p><ol><li><p><strong>What is this project?</strong></p></li></ol><p>What technologies does it use? How is the repo structured? Where are the apps, packages, services, modules, or major domains?</p><ol><li><p><strong>Why does it exist?</strong></p></li></ol><p>What is the business purpose of the system? What are the important parts of the repo actually for?</p><ol><li><p><strong>How should Claude work in it?</strong></p></li></ol><p>How do you run the project? How do you test changes? How does Claude verify its own work? What tools and commands should it prefer?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-lHs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-lHs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-lHs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101143,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-lHs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!-lHs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F660ed375-5fb0-4aee-ad47-3705e675d691_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Project <code>CLAUDE.md</code> files should cover things like build and test commands, coding standards, architectural decisions, naming conventions, and common workflows, and <code>/init</code> can generate a starting file automatically by analysing the codebase.</p><p>This is why I think the best <code>CLAUDE.md</code> files feel more like an index than a manifesto.</p><p>You are not trying to describe everything. You are trying to give Claude the shortest possible path to the right mental model.</p><p>A weak version says something like:</p><blockquote><p>This project uses React, TypeScript, and a component-based architecture. We value clean code and testing.</p></blockquote><p>A useful version says something like:</p><blockquote><ul><li><p>App shell lives in <code>apps/web</code></p></li><li><p>Shared UI lives in <code>packages/ui</code></p></li><li><p>API clients live in <code>packages/api</code></p></li><li><p>Use <code>bun</code>, not <code>node</code></p></li><li><p>Run <code>bun test</code> for unit tests</p></li><li><p>Run <code>bun typecheck</code> before finishing</p></li><li><p>For auth flows, inspect <code>packages/auth</code> first</p></li><li><p>For billing changes, read <code>docs/billing-rules.md</code></p></li></ul></blockquote><p>That second version gives Claude <strong>somewhere to go</strong>.</p><h2><code>CLAUDE.md</code><strong> works best when it stays small</strong></h2><p>This is one of the most important best practices, and also one of the easiest to ignore.</p><p>Anthropic says <code>CLAUDE.md</code> content is loaded into the context window at the <strong>start of every session</strong>, so longer files consume more context and reduce adherence. Their recommendation is to target under <code>200</code> lines per file, keep instructions specific and concise, and split large files using imports or <code>.claude/rules/</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Cfdl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cfdl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cfdl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83428,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Cfdl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Cfdl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb60b0570-047e-48da-a92e-a0f3b30b71ac_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><code>CLAUDE.md</code>, <em>rules</em>, and <em>auto memory</em> all compete for attention, so high-quality project awareness comes from using the right layer for the right type of knowledge, not from stuffing everything into one always-loaded file.</p><p>Your root <code>CLAUDE.md</code> should be the stable core. It should contain the information Claude needs almost every time. It should not become the place where every team note, file path, edge case, workflow, and exception goes to die.</p><p>Once that file starts growing aggressively, the usual solution is not &#8220;add more structure inside the same file.&#8221; The better solution is &#8220;move the detail into rules or imported files.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XGQU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XGQU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XGQU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87736,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XGQU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!XGQU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143ef33a-75bb-4183-97a1-2063990adb31_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>Write instructions like commands, not like documentation</strong></h2><p>Anthropic&#8217;s docs say Claude follows specific, concrete, and verifiable instructions more reliably than vague guidance. Their examples are all imperative. &#8220;Use 2-space indentation.&#8221; &#8220;Run <code>npm test</code> before committing.&#8221; &#8220;API handlers live in <code>src/api/handlers/</code>.&#8221;</p><p>You should say:</p><blockquote><ul><li><p>Use <code>bun</code>, not <code>node</code></p></li><li><p>Check existing patterns before creating a new abstraction</p></li><li><p>Run <code>bun test</code> and <code>bun typecheck</code> before finishing</p></li><li><p>Prefer functional React components</p></li><li><p>Put API handlers in <code>src/api/handlers</code></p></li></ul></blockquote><p>You shouldn&#8217;t say:</p><blockquote><ul><li><p>The project uses <code>bun</code></p></li><li><p>The team tends to prefer functional components</p></li><li><p>Testing is generally recommended before finalising</p></li></ul></blockquote><p>One is operational, the other is descriptive. Claude does better with operational language because it translates more directly into action.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9a-f!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9a-f!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9a-f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83407,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9a-f!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!9a-f!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faedb90e6-78c6-4c53-a5da-e72399adddba_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>Tables often beat prose</strong></h2><p>This is one of my favourite tips from my experience working with Claude Code because it captures how these systems actually behave in practice.</p><p>If Claude needs to decide where to look first, a lookup table is often better than a long paragraph. A table turns your project knowledge into a little routing system.</p><p>For example:</p><pre><code><code>| Need              | Where to look first                                   |
| ----------------- | ----------------------------------------------------- |
| Billing logic     | `packages/billing/`, `apps/web/src/features/billing/` |
| Auth flow         | `packages/auth/`, `apps/web/src/routes/login/`        |
| Shared UI pattern | `packages/ui/`                                        |
| API client code   | `packages/api/`                                       |
| Test examples     | `tests/`, `packages/*/src/**/*.test.ts`               |
</code></code></pre><p>That is easier for Claude to act on than three paragraphs explaining the repo philosophy. It is also easier for you to maintain!</p><p>If your goal is project awareness, the more you can convert fuzzy prose into decision-friendly structure, the better.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qPaZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qPaZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qPaZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83712,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qPaZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!qPaZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F262000f0-7503-41d9-b820-9321ab82abb4_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>Use imports to keep the main file lean</strong></h2><p>Anthropic supports <code>@path</code> imports inside <code>CLAUDE.md</code>, including relative and absolute paths, recursive imports up to five levels deep, and even home directory imports for personal files. They also explicitly suggest using imports when instructions get too large.</p><p>This is useful because it lets your main file stay short without losing richness.</p><p>A clean pattern looks like this:</p><pre><code><code># Project overview
See @README.md for the high level product overview.

# Commands
See @package.json for scripts and @docs/dev-workflow.md for build steps.

# Domain notes
- Billing details: @docs/billing-rules.md
- Auth details: @docs/auth-flows.md
</code></code></pre><p>That gives Claude access to the deeper material without forcing your root file to carry every detail inline.</p><p>It also means your <code>CLAUDE.md</code> can act like a project map, which is usually a better job for it anyway.</p><h2><strong>Use multiple </strong><code>CLAUDE.md</code><strong> files, but do it intentionally</strong></h2><p>Anthropic documents a hierarchy for <code>CLAUDE.md</code> files. You can have <em>managed</em>, <em>user</em>, <em>project</em>, and more specific <em>directory-level</em> files. Claude walks up the directory tree from the current working directory, loading broader files first and more specific ones later. It can also discover subdirectory <code>CLAUDE.md</code> files and load them when Claude reads files in those directories.</p><p>From analysing <a href="https://x.com/Fried_rice/status/2038894956459290963">Claude Code source code</a>, it&#8217;s evident that this hierarchy is one of the main reasons monorepo setups can work well. A repo-level file can provide broad standards, while a nested package-level file can override or refine guidance for that area. It also notes that files closer to the current working directory have more practical priority because they load later.</p><p>That is powerful, but it can also get messy fast. The mistake is thinking, &#8220;great, I can put instructions everywhere.&#8221;</p><p>The better approach is:</p><ul><li><p>Put broad, stable project guidance at the root</p></li><li><p>Put domain specific guidance near the domain</p></li><li><p>Avoid repeating the same rule in multiple places</p></li><li><p>Periodically remove contradictions and update the content of files as your project evolves</p></li></ul><p>If two files disagree, Claude may follow either one inconsistently. Anthropic calls that out directly.</p><h2><strong>Rules are where the system really starts to scale</strong></h2><p>For larger projects, Anthropic recommends <code>.claude/rules/</code> so instructions stay modular and easier to maintain. Rules can load every session or only when matching files are opened, and path-specific rules use YAML frontmatter with a <em>paths</em> field.</p><p>This is one of the biggest upgrades you can make to project awareness.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Hyn5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Hyn5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Hyn5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76100,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Hyn5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!Hyn5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36921e83-ba9b-4749-9dca-8db1b4cd9c4b_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Instead of having one huge file that tries to teach Claude everything about frontend, backend, infra, testing, data migrations, and docs, you create smaller files with one concern each.</p><p>Something like:</p><pre><code><code>.claude/rules/
  testing.md
  code-style.md
  security.md
  frontend/react-patterns.md
  backend/api-rules.md
</code></code></pre><p>And if a rule only matters for API files, scope it:</p><pre><code><code>---
paths:
  - "src/api/**/*.ts"
---
# API Development Rules

- Validate all request inputs
- Use the standard error response format
- Add OpenAPI comments for public endpoints
</code></code></pre><p>According to the docs, rules without paths are <strong>loaded unconditionally</strong>, while path-scoped rules activate when Claude reads matching files. That makes them much more context-efficient than always-loaded instructions.</p><p>This is why I would frame the architecture like this:</p><ul><li><p><code>CLAUDE.md</code> is your project&#8217;s operating manual.</p></li><li><p><em>Rules</em> are your project&#8217;s specialised playbooks.</p></li></ul><h2><strong>Auto memory</strong></h2><p><code>CLAUDE.md</code> is what <strong>you</strong> write. <em>Auto memory</em> is what <strong>Claude</strong> writes based on corrections and preferences. They are complementary systems. <code>CLAUDE.md</code> is for persistent instructions and architecture-level guidance. <em>Auto memory</em> is for learnings and patterns Claude accumulates over time. Both load at the start of every conversation, but they serve different purposes.</p><p>People sometimes want Claude to &#8220;remember the project better,&#8221; and they start asking it to save architecture notes as memory. But if that guidance is stable and important, it usually belongs in <code>CLAUDE.md</code> or in <em>rules</em>, not in memory.</p><p>Auto memory is better for things like:</p><ul><li><p>user preferences Claude keeps forgetting (I find this is the most common use case)</p></li><li><p>lessons learned from repeated corrections</p></li><li><p>non obvious working agreements</p></li><li><p>project context that is real but not easily derivable from the code</p></li><li><p>references to outside systems</p></li></ul><p>From the Claude Code source code analysis, we can see it defines memory categories such as user, feedback, project, and reference, and makes it clear that memory is intended for information that cannot be easily inferred from the codebase, Git history, or repository structure.</p><p>That is the right filter. If Claude can discover it by reading the repo, it probably should not live in memory.</p><h2><strong>What </strong><code>MEMORY.md</code><strong> is really doing</strong></h2><p><code>MEMORY.md</code> is the entry point to Claude Code&#8217;s auto memory system for a project. Each project gets its own memory directory at <code>~/.claude/projects/&lt;project&gt;/memory/</code>, and that directory is shared across the same Git repository, including worktrees and subdirectories. Inside it, Claude keeps a small <code>MEMORY.md</code> file as an index, plus any number of topic-specific memory files:</p><pre><code><code>~/.claude/projects/&lt;project&gt;/memory/
&#9500;&#9472;&#9472; MEMORY.md          # Concise index, loaded into every session
&#9500;&#9472;&#9472; debugging.md       # Detailed notes on debugging patterns
&#9500;&#9472;&#9472; api-conventions.md # API design decisions
&#9492;&#9472;&#9472; ...                # Any other topic files Claude creates
</code></code></pre><p>Rather than storing everything in one large file, Claude uses <code>MEMORY.md</code> as a map of what is already known and where that knowledge lives. That makes the system easier to scale and keeps memory more organised. If needed, you can also move the auto memory directory somewhere else through your user or local settings:</p><pre><code><code>{
  "autoMemoryDirectory": "~/my-custom-memory-dir"
}
</code></code></pre><p>In practice, <code>MEMORY.md</code> gives Claude a lightweight overview of project knowledge, while the supporting files hold the deeper details.</p><p>According to the <a href="https://x.com/Fried_rice/status/2038894956459290963">source code</a> analysis, <code>MEMORY.md</code> is not just a normal notes file. Indeed it acts as an index for individual memory files. The index is always loaded, while individual memories are surfaced by relevance, rather than all being injected every time. The analysis also indicates that the index is capped at <code>200</code> lines or <code>25KB</code>, and that descriptions matter because they influence which memories are selected later.</p><p>That leads to a very practical insight. A good memory system is not just about saving facts. It is about making those facts retrievable.</p><p>So if you are manually curating memory, write entries in a way that future Claude can find them.</p><p>Bad memory description:</p><blockquote><p>Some notes about a previous issue</p></blockquote><p>Better memory description:</p><blockquote><p>Billing integration tests must use real Stripe sandbox because mocks hid webhook ordering bugs</p></blockquote><p>The second one is much more likely to be recalled when relevant. It is also more likely to be useful.</p><h2><strong>The </strong><code>#</code><strong> shortcut is useful, but you still need judgment</strong></h2><p>You can type <code>#</code> in the Claude Code interface to create memories, which makes memory feel a bit like quick rule capture.</p><p>That is useful, but the same principle still applies. Just because something is worth remembering for a week does not mean it belongs in the permanent project guidance layer.</p><p>A decent rule of thumb is:</p><ul><li><p>Put stable project truth in <code>CLAUDE.md</code></p></li><li><p>Put scoped, domain specific truth in <em>rules</em></p></li><li><p>Put learned preferences, corrections, or temporal context in <em>memory</em></p></li></ul><p>This simple separation solves a lot of mess before it happens.</p><h2><strong>Settings matter more than people think</strong></h2><p>Settings are not the same thing as memory files, but they influence the environment around them.</p><p><a href="https://code.claude.com/docs/en/memory">Anthropic&#8217;s settings docs</a> describe multiple scopes for configuration: managed, user, project, and local. They also explain the precedence order, where managed settings override everything, followed by command line arguments, then local, project, and user settings. The docs also list settings related to memory and project behaviour, including <code>autoMemoryDirectory</code>, and recommend project settings for team shared configuration and local settings for personal overrides in one repository.</p><p>This matters because a strong memory strategy is not just about writing good instructions. It is also about placing the right behaviour at the right scope.</p><p>For example:</p><ul><li><p>personal preferences across all repos belong in user scope</p></li><li><p>team shared hooks and tooling belong in project scope</p></li><li><p>machine specific or experimental overrides belong in local scope</p></li></ul><p>And if you are using auto memory heavily, the <code>autoMemoryDirectory</code> setting can change where that data lives, though the docs note that it is not accepted in shared project settings for safety reasons.</p><p>That last detail is a good reminder that not all &#8220;memory-related&#8221; behaviour belongs in the repo itself.</p><h2><strong>Subagents can have their own persistent memory too</strong></h2><p><a href="https://code.claude.com/docs/en/sub-agents#enable-persistent-memory">Anthropic documents</a> a memory field for subagents that gives them a persistent directory across conversations. Supported scopes are <em>user</em>, <em>project</em>, and <em>local</em>. When enabled, the subagent gets instructions for reading and writing to its memory directory, and it also receives the first <code>200</code> lines or <code>25KB</code> of that directory&#8217;s <code>MEMORY.md</code>. Anthropic recommends <em>project</em> as the default scope when the subagent&#8217;s knowledge should be project-specific and shareable via version control.</p><p>That means you can create agents that do not just help with a task. They can slowly become better at that task in the context of your project.</p><ul><li><p>A code reviewer subagent can remember recurring review issues.</p></li><li><p>A debugging subagent can remember recurring failure patterns.</p></li><li><p>A docs subagent can remember how your team prefers technical writing to be structured.</p></li></ul><p>This is powerful because it separates &#8220;main project awareness&#8221; from &#8220;specialized role awareness.&#8221;</p><p>And in practice, that usually makes the overall system cleaner.</p><h2><strong>A practical strategy that actually works</strong></h2><p>If I were setting up Claude Code from scratch for a serious repo, I would do something like this:</p><h3><strong>1. Start with </strong><code>/init</code></h3><p>Anthropic says <code>/init</code> can generate a starting <code>CLAUDE.md</code> based on the codebase and suggest improvements if one already exists. That gives you a draft. Not a finished system, but a draft.</p><h3><strong>2. Rewrite the root </strong><code>CLAUDE.md</code><strong> as an index</strong></h3><p>Keep only the high value, always relevant material:</p><ul><li><p>project purpose</p></li><li><p>repo map</p></li><li><p>important commands</p></li><li><p>verification steps</p></li><li><p>links or imports to deeper docs</p></li></ul><h3><strong>3. Convert broad prose into imperative instructions</strong></h3><p>Turn soft descriptions into concrete actions.</p><h3><strong>4. Move specialised content into </strong><code>.claude/rules/</code></h3><p>Especially if it is:</p><ul><li><p>file type specific</p></li><li><p>domain specific</p></li><li><p>noisy</p></li><li><p>not always relevant</p></li></ul><h3><strong>5. Use path-scoped rules aggressively</strong></h3><p>Only load React rules for React files. Only load API rules for API files.</p><h3><strong>6. Use imports for deeper docs</strong></h3><p>Do not paste long reference docs into the root file if an import will do the job.</p><h3><strong>7. Let memory capture learnings, not architecture</strong></h3><p>Use memory for corrections, preferences, deadlines, external references, and other non-obvious context.</p><h3><strong>8. Give subagents their own memory when specialisation matters</strong></h3><p>This is especially useful for repeat reviewer, debugger, or research workflows.</p><h2><strong>Common mistakes that make Claude feel forgetful</strong></h2><p>The first is <strong>one giant </strong><code>CLAUDE.md</code>. This usually starts as &#8220;let&#8217;s help Claude more&#8221; and ends as &#8220;Claude ignores half of this.&#8221;</p><p>The second is <strong>using memory for things Claude should derive from the repo</strong>. If the answer is in the codebase, teach Claude where to look. Do not turn the memory layer into a shadow documentation system.</p><p>The third is <strong>contradictory guidance across files</strong>. Anthropic explicitly warns that contradictory rules can reduce consistency.</p><p>The fourth is <strong>putting personal preferences into shared project files</strong>. Those belong in <em>user</em> or <em>local</em> scope instead. Anthropic&#8217;s settings and <code>CLAUDE.md</code> scope model both support that separation.</p><p>The fifth is <strong>writing fuzzy instructions</strong>. &#8220;Keep things clean&#8221; is not project awareness, but wishful thinking.</p><h2><strong>Takeaway</strong></h2><p>Claude Code does not become project-aware because you gave it more words. Instead, it becomes project aware when you make the project legible and accessible.</p><p>That means:</p><ul><li><p>stable context goes in <code>CLAUDE.md</code></p></li><li><p>scoped context goes in <em>rules</em></p></li><li><p>learned context goes in <em>memory</em></p></li><li><p>specialized context goes in <em>subagent memory</em></p></li><li><p>configuration lives in the right <em>settings scope</em></p></li></ul><p>Once you separate those layers, the system starts to feel much less magical and much more reliable.</p><p>And honestly, that is the real goal. Not &#8220;make Claude remember everything&#8221;, but make it remember the right things, in the right place, for the right reason.</p><p>If you want one compact checklist to apply after reading this, use this:</p><ul><li><p>Keep the root <code>CLAUDE.md</code> under about <code>200</code> lines when possible. Anthropic recommends that target for reliability and context efficiency.</p></li><li><p>Treat the root file as a project index, not a dumping ground.</p></li><li><p>Answer <strong>what</strong>, <strong>why</strong>, and <strong>how</strong> clearly.</p></li><li><p>Write instructions as commands.</p></li><li><p>Use lookup tables for routing Claude to the right code.</p></li><li><p>Move specialised guidance into <code>.claude/rules/</code>.</p></li><li><p>Use paths frontmatter for file specific <em>rules</em>.</p></li><li><p>Use imports instead of bloating the main file.</p></li><li><p>Save stable architecture in instructions, not in memory.</p></li><li><p>Use memory for learnings, corrections, and non obvious project context.</p></li><li><p>Give important subagents persistent memory when their specialisation benefits from it.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CENb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CENb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!CENb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!CENb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!CENb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CENb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png" width="1200" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91168,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/194044643?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CENb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 424w, https://substackcdn.com/image/fetch/$s_!CENb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 848w, https://substackcdn.com/image/fetch/$s_!CENb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 1272w, https://substackcdn.com/image/fetch/$s_!CENb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00bcf626-111a-4675-8f86-0dc29a098512_1200x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Now, I would be interested in knowing what&#8217;s the biggest thing Claude Code still forgets about your project today, and which layer do you think should fix it: </strong><code>CLAUDE.md</code><strong>, rules, memory, or subagents?</strong></p><p>See you in the next one!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://colocodes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Damian Demasi&#8217;s Blog! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Claude Code Crash Course]]></title><description><![CDATA[The first time you look at Claude Code closely, it can feel like a box full of parts that all seem important, but not obviously related.]]></description><link>https://colocodes.substack.com/p/claude-code-crash-course</link><guid isPermaLink="false">https://colocodes.substack.com/p/claude-code-crash-course</guid><dc:creator><![CDATA[Damian Demasi]]></dc:creator><pubDate>Fri, 03 Apr 2026 05:33:33 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!WfVP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WfVP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WfVP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WfVP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2810766,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WfVP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!WfVP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94fece63-e9b1-48f5-bbeb-19626b04b9c0_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://colocodes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://colocodes.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>The first time you look at Claude Code closely, it can feel like a box full of parts that all seem important, but not obviously related.</p><p>You see <code>CLAUDE.md</code>. Then rules. Then skills. Then hooks. Then subagents. Then MCP servers. Then&#8230; the list goes on. Then context management, planning before coding, verifying outputs, and avoiding letting the session turn into a mess. At first glance, it is easy to think: <em>why are there so many pieces just to get an AI coding workflow working well?</em></p><p>But after spending some time with these concepts, I think the answer is actually pretty simple.</p><p>Claude Code is not one thing. It is a small operating system for AI-assisted development.</p><p>And like any good system, different parts exist for different jobs.</p><h2><strong>Start here. Claude Code needs memory, structure, and reach</strong></h2><p>A good mental model is this:</p><ol><li><p><code>CLAUDE.md</code> and rules shape behaviour.</p></li><li><p>Skills package reusable know-how.</p></li><li><p>Hooks enforce automatic actions.</p></li><li><p>Subagents isolate work.</p></li><li><p>MCP servers connect Claude to the outside world.</p></li></ol><p>That is the big picture (mainly, because there is more to it, but this is enough to get us started).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PuiH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PuiH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PuiH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg" width="1456" height="972" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:972,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4967087,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PuiH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PuiH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5b435f-e868-4dfe-b032-2149f554481c_6016x4016.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Alain Pham on Unsplash</figcaption></figure></div><p>Once you see it that way, the moving parts stop feeling random. They start feeling like layers. The interesting part is not learning each feature in isolation, but understanding <strong>what problem each one solves, and what happens when you try to use the wrong one for that problem</strong>. <a href="https://code.claude.com/docs/en/overview">Anthropic&#8217;s docs</a> make that distinction pretty clear. <code>CLAUDE.md</code> gives persistent instructions, rules can scope those instructions more precisely, skills extend Claude with reusable playbooks, hooks provide deterministic automation, subagents work in separate contexts with their own tools and prompts, and MCP is the bridge to external tools, data sources, and APIs.</p><h2><code>CLAUDE.md</code><strong> and rules. The behavioral layer</strong></h2><p>If I had to pick the first thing to set up in Claude Code, it would be this.</p><p><code>CLAUDE.md</code> is where you put persistent instructions that Claude should carry into every session for a project, for your personal workflow, or even across an organization. <a href="https://code.claude.com/docs/en/memory#claude-md-files">The docs</a> describe it as plain markdown that Claude reads at the start of every session. They also make an important point that is easy to miss: these instructions are context, not hard enforcement. So if the file is vague, bloated, or contradictory, performance drops. Anthropic recommends keeping it specific, concise, and well-structured, with a rough target of under <code>200</code> lines per file.</p><p>That last bit matters more than it seems.</p><p>A lot of people treat instruction files like a dumping ground. They keep adding preferences, workflows, architecture notes, testing conventions, edge cases, and random reminders until the thing becomes unreadable. Then they wonder why the agent follows it inconsistently. The problem is not that the model is &#8220;bad at instructions.&#8221; The problem is that the instruction layer is carrying too much weight.</p><p>That is where <strong>rules</strong> come in.</p><p>For larger projects, Anthropic recommends organising instructions inside <code>.claude/rules/</code>, and those rules can even be path-specific so they only load when Claude is working in matching areas of the codebase. That means you do not need every frontend rule, testing rule, security note, and data migration convention loaded all the time. You can scope them. In other words, <code>CLAUDE.md</code> should define the broad operating principles of the project, while <strong>rules</strong> help keep that guidance modular and targeted.</p><p>So, if you want one simple distinction:</p><blockquote><p><strong>Use </strong><code>CLAUDE.md</code><strong> for shared default behaviour. Use rules when the project is getting too big for one instruction file to stay sharp.</strong></p></blockquote><h2><strong>Skills. The reusable playbook layer</strong></h2><p>This is where Claude Code starts getting interesting.</p><p>A skill is not just &#8220;more instructions.&#8221; A skill is a packaged capability. <a href="https://code.claude.com/docs/en/skills#extend-claude-with-skills">Anthropic defines skills</a> around a <code>SKILL.md</code> file. Claude can load a skill automatically when it is relevant, or you can invoke it directly with a slash command (<code>/</code>) based on the skill name (<code>/my_skill</code>). Skills can also include frontmatter, supporting files, argument handling, restricted tool access, and even subagent execution.</p><p>That changes the way you should think about them.</p><p>A rule says, &#8220;here is how we do things around here.&#8221;</p><p>A skill says, &#8220;when this kind of task appears, here is the exact playbook to follow.&#8221;</p><p>That is a huge difference.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YuQ3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YuQ3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 424w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 848w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YuQ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4613947,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YuQ3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 424w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 848w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!YuQ3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80a6b880-392c-4e5a-a82e-84898017892f_5760x3840.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Calle Macarone on Unsplash</figcaption></figure></div><p>For example, suppose your team has a repeatable workflow for debugging flaky tests, preparing release notes, reviewing API design, or migrating components from one pattern to another. You <em>could</em> try to cram that into <code>CLAUDE.md</code>, but then every session pays the context cost whether that workflow is relevant or not. Skills solve that by staying optional and task-focused. Anthropic explicitly positions them that way <a href="https://code.claude.com/docs/en/skills#extend-claude-with-skills">in the docs</a> and even notes that for task-specific instructions that do not need to live in context all the time, skills are the better fit.</p><p>This is one of those places where the abstraction really clicks.</p><p>A good Claude Code setup is not just about telling the model how your codebase works, but about identifying <strong>which workflows deserve to become first-class tools</strong>.</p><p>That is what skills are.</p><h2><strong>Hooks. The enforcement layer</strong></h2><p>If <code>CLAUDE.md</code> and skills are about guidance, <strong>hooks</strong> are about guarantees.</p><p>Anthropic <a href="https://code.claude.com/docs/en/hooks-guide#automate-workflows-with-hooks">describes hooks</a> as user-defined shell commands that run at specific points in Claude Code&#8217;s lifecycle. Their wording is important here: hooks provide <strong>deterministic control</strong>. In other words, they are for the things that <strong>must happen, every time, without relying on the model to remember or choose correctly</strong>. The best practices guide reinforces the same distinction: unlike <code>CLAUDE.md</code>, which is advisory, hooks are deterministic and guarantee the action happens.</p><p>That makes hooks the right tool for a very specific category of problems:</p><ul><li><p>Run formatting after edits.</p></li><li><p>Block writes to protected files.</p></li><li><p>Send a notification when Claude needs input.</p></li><li><p>Reinject context after compaction.</p></li><li><p>Audit configuration changes.</p></li></ul><p>Hooks are workflow mechanics. If you try to solve these mechanics with prompts alone, you are basically <strong>hoping</strong> the model behaves. Hooks exist so you do not need hope.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hEIL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hEIL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hEIL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1629029,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hEIL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hEIL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F447dd180-fcf2-4be9-bda2-7b1d2179e285_3000x2000.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Tatiana Rodriguez on Unsplash</figcaption></figure></div><p>This is also where a lot of AI workflows quietly become trustworthy. Not because the model got smarter, but because some parts of the workflow stopped depending on the model entirely.</p><p>That is a pattern worth paying attention to.</p><p><strong>The more a task sounds like &#8220;always do X when Y happens,&#8221; the more likely it belongs in a hook, not in a prompt.</strong></p><h2><strong>Subagents. The isolation layer</strong></h2><p>Subagents are one of the clearest signs that Claude Code is built for agentic work, not just chat.</p><p>Anthropic <a href="https://code.claude.com/docs/en/sub-agents#create-custom-subagents">describes subagents</a> as specialised AI assistants that run in their own context window, with their own system prompt, tool access, and permissions. Claude can delegate work to them when a task matches the subagent&#8217;s description, and the subagent works independently before returning the result. The docs also point out why this matters: subagents preserve context, enforce constraints, specialise behaviour, and can route work to different models.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!B2C6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!B2C6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 424w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 848w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!B2C6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6039085,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!B2C6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 424w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 848w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!B2C6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbfdacc7b-ca63-4e19-83dc-ef093bd97a31_6786x4524.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Yuriy Vertikov on Unsplash</figcaption></figure></div><p>In long coding sessions, context gets polluted fast. Research, false starts, logs, file reads, debugging dead ends, and exploratory thoughts all pile into the same conversation. Anthropic&#8217;s <a href="https://code.claude.com/docs/en/best-practices">best practices page</a> repeatedly emphasises that context is the most important resource to manage, because performance degrades as the context window fills.</p><p>Subagents are how you stop every task from becoming everyone&#8217;s problem:</p><ul><li><p>Need a security pass across many files? Use a security reviewer subagent.</p></li><li><p>Need research on a subsystem before implementation? Delegate it.</p></li><li><p>Need a focused investigation that should not clutter the main thread? Subagent.</p></li></ul><p>I think this is one of the most underrated shifts in AI coding workflows. The question is no longer just &#8220;what should the model do?&#8221; It is also &#8220;<strong>which context should do it?</strong>&#8221;</p><p>That is a different level of workflow design.</p><h2><strong>MCP servers. The reach layer</strong></h2><p>Without MCP, Claude Code is mostly limited to the local environment and whatever tools it already has access to. With MCP, it can reach out.</p><p>Anthropic <a href="https://code.claude.com/docs/en/mcp#connect-claude-code-to-tools-via-mcp">describes MCP,</a> the Model Context Protocol, as an open standard that lets Claude Code connect to external tools and data sources through MCP servers. Their examples include issue trackers, monitoring platforms, databases, design tools, and workflow automation systems. They also note an important security warning: third-party MCP servers are not universally verified, and untrusted servers can introduce prompt injection or other risks.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XPXl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XPXl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XPXl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2468831,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XPXl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XPXl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3f9cafa0-f3ac-4368-b69f-ad08e3226cd6_5599x3733.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Toa Heftiba on Unsplash</figcaption></figure></div><p>This is where Claude Code stops being &#8220;an assistant in my repo&#8221; and starts becoming &#8220;an agent in my workflow.&#8221; That sounds exciting, and it is. But it also changes the stakes.</p><p>Once Claude can read tickets, inspect production signals, query a database, read Figma, or draft emails, the design problem becomes larger than coding. You are now designing an operational system. Permissions matter. Trust boundaries matter. Server choice matters. Tool access matters.</p><p>So while MCP is easily the most expansive capability in the stack, it is also the one that benefits most from restraint.</p><p>Just because Claude <em>can</em> connect to everything does not mean it should.</p><h2><strong>How these parts fit together in practice</strong></h2><p>Here is the cleanest way I can describe the whole stack:</p><ul><li><p><code>CLAUDE.md</code> tells Claude how to behave by default.</p></li><li><p>Rules narrow that guidance by topic or path.</p></li><li><p>Skills package repeatable expertise or workflows.</p></li><li><p>Hooks automate mandatory actions.</p></li><li><p>Subagents keep big or noisy tasks isolated.</p></li><li><p>MCP servers connect Claude to outside systems.</p></li></ul><p>A practical workflow might look like this:</p><p>Your <code>CLAUDE.md</code> defines coding standards, project conventions, and preferred commands. A rule file adds stricter guidance for the <code>/api</code> directory. A skill gives Claude your internal release checklist. A hook runs linting after edits and blocks writes to a protected migration folder. A subagent handles security review in its own context. MCP connects Claude to GitHub, Jira, Sentry, and your database.</p><p>At that point, Claude Code is no longer just reacting to prompts, but operating inside a designed environment. And I think that is the real lesson here.</p><blockquote><p>The quality of the workflow does not come from one magical feature. It comes from <strong>putting the right responsibility in the right layer</strong>.</p></blockquote><h2><strong>Best practices that actually matter</strong></h2><p>Anthropic&#8217;s <a href="https://code.claude.com/docs/en/best-practices">best practices page</a> covers a lot, but a few ideas stand out because they connect directly to all the moving parts above.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h6Kw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h6Kw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 424w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 848w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h6Kw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:7872188,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://colocodes.substack.com/i/193033361?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h6Kw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 424w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 848w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!h6Kw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F24131c76-5726-47e4-a21b-991766f880f5_6720x4480.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by Jason Leung on Unsplash</figcaption></figure></div><p>First, give Claude <strong>a way to verify its work</strong>. Tests, screenshots, and expected outputs dramatically improve results because Claude can check itself instead of making you the only feedback loop.</p><p>Second, <strong>explore first, then plan, then code</strong>. Anthropic recommends separating research and planning from implementation, especially for tasks that touch multiple files or unfamiliar areas. That maps nicely to <strong><a href="https://code.claude.com/docs/en/permission-modes#start-and-use-plan-mode">plan mode</a></strong>, but also to skills and subagents when you want a more structured workflow.</p><p>Third, provide <strong>specific context</strong>. Reference files, constraints, patterns, and symptoms. Claude can infer a lot, but it cannot read your mind (yet &#128517;).</p><p>And finally, <strong>manage context aggressively</strong>. Use <code>/clear</code> between unrelated tasks and avoid stuffing persistent instructions with everything under the sun.</p><blockquote><p>Most of Claude Code&#8217;s &#8220;moving parts&#8221; are really context management tools in disguise.</p></blockquote><h2><strong>Closing thoughts</strong></h2><p>When people first look at Claude Code, they often ask which feature matters most. I think that is the wrong question.</p><p>The better question is: <strong>what kind of problem am I trying to solve?</strong></p><ul><li><p>If the problem is persistent guidance, reach for <code>CLAUDE.md</code> and rules.</p></li><li><p>If the problem is reusable know how, reach for skills.</p></li><li><p>If the problem is guaranteed automation, reach for hooks.</p></li><li><p>If the problem is isolation and focus, reach for subagents.</p></li><li><p>If the problem is external connectivity, reach for MCP.</p></li></ul><p>That is when the system starts making sense.</p><p>Claude Code does not become powerful because it has many parts. It becomes powerful when each part has a clear job. And honestly, that is probably the deeper pattern behind good AI workflows in general. Not more prompts. Not more cleverness. Better boundaries.</p><p><strong>Practical takeaway:</strong></p><ul><li><p>Start with a small, sharp <code>CLAUDE.md</code></p></li><li><p>Add rules only when the project needs more structure</p></li><li><p>Turn repeated workflows into skills</p></li><li><p>Use hooks for anything that must happen every time</p></li><li><p>Use subagents to protect context</p></li><li><p>Add MCP carefully, with trust and permissions in mind</p></li></ul><p><strong>Which part of Claude Code feels most useful to you right now: rules, skills, hooks, subagents, or MCP servers, and why?</strong></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://colocodes.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Damian&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item></channel></rss>