Latest / AI Fire Daily / #657 Neil: I Audited My Claude Code With Context Engineering Tips
Transcript
- 0:00Human beings have this, uh, fundamental hoarding
- 0:02problem. We hoard physical things in our dusty
- 0:06garages. Right, or we hold onto old clothes just
- 0:09in case. Exactly. And we hoard digital instructions
- 0:12in our code, too. We just naturally assume more
- 0:15information is always better. But Anthropic just
- 0:19proved us completely wrong. They really flipped
- 0:22the script on us recently. Welcome to the deep
- 0:24dive, everyone. Yeah, we are looking at a great
- 0:27stack of notes today. The core topic is known
- 0:29as context engineering. We are exploring why
- 0:32giving an AI less information works. We will
- 0:35look at why it actually makes it smarter. We
- 0:38have the hard data proving massive prompts hurt
- 0:40performance, and we will walk through a step
- 0:43-by -step cleanup guide together. You could use
- 0:45it to fix your own coding setup. It is a critical
- 0:48topic for anyone using these tools. You really
- 0:50need to understand how context works. I have
- 0:54to admit something to you, though. I still wrestle
- 0:56with prompt drift myself. Wait, really? You still
- 0:59find yourself doing that? I absolutely do. You
- 1:02get this overwhelming urge to keep adding instructions.
- 1:04You just want to cover every single edge case
- 1:07imaginable. Yeah. You think the AI gets smarter
- 1:09with more details. It is a very natural human
- 1:12instinct, honestly. We over explain things when
- 1:15we are feeling anxious. We do. But our intuition
- 1:18about AI instructions is backwards. Let us look
- 1:21at the catalyst for this whole discussion. Anthropic
- 1:23fundamentally changed how they handle their system
- 1:25prompt. They made a massive adjustment to their
- 1:28core architecture recently. And a system prompt
- 1:31it is, well, let's define it. It's the core hidden
- 1:33instructions guiding how an AI model behaves.
- 1:37Right. Anthropic removed over 80 % of those core
- 1:40rules. They essentially wiped out the model's
- 1:42main rule book. I hear that, but it still feels
- 1:44kind of wrong to me. As a developer, my instinct
- 1:47is to... document absolutely everything. If I
- 1:50don't tell the AI what to do, I worry. I just
- 1:52assume it's going to break my code entirely.
- 1:54That fear is exactly what Anthropic wanted to
- 1:57test. They ran extensive coding evaluations after
- 1:59deleting those core rules. The results showed
- 2:02no measurable drop in coding performance. That
- 2:05feels incredibly counterintuitive at first glance.
- 2:08Why wouldn't a model perform worse with fewer
- 2:10explicit instructions? It comes down to how these
- 2:13language models have evolved. Older models were
- 2:16actually quite fragile in their reasoning. Yeah,
- 2:18they needed strict, detailed rules to avoid basic
- 2:21mistakes. They basically needed their hand held
- 2:23through every single step. They absolutely did.
- 2:26Take code comment length for a specific example.
- 2:30Anthropic used to set strict limits on comment
- 2:32length. Because the old models genuinely needed
- 2:35that explicit boundary. Right, otherwise they
- 2:37would hallucinate and ramble endlessly. But newer
- 2:40models do not need that level of hand holding.
- 2:43They can infer the rules simply by looking at
- 2:45your project. They analyze the existing coding
- 2:47style and match it perfectly. Exactly. They rely
- 2:50on pattern recognition instead of rigid rules.
- 2:53So keeping hundreds of legacy rules is actually
- 2:55counterproductive. You are feeding the model
- 2:57solutions to problems it already solved. You
- 3:01are just wasting your valuable tokens at that
- 3:03point. Yeah, and wasted tokens actively lead
- 3:05to worse performance overall. And just to clarify,
- 3:08tokens are the tiny fragments of words an AI
- 3:11uses to process text. Spot on. We have some startling
- 3:15data on this specific issue. A comprehensive
- 3:172025 study looked at massive prompt structures.
- 3:21What did they find? They found that longer inputs
- 3:24actively degrade the model's output. Depending
- 3:26on the task, performance dropped by 13 .9%. That
- 3:30is a significant drop just from adding extra
- 3:33words. It is. And the degradation gets much worse
- 3:36in certain scenarios. In some edge cases, performance
- 3:39plummeted by up to 85%. That is essentially a
- 3:45total system failure. It is a complete breakdown
- 3:47of the model's reasoning capabilities. More context
- 3:50means the AI processes lots of irrelevant instructions.
- 3:54It is fundamentally an attention problem under
- 3:56the hood. The architecture has to weigh every
- 3:59word against every other word. Exactly. When
- 4:02you add garbage, it dilutes the important signals.
- 4:05Think about making a simple peanut butter sandwich.
- 4:08You already know the basic mechanics of this
- 4:10task. Sure, it is a very straightforward everyday
- 4:12activity. Now imagine I hand you a 1 ,000 page
- 4:16instructional manual. You have to read the entire
- 4:19thing before you begin. Oh man, I would probably
- 4:21just give up in order to take out. Right. But
- 4:24imagine you are forced to read it while working.
- 4:26The manual covers the exact optimal angle to
- 4:29hold the knife. Wow. It has 50 pages on the history
- 4:32of wheat farming. It mandates the precise room
- 4:36temperature for spreading peanut butter. That
- 4:38is just overwhelming noise distracting from the
- 4:40actual goal. Worse than that, you are actively
- 4:42holding a sharp knife. You are trying to slice
- 4:45bread while reading page 400. Your working memory
- 4:48is completely maxed out by the manual. You are
- 4:50going to drop the knife or ruin the bread. The
- 4:52AI suffers from that exact same cognitive overload.
- 4:55It loses the plot because it is reading wheat
- 4:58farming history. So is the goal simply to make
- 5:01every prompt as short as possible? Not exactly.
- 5:04You just need to remove the clutter and keep
- 5:06essential guidelines. So don't delete usefulness,
- 5:09just stop forcing it to read irrelevant data.
- 5:12That perfectly captures the essence of context
- 5:14engineering. We know dumping rules into the prompt
- 5:17is bad. Which brings us to a major logistical
- 5:20catch -22. If dumping all information upfront
- 5:24degrades performance, we have a problem. We do.
- 5:27How do we give Claude access to powerful development
- 5:29tools? If I don't give it instructions, it cannot
- 5:32do its job. Right. You want the AI to use complex
- 5:35external tools. But... We cannot load massive
- 5:38instructions for every tool up front. That would
- 5:41trigger the exact cognitive overload we just
- 5:43discussed. We would blow out the context window
- 5:46immediately. Exactly. And the context window
- 5:49is the total amount of text an AI can remember
- 5:51at once. We need a way to bypass this memory
- 5:54limitation entirely. That is where a concept
- 5:57called progressive disclosure comes in. This
- 5:59engineering method relies heavily on what are
- 6:01called MCP tools. Let's define those quickly
- 6:04for the audience. MCP tools are small software
- 6:07bridges that let AI read your local files safely.
- 6:10They are incredibly useful for coding and deep
- 6:13data analysis. They completely change how models
- 6:15interact with your local environment. But the
- 6:18old way was loading every tool definition instantly.
- 6:21You would give the AI the heavy manual for every
- 6:24single tool. Even if the current coding task
- 6:26did not require them. Progressive disclosure
- 6:29changes this underlying mechanism entirely. Think
- 6:32of it like giving the AI a simple table of contents.
- 6:36Exactly. Instead of loading the whole book up
- 6:38front, you load just the titles. The AI knows
- 6:41the tools exist in the system, but it waits to
- 6:43read about them until they are actually needed.
- 6:46The model is smart enough to request the specific
- 6:48chapter later. Anthropic tested this specific
- 6:51approach in their engineering labs. And what
- 6:53were the results? The results from their initial
- 6:55tests were genuinely impressive. This method
- 6:58used 85 % fewer tokens in the tested example.
- 7:02That is a massive reduction in wasted processing
- 7:05power. And it directly translated to significantly
- 7:08better evaluation scores. Claude Opus 4 went
- 7:11from a 49 % score to 74%. That is a staggering
- 7:16leap in baseline capability. It is. Claude Opus
- 7:194 .5 saw very similar performance gains. It jumped
- 7:22from 79 .5 % to 88 .1%. Whoa. Imagine the efficiency
- 7:29of scaling that across billions of queries. It
- 7:32completely changes the economics of running these
- 7:34massive models. It makes them faster, cheaper,
- 7:38and objectively much smarter. But I want to clarify
- 7:41the mechanics of this disclosure. Does keeping
- 7:44tools unloaded mean the AI forgets they exist?
- 7:47Not at all. It sees a lightweight menu of tools
- 7:50and downloads instructions later. Right. It sees
- 7:53the tool menu, but only downloads the manual
- 7:56when asked. It is highly efficient context management
- 7:59in action. So we understand the theory and the
- 8:01data behind this. Progressive disclosure clearly
- 8:03works, and less is absolutely more. Yeah. Now
- 8:07we need to translate that into practical application.
- 8:10We need to look at your actual daily workflow.
- 8:13We really need to apply this to your actual project
- 8:16files. Let us look at the standard Claude .md
- 8:20file. Many developers use this file to set baseline
- 8:23project instructions. The source material is
- 8:26very clear on how to handle this. You must keep
- 8:28this specific configuration file incredibly lightweight.
- 8:32It should only include what Claude cannot easily
- 8:34find itself. Right. There are four specific categories
- 8:37of information you should keep. First, goals.
- 8:41What do you actually want the project to achieve?
- 8:44Second, preferences. How do you want Claude code
- 8:47to specifically work? Like, preferring functional
- 8:50programming over object -oriented programming
- 8:52approaches. Exactly. Third, project constraints.
- 8:56What are the strict rules and immovable requirements?
- 8:59Finally, project -specific knowledge. Details
- 9:02Claude cannot figure out just by scanning your
- 9:04code base. Wait, I need to push back on this
- 9:07a little bit. Sure. Isn't it risky to trust the
- 9:09model with unstated rules? If I don't tell it
- 9:12my exact coding style up front, what is it looking
- 9:14at? It looks at the actual environment you are
- 9:17working in. The model scans your folder structures
- 9:19and variable naming conventions. Okay, so it
- 9:23builds its own context from the environment.
- 9:25Yeah. It reads your previous commits to understand
- 9:28your historical styling. You just have to structure
- 9:31your remaining instructions correctly. You have
- 9:33to focus on three core communication pillars,
- 9:36result, reason, and constraints. Result is simply
- 9:39what you want Claude to finally deliver. Reason
- 9:42is why that specific engineering task actually
- 9:44matters. And constraints dictate what Claude
- 9:47must follow or entirely avoid. Let us use a concrete
- 9:50development example to illustrate this clearly.
- 9:53Let's say you want to improve your website's
- 9:55loading speed. The old way was writing a massive
- 9:58complicated prompt. You would list 50 different
- 10:00performance optimization techniques manually.
- 10:03You would tell it exactly which image files to
- 10:05heavily compress. You would write out the exact
- 10:08caching logic you wanted implemented. Which just
- 10:11wastes tokens and limits the AI's actual problem
- 10:14solving. forces the AI to execute instead of
- 10:17genuinely thinking. The context engineering way
- 10:20is much simpler and faster. Tell Claude the result.
- 10:24Dramatically improve the website loading speed.
- 10:26Tell it the reason. Users are dropping off on
- 10:29mobile devices. And add your constraint. Keep
- 10:31the visual design completely unchanged. Then
- 10:34you step back and let the machine work. You let
- 10:36Claude inspect the complex code base on its own.
- 10:39You let it suggest a strategic approach before
- 10:41you approve any changes. You are guiding the
- 10:44advanced model, not micromanaging its keystrokes.
- 10:47Rather than front -loading instructions, you
- 10:49are front -loading your actual intent. This philosophy
- 10:52also applies to how you handle specialized tasks.
- 10:55Move highly specific workflow tasks into dedicated,
- 10:59isolated skills. You load those specific skills
- 11:02only when they are actually needed. For example.
- 11:05You might have complex video editing formatting
- 11:07instructions. You should keep those securely
- 11:10inside a dedicated video skill. You definitely
- 11:14should not load them while building a simple
- 11:15website. It sounds obvious, but people leave
- 11:18these instructions active everywhere. They bloat
- 11:21their workspace with irrelevant data constantly.
- 11:24It goes back to that deep fear of prompt drift.
- 11:27We just leave things turned on in the background
- 11:28just in case. But keeping the file lightweight
- 11:31requires some ongoing behavioral maintenance.
- 11:34How often should you update this lightweight
- 11:36file? You should review it regularly, treating
- 11:39it as a dynamic asset that evolves. Treat it
- 11:42like a living document. Prune it whenever project
- 11:44goals shift. That is the absolute best way to
- 11:47maintain optimal context management. We will
- 11:50be right back after a quick word from our sponsors.
- 11:52And we are back to the deep dive. We have designed
- 11:56the ideal lightweight setup in theory. We know
- 11:59how to front load intent and use progressive
- 12:01disclosure. But to get there, We need to do some
- 12:04deep cleaning. We need to diagnose and clear
- 12:07out the hidden junk. That hidden junk is actively
- 12:10slowing down your system today. It is costing
- 12:12you actual money and computational speed. The
- 12:15source nodes walk through a brilliant real -world
- 12:18audit process. This is incredibly practical for
- 12:20anyone currently using cloud code. It all starts
- 12:23with one simple, powerful terminal command. You
- 12:26just open your command line terminal and run
- 12:28slash doctor. That command triggers an automatic
- 12:31deep inspection of your setup. It generates a
- 12:34comprehensive report showing configuration issues
- 12:37and recommendations. The findings from the source's
- 12:40real -world audit were honestly fascinating.
- 12:43The user's installation was generally healthy,
- 12:45but it had hidden baggage. First, the system
- 12:48found a completely unused plugin called token
- 12:51-weather. It had absolutely zero recorded usage
- 12:54in the system logs. It was just sitting there,
- 12:56waiting to consume tokens for no reason. The
- 12:59audit also found 14 distinct cloud -synced plugins.
- 13:02Those synced plugins had a massive combined skill
- 13:05listing attached. That implies they might be
- 13:08using context silently in the background. The
- 13:10audit also caught a bad terminal path configuration
- 13:13error. And it found a leftover entirely outdated
- 13:17installation executable. That old executable
- 13:19was taking up 239 megabytes. It is amazing what
- 13:23piles up in the dark when you aren't looking.
- 13:26It really is a pervasive issue for most developers.
- 13:28It is like checking the trunk of your car. You
- 13:31look in there before a long cross -country road
- 13:34trip, you find heavy junk you don't need dragging
- 13:36you down. Yeah, you have a heavy bowling ball
- 13:39and some old textbooks hiding in there. Exactly.
- 13:41It ruins your vehicle's overall fuel efficiency.
- 13:44That is what these hidden plugins do to your
- 13:46context window. Every wasted token costs you
- 13:48money and slows down response time. To see the
- 13:51exact fuel efficiency, you use the next important
- 13:54command. You type slash context directly into
- 13:57your terminal prompt. This reveals the precise
- 13:59token breakdown of your current active session.
- 14:03The numbers from the audit test are very revealing
- 14:05to look at. The total context usage was 93 .8k
- 14:10tokens. That is about 9 % of the 1 million token
- 14:15maximum window. Now, look closely at where those
- 14:18tokens were actually going. The core system prompt
- 14:21used around 2 .5k tokens. Custom agents used
- 14:26about 1 .9k tokens. But the really interesting
- 14:29part was the detailed skills breakdown. The developer
- 14:33setup had 205 skills actively installed. Those
- 14:38active skills were eating up 9 .9k tokens. And
- 14:42contrast that heavy load with the available MCP
- 14:45tools. They had 614 complex MCP tools available.
- 14:50But those hundreds of tools were taking up zero
- 14:52tokens. Zero tokens. because they were brilliantly
- 14:55unloaded using the progressive disclosure method.
- 14:58That is the ultimate mathematical proof of concept
- 15:01right there. 600 powerful tools cost you absolutely
- 15:04nothing to keep ready. Right. 200 active skills
- 15:07cost you nearly 10 ,000 tokens constantly. It
- 15:10clearly shows why context engineering is so desperately
- 15:13needed today. So the final crucial step is the
- 15:17actual cleanup phase. But you cannot just blindly
- 15:20delete everything you see in the report. No,
- 15:22you need a highly methodical approach to the
- 15:24cleanup process. You actually ask Claude to carefully
- 15:27audit the setup for you. You give it a very specific
- 15:30targeted prompt to investigate further. You ask
- 15:33it to identify outdated, duplicated, or totally
- 15:37unnecessary instructions. You ask for the exact
- 15:40configuration files involved in the cleanup.
- 15:42And you importantly ask for a reasonable estimate
- 15:45of the token savings. In the test audit, Claude
- 15:48found significant potential context savings.
- 15:51It estimated saving roughly 6 to 7k tokens per
- 15:54session. That is a massive chunk of processing
- 15:57power handed back to you. But the most important
- 15:59rule is requiring your own manual approval. You
- 16:03tell Claude, do not delete anything until I explicitly
- 16:05approve. Right, because some instructions look
- 16:08unnecessary but actually protect vital workflows.
- 16:11You have to manually verify everything before
- 16:13committing to the final deletion. And after you
- 16:16clean it up, Check slash context one more time.
- 16:19You want to verify the estimated savings actually
- 16:21materialized in the system. But looking at the
- 16:24raw numbers raises a valid strategic question.
- 16:27Is the 1 % context usage from those active skills
- 16:30really worth deleting? Absolutely. Even a tiny
- 16:33amount of irrelevant context pulls focus from
- 16:36your main goals. Exactly. Small leaks sink the
- 16:38ship. Every wasted token degrades the AI's focus.
- 16:41It is all about maintaining that sharp, unyielding
- 16:44computational focus. Let's take a step back and
- 16:48look at the big picture here. We have covered
- 16:50a lot of technical ground in this deep dive.
- 16:52We really did. We started with Anthropic bravely
- 16:55deleting their core prompt. We explored progressive
- 16:58disclosure and managing those lightweight .md
- 17:01files. And we walk through the audit process
- 17:04using the terminal commands. The core theme here
- 17:06is incredibly consistent throughout every single
- 17:08topic. Context engineering isn't about simply
- 17:11deleting useful necessary information. It is
- 17:14about ruthless, uncompromising focus on what
- 17:17actually matters. It is the realization that
- 17:19actively protecting your AI is crucial. Protecting
- 17:23it from reading irrelevant information is absolutely
- 17:26paramount. It is just as important as giving
- 17:28it the right data up front. You want to give
- 17:31the model a clear, unobstructed runway to operate.
- 17:35If you use Claude Code, you should take action
- 17:37on this today. Open your terminal when you have
- 17:40a free moment this afternoon. Run slash doctor.
- 17:43and then run slash context immediately after
- 17:46that. You might be genuinely shocked at what
- 17:49is dragging your AI down. See what hidden legacy
- 17:52instructions are burning up your valuable processing
- 17:54tokens. You know, reviewing all this data leaves
- 17:57me with one final thought. Anthropic proved something
- 18:00genuinely profound with their recent system update.
- 18:04Removing 80 % of an AI's core rules didn't hurt
- 18:07it at all. No, it performed just as well, if
- 18:10not better, without that heavy baggage. It raises
- 18:12a fascinating, somewhat uncomfortable question
- 18:15about ourselves, doesn't it? How many outdated
- 18:17system prompts are we running in our own minds?
- 18:20How many assumed rules could we delete today
- 18:23without losing a single step?