Decluttering Your AI Setup: Optimising Claude Code and Codex

VideoCURTTutorial

Constantly switching between AI environments like Claude Code and OpenAI Codex often leads to accumulated dead skills, outdated memory files, and conflicting instructions that consume context windows. This video presents a structured method to audit past usage, consolidate instructions around AGENTS.md, isolate project contexts, and convert complex tools into lean Markdown playbooks.
Playing loads YouTube (youtube-nocookie.com).

Key points

  1. The bloat problem: Accumulating experimental skills, obsolete memory files, and conflicting instruction files (claude.md vs agents.md) exhausts token limits before work even starts.
  2. Script-based audit: Rather than feeding hundreds of past chats into an LLM, the model writes a script to parse 90 days of JSONL logs for actual tool invocations and user correction signals.
  3. Standardising on AGENTS.md: With Claude supporting AGENTS.md alongside Codex and Gemini, cross-tool rules can be maintained in a unified standard rather than duplicated files.
  4. Scoped context architecture: Isolate multiple businesses or clients using nested AGENTS.md files in subdirectories, preventing context pollution across projects.
  5. Playbooks over permanent skills: Instead of installing dozens of niche skills, tacit knowledge is captured into dedicated Markdown files (e.g. launch.md) that the agent inspects only when relevant.
  6. Automated upkeep: Scheduled maintenance tasks (such as Claude's /schedule) automatically flag and prune abandoned hooks and unreferenced files.

Why it matters

Unchecked accumulation of custom rules and third-party skills inflates token consumption, creates rule collisions, and actively degrades the reasoning performance of frontier models.

Analysis

Mark Kashef identifies a common pain point in modern AI agent workflows: tool sprawl and context bloat. The recommended script-based audit technique avoids the expensive anti-pattern of passing massive conversation histories into LLM context windows. By consolidating around AGENTS.md and shifting from heavy skill installations to lightweight on-demand playbooks, developers can maintain model portability across Claude, Codex, and Gemini while keeping token usage minimal.

Transcript

Show the full transcript (4,085 words)
If you've been building or using an AI operating system for a while now, then odds are it's a mess. And it's likely not your fault, either. Over the past year, you might have gone from Lovable, to Claude, to Codex, and then back to Claude. And along the way, you installed every skill, every top trending GitHub repo, you let it all accumulate, and now you have a pile of assets that don't work together. And on top of all this, even when you use frontier models, they still ignore your rules, say they're done when they're actually not, and most importantly, burn through your entire token limits in a snap of a finger. So in this video, I'm going to show you how you can take your workspace of chaos and bring order to it. All right, so just a few months ago, AI operating systems, or the term AIOS, became all the rage. But after I've been on dozens of calls with founders, I keep seeing the same pattern over and over again. So here's an example of a hypothetical, but realistic version of an operating system that I see all the time, and this is the clean version, where you'll have a series of agent.md files, a series of memory files, one called Memory number one, number two, final, then the real memory. And then you'll have a hodgepodge of different markdown files, a soul.md that used to be used for an open Claude or a Hermes, and then everything lives in one melting pot. And the real crux of the issue is that you end up having a bunch of half-built bridges, where you built a content operating system, a launch operating system, a growth operating system, and we'll go through some actual examples that I've seen on calls with actual founders and what they're looking to build. But because of the sheer volume of the number of things that get dropped every single week, the endless GitHub repos that go on trending, that grab your attention away from what actually matters and makes you money, you end up having an empire of files, and you basically have an AI operating system that is occupied by the AI slop monster. And one of the biggest culprits for this is this constant migration from model provider to model provider, where in general, most of us are very fickle. I have no loyalties to Claude, Codex, and even if Gemini wakes up one day and is actually a passable model, and I move over there, I'll always go where I'm treated best, and I'm sure many of you are the same. But the cost of all of the junk that you have on your computer as a result of running tests, building things without actually looking at what it's doing, having all of these temporary versions of files running on your computer that never get deleted, is you have a very bloated infrastructure, and you might have something like an Obsidian from months ago, back when, again, it was very sexy and it was all the rage, and now you let it sit idle, and a lot of the files within Obsidian are expiring or are expired or are stale, and then you end up with hundreds if not thousands of files that live outside of Claude and Codex on top of the memory files and all the other junk that you have within those actual folders themselves. And then when you combine this all together, you blow your context window before you even send a single prompt. But realistically, we should be able to go from something like this, to something like this, just by using prompts and auditing what you already have. Now this is the part of the video where you'd expect me to give you some huge comprehensive prompt to run your audit, but realistically, you don't need that, because we do have models where all you have to do is explain exactly what needs to be audited and against what reference point and what framework, and it'll take care of it for you. All you'd really have to say is something like this: "I switch between Claude Code and Codex all the time. Look through my whole setup in both and tell me what's working, what's dead weight, and what's missing. That includes my skills, rules, instruction files, settings, plugins, connected tools, agents, and every project I run as its own system. Don't guess what I use. Check my last 90 days of conversations in both tools. Don't read them one by one, because that's too slow. Write a quick script that counts what I actually used and finds every time I had to correct you, then work from that summary. If it helps, split the work between helpers running at the same time." Now this is the section that I want you to pay attention to because it is a bit more nuanced than you might have seen before. Typically, I would ask Claude or Codex to spin up a team of sub-agents to go through all the conversations we've had in the past, to actually read them end-to-end, and analyze all the tools I used, all the difficulties that I had, etc. But you could have hundreds if not thousands of conversations where this would add up pretty quickly. So instead of that, I actually ask it to write a quick script, and this script can look for certain keywords that are very adjacent to something like me pushing back on Claude, me frustrated with Claude, or it can actually go through the entire JSONL files, and I'll show what this might look like on screen, where you can pinpoint certain tools being called or not called, and you can pinpoint that through a script. And then I tell it to tell me what I rarely or never use, and whether to delete it, combine it, or start using it again. What rules are outdated, repeated, or conflict with each other, including where my Claude and Codex instructions don't match. What I have set up in one tool but not the other, and how to keep both in sync from one place. Number four and five, go through things like what settings, automation, schedule tasks, or elements of my projects seem to be holding me back versus pushing me forward. And instead of you acting like you're reading a markdown file, you can ask it to create it as a web page, so you have that visual element to go through it, and actually make sure that whatever it's telling you to remove, or what recommendations it's giving you, actually make sense. So around 30 minutes later, we get a report that looks like this, and it goes through all the messages that I've typed, the top 10 things that we want to change, the most, and some things I'm surprised by looking at them right now. So I have eight dead sound hooks, this is from way back in the day when I used to use Claude Code when it first came out, and I wanted it to make a pinging sound when it was done, because there was no remote control, there was no additional way to do that through notifications. So you never know what might be hidden from a prehistoric time of using these tools. Now based on going through all the conversations between both Codex and Claude, it basically said that I should put all of my writing rules, all of my removal of AI-isms, slop-isms, all in one shared files that both tools can load. And then as you go down the list, it goes through things where it tells you, you have a bunch of random junk files, and these are probably taking gigabytes, if not terabytes of data on your computer. And then it will score each area so you can see exactly where your problem lies, and I promise you, if you do this, and then you use do a schedule, that could be a scheduled task in Codex, or a /schedule in Claude, and you have it run this report, and ideally, remediate the majority of things that don't need your consent, let's say it's removing dead files that you haven't used in seven months, assuming they're not super important, and you'll have this self-improving, or at least self-cleaning system that doesn't end up bloating over time or accumulating a lot of dust. And then as we go down, we can see every single rarely used skill, many of which you'll see here are Obsidian, because I stopped using Obsidian a while ago. If you run something like /insight, which is an older mechanism that you can use to reflect on all of your conversations, it's helpful, but it's not as helpful at telling you what to delete versus what to add. And when it comes to rules, especially if you're less technical, or you don't have as much time to invest in Claude Code and you've been watching videos taking the transcript, telling Claude, "Go do this," and it's creating these skills or rules for you, you'll notice that you'll have rules that conflict between Claude and Codex. So if you end up taking a task and offloading it, for whatever reason, it might not execute the way you expect. And all of the rest here are things that you can quickly scan, and for the most part, you should be at peace with giving it the ability to go through and prune your entire systems, so you can remove a lot of the additional information and noise that's causing the issues you're probably facing. Now one cool thing that's been added to the Claude desktop app is after you run this review, using my prompt, you'll get a recommendation to run the low-risk configuration cleanups. Now you could take a look at it and say, you know what, go ahead with everything except for X, Y, and Z, but you can run this right away and nine times out of 10 when I've run this testing the prompt, it gives you things that don't have a very big blast radius. And one important thing is if you take a look at context, even with scanning both environments and all the rules and skills, just because we did it in a slightly more efficient way, we're only using a third of our current context window. Now that was a way to get things more efficient in one shot, but this problem will come back if you fall for the exact same traps every single time. Now it's one thing to be able to clean your workspace and it's another one to clean your habits. If you are someone that falls for FOMO and always feels like they need to know what is this 1% change in the way that skills work that I have to watch this YouTube video and update and tweak my skills, this is for you. You'll see things like "Stop doing this and start doing that." "Paste this one thing into Claude and you'll never run into limits again," and it will also solve world hunger and world peace. Or my least favorite and the one that most people fall for is "This repo will solve Claude, Code, Codex, and Gemini's number one problem." And when you actually look at it, that's not really solving a core problem, or you don't need to install it. You could literally run an entire job, you could make it a part of the prompt where you say, "Go and refer to this repo for this specific task," but you don't necessarily have to download that skill and add it to your heap of other skills that are pretty much in a graveyard. And you end up looking something like this, where you stack a bunch of skills that individually are very helpful, but in aggregate, one, they overlap, two, they actually have mixed signals, and three, you probably don't update them to latest versions, so over time, you forget about them. And as you forget about them, they start steering your agents in the wrong way ever so slightly. Now let me give you an analogy to quickly drive this home. Imagine you're sailing from west to east and you're going from somewhere like New York City all the way to Glasgow. And for whatever reason, you change your bearings, you went one degree in the wrong direction. One degree on its own might seem like absolutely nothing, but by the end of it you'll be somewhere completely different. So although it's tempting to constantly give in to the latest and greatest and staying on top of every new model, every new framework, every new skill, every new technique, every new prompting change, if that comes at the cost of you maintaining and upkeep-ing what you've built, then you might not drift by just one degree. You might drift by five, 10, 15 degrees and you'll notice that in every single session, and you'll spend a lot of time and tokens in that process not making any progress at all and just spinning in circles. So instead of paying attention to this kind of stuff, what you should pay attention to are the slight nuance changes that happen that make it that much easier to be nimble and model agnostic. A really good example is when Anthropic finally made it so that Claude can respect and look for an agents.md versus a claude.md. Up until now, if you wanted to work in Claude and Codex, you'd need a claude.md and an agents.md. Now Gemini also uses a version of agents.md, so an agents.md would work for both of those providers, but you were missing that final piece. Now you could write one agents.md, one set of skills, one set of rules, and find a way to have it applied to all of them. Now to give this some more color, I'm going to walk you through two actual examples of founders that I've recently sat with and what their AI operating system looked like before and after. So this first person, let's call her Sarah. And Sarah runs not just one but multiple businesses where each business has its own set of voices, its own set of content, and its own set of projects that need to be executed. So what she was suffering from is something like this, where she went from Claude to Gemini back to Claude to Codex then back to Claude again, and you end up having a claude.md, an agents.md, a Gemini, and then in between there was a quick transition to Hermes agent which she kind of reeled back and went back to the normal model providers. So the first core problem is you have all of these different files competing to give instructions as soon as you open your brand new session in Claude, Codex, Gemini, etc. And then we have 15 skills from nine different tutorials, only three of them were actually relevant in driving the business forward. A lot of the rest were just things that were recommended on YouTube, and she felt the need to download them because they seem great on their own, but she didn't actually take it, created a derivative of it that fits perfectly into her stack. And then on top of that, she has an Obsidian, and in that Obsidian are 1400 notes. Around 10% of them are actually relevant to today's work, and you can imagine in the future this will rot to 5%, to 1%, and so on. And last but not least, we had a global claude.md, and if you don't know what this is, a claude.md obviously will give you instructions that are loaded at the runtime of starting a session. If you make it global, then every single runtime, irrespective of the project, will inherit a lot of those instructions that you'd have to manually override as long as you remember them. The issue is when you don't actually remember them. So this causes things like mixed signals, rules that AI actually doesn't listen to, and a whole host of other problems. Now the after looks something like this, where we pruned and went through all the different files to create one unified agents.md. And realistically, it looks like this, where you have a Venn diagram, the one with three different circles, and once you add the last circle here, assuming you only use three providers, you're going to have things that are in common between all of them. Maybe a skill, a set of rules, instructions that you find an easy way to check off. But you'll have other ones that are specific to that specific workspace, and when you are working with that provider, some of those are stale, some of them are relevant. And the goal again is to unify them so that we don't have anything that's specific to a provider unless that paradigm, that structure, is only available with that provider. And simplifying the rest of the operating system is straightforward. You just create different folders that contain the different parts of the business, the lifestyle, etc., and within those you can also have a nested agents.md, where this is not loaded when you start a brand new session, you only load this agents.md on the outside, or some global agents.md on the outside. And when it comes to optimizing this operating system for all these businesses, it could be as simple as creating one individual folder per line of business. So you'd theoretically use this agents.md as your air traffic control, your pointer, and you would use it to point at each individual folder, and once you're in that folder, whatever language model you're using will read this next agents.md that's specific to what we want to do for fitness in terms of the content, the structure, the script writing, the video editing style, etc. Now I'll take another founder that I worked with and let's call her Beth. And Beth has a completely different line of business. She works in launching and marketing campaigns. Beth is an expert at creating go-high-level funnels, web pages, she runs cold traffic webinars, she's great at Facebook ads and the whole gamut. And this is what her operating system looked like. She had one folder for every client that she had. And for each client, some of them might have skills that are specific to them, some might have agents.md, and some might have absolutely nothing. And after admitting to watching tens of YouTube tutorials, she had two second brains, and she was using neither of them, so she had to depend on her actual one. And I would say the worst defense is she had so much tacit knowledge about what it is that makes her great at her profession, and she didn't take the time to brain-dump all of that and have Claude and Codex use let's say the Claude Code Guide agent, which is a sub-agent that specializes in reading the Anthropic documentation to tailor and help you massage your workspace to work perfectly with Claude models, and the same thing with the OpenAI docs skill, where if you're using Codex, it can go read up on the latest and greatest best practices. So when you tell it, "Here's my business, here's what I do, and here's my goal," it can take all of that to help you marshal a good plan to optimize your workspace accordingly. So the result was a crossing of wires where many times the launch assets for client A would accidentally seep into client B and vice versa. And this is what the after looks like, where once again, we have one unified agents.md, we have a new folder that's called playbooks, where we took a full brain dump. We had an one hour dictation where she went through the exact steps of how do I start, ideate, create the first version of a funnel, what does it look like to get someone on a cold webinar, what do we do on that cold webinar, imagine mapping out every step, but doing it just through a dictation. We then were able to create two simple files like launch.md and webinar.md and emails.md, and instead of creating skills, we could have the AI reference these specific files anytime that there's a task where it's pertinent to check it. And when it comes to clients, we just created a simple clients folder that had client A, B, C, etc., and each one, just like before, could have another nested agents.md that gives more information to contextualize what we're doing for this client, how it differs from others, and the specific skills, rules, etc., that are pertinent to those specific domains. So hopefully those two basic examples show you how elegant and simple the solution could be to taking a workspace that is holding you back to one that allows you to do what you need to do and focus on working on the business versus working in the business. Now one thing I'll leave you with is this three-step framework that you can use to help protect your existing workspace and ideally your mindset to intentionally have tunnel vision and only focus on what matters. When you see that next model or next repo, instead of immediately pulling for the link and downloading it and then using it for two days like a shiny toy and then throwing it into your toy box you never revisit, you can do this. When you see something new and you want to import it into your sacred space, you can ask, "Is this thing going to be needed or helpful on every task, or the most of my tasks?" If you didn't have it, would you do what you're doing today worse? Which would beg the question typically, is there a way you can emulate it? Can you go from using a skill and downloading it to literally pointing your AI at the skill and saying, "Hey, there's one thing in here that might make you work better on X. Can you scan the skill and just update the one instruction that might be that additional alpha?" Sometimes a lot of these skills all boil down to one simple line of instruction that you could use to take your AI to the next level. The next is when it comes to scope. Is this only useful sometimes? If so, it could make sense to load it certain times versus others, so it might not be a global skill, it might be a very specific skill, rule, or asset that is pulled once in a blue moon. And last is really the maintenance piece, which is kind of running that scheduled job using the prompt I showed you earlier in the video. As we get better and better models, I can guarantee you will need less skills and less rules. You'll have an increasingly more powerful dragon that doesn't need as much in terms of leash to keep it controlled. And if you know that, the job is to be proactive about it, so you can actually focus on getting the incremental benefit of these better models versus always having to fight with Claude, Codex, whatever language model of choice and not actually making the progress you're looking to make. And obviously I'm going to give you that prompt that I showed you along with a little guide that you can feed your AI of choice to help it help you better decide what is worth cleaning or retiring and adding. And as always, if you like content like this and you want access to much more and access to me where I'll send you a personalized loom in my community to help you with your specific problem, make sure to check out the first link down below for my early AI adoptee community. This is literally what I do all the time and I'm an AI consultant, a professor, and this is all I eat and breathe. For the rest of you, if you found this helpful, it's super appreciate a like and a comment on the video and I'll see you all in the next one.

Links and tools from this entry

Summary generated by AI (Gemini 3.8 Flash, 18 October 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Video

    Video:CURT

    Anthropic's Ten Updated Rules for Building Claude Skills

    Jay (RoboNuggets / CURT) breaks down ten new best-practice rules from Anthropic's updated guide for building Claude skills with modern models such as Claude 5.5, highlighting modular context structure, token efficiency, and deterministic guardrails.

    AI & LLMs· Tutorial

  • Video

    Video:AI News & Strategy Daily | Nate B Jones

    Agent Skills: Why Blindly Installing Them Fails and How to Build Them Properly

    Nate B Jones argues against indiscriminately downloading agent skills from repositories, explaining how skill bloat, vague descriptions, and instruction conflicts degrade AI agent performance. He details how loading mechanisms work and promotes building inspectable, focused skills.

    AI & LLMs· Opinion

  • X post:Joe Devon

    GPT-6 Astra: Streamlining Skills and AGENTS.md in Codex

    Joe Devon suggests running a Codex audit on existing skills and AGENTS.md files for GPT-6 Astra, citing an article by Eric Provencher on eliminating bloated instructions carried over from earlier models.

    8.6kbookmarks680.8kviews

    AI & LLMs· Resource

  • X post:PostHog

    The Evolving Role of AGENTS.md and CLAUDE.md Context Files

    This discussion explores the effectiveness of using context files like AGENTS.md or CLAUDE.md to guide AI coding assistants. While some developers find them essential for project-specific instructions, others argue they often become technical debt that grows stale and hinders model performance.

    1.1kbookmarks48kviews

    AI & LLMs

  • Article:Anthropic

    How Claude Code Retains Project Context: CLAUDE.md and Auto Memory Explained

    Anthropic outlines the memory architecture of Claude Code. Because every session starts with a clean context window, the CLI tool relies on two complementary systems: user-defined CLAUDE.md files for explicit instructions and an auto memory feature that records learnings from user feedback.

    AI & LLMs· Resource

  • Repository:coleam00/skills

    Cole's AI Skills: Modular Skill Files for Coding Agents

    The GitHub repository 'coleam00/skills' provides a collection of 33 practical skills designed for AI coding agents such as Claude Code. Instead of maintaining a monolithic 2,000-line CLAUDE.md instruction file, each skill resides in a standalone folder with a SKILL.md file and is loaded on demand. The set revolves around a standard development cycle: prime, plan, implement, validate, review, commit, and PR.

    482starsPython

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.