Modern Creator
Cole Medin · YouTube

Anthropic Just Dropped a Masterclass on Building Agent Harnesses (for Large Codebases)

Cole Medin turns Anthropic's high-level blog post into a working repo — seven concrete components for the AI Layer that wraps Claude Code.

VIDEO OF THE DAY★ ★ ★1stWINCOLE MEDINMay 23, 2026
Posted
3 days ago
Duration
Format
Tutorial
educational
Views
30.5K
761 likes
Big Idea

The argument in one line.

The harness — the CLAUDE.md files, hooks, skills, LSP, MCP servers, and sub agents wrapped around your coding agent — determines your results in large codebases more than the underlying model does.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • A developer or team lead who already uses Claude Code on a codebase with 20k+ lines and keeps hitting context or navigation limits.
  • An AI tooling champion at a company who's been asked to standardize how engineers use coding agents across teams.
  • A solo builder who started with a simple app and now finds that the prompting tricks that worked at 5k lines fall flat at 50k.
  • An engineer comfortable with CLAUDE.md basics who wants to add hooks, path-scoped skills, LSP, and sub-agents to their setup.
SKIP IF…
  • You're new to Claude Code entirely — this assumes you already know how to run it and have written at least a basic CLAUDE.md.
  • Your codebase is small and self-contained; the harness overhead Cole describes pays off at scale, not for a 2k-line side project.
  • You work in Python or a language where LSP tooling is already mature and you've already wired it into your editor workflow — the LSP section won't add much.
TL;DR

The full version, fast.

The harness around a coding agent matters as much as the model itself — and building that harness deliberately is the difference between Claude flailing in a large codebase and navigating it like a senior engineer. The framework has seven components: lean, layered CLAUDE.md files that load conventions only where they apply; self-improving stop hooks that propose rule updates after every session; path-scoped skills that inject workflows only when relevant; a language server protocol wrapped as an MCP server for symbol-level search; exploration subagents that offload discovery to a separate context window; and a plugin that bundles the whole setup. The practical conclusion is that teams should designate an owner to build and standardize the AI layer before rolling it out broadly, so engineers get consistent results from day one.

Members feature

Chat with this breakdown.

Modern Creator members can chat with any breakdown — ask for the hook, quote a framework, find the exact transcript moment. Unlocks at T2: refer 3 friends + add your own API key.

Create a free account →
Chapters

Where the time goes.

00:0001:04

01 · AI Coding in Large Codebases

Pattern-interrupt cold open: tutorials are a dime a dozen, but nobody covers large codebases. Names Anthropic's post and promises a demo repo + plugin.

01:0401:57

02 · What We're Covering

Table of contents: seven AI-Layer components Cole will walk through. Each maps to one Anthropic strategy and one concrete demo.

01:5703:00

03 · How Claude Code Navigates Today

Claude Code uses agentic search — grep + folder walking, no embedding index. The tradeoff: works best when starting context is curated.

03:0004:19

04 · The AI Layer

The thesis: the harness matters as much as the model. Codebase now has three parts — code, tests, AI Layer (CLAUDE.md hierarchy, hooks, skills, plugins, LSP, MCP, subagents).

04:1908:40

05 · Lean & Layered Global Rules

Keep CLAUDE.md short — long rule files degrade performance. Use subdirectory CLAUDE.md files that load progressively as Claude walks into folders. You can also init Claude inside a subdirectory to scope the working tree.

08:4010:31

06 · Sponsor: JetBrains Academy

Mid-roll sponsor read for JetBrains Academy AWS skill paths — learn in PyCharm, deploy in prepaid AWS sandboxes.

10:3115:22

07 · Self-Improving Hooks

Hooks aren't just guardrails. A Stop hook can run a separate headless Claude session at end-of-turn to inspect the diff and propose CLAUDE.md updates while context is fresh. A SessionStart hook can pull per-team context (git state, Confluence docs).

15:2218:16

08 · Path-Scoped Skills

The skills parameter most people miss: paths. Skills only activate when Claude touches matching files. Demo: api-add-route skill scoped to services/api/**. Clean mental model — global rules are conventions you must follow; skills are workflows you sometimes run.

18:1621:57

09 · LSP & MCP for Symbol Search

Wrap a language server as an MCP so Claude can search by symbol (definition / references) instead of grepping strings. Critical once a repo passes ~100K LOC where grep gets slow and token-inefficient.

21:5723:56

10 · Subagents for Exploration

Split exploration from editing. Send research/web/codebase-map tasks to subagents with their own context windows — the primary session keeps a clean context for the actual edits.

23:5626:19

11 · Claude Plugin & Getting Started

Bundles every component into one install: /plugin marketplace add <path> then /plugin install helpline-ai-layer@helpline-tooling. Ships stop hook, explorer subagent, codebase-search MCP, and an example scoped skill.

26:1928:10

12 · AI Layer Ownership

Anthropic's closing advice: identify a small champion team (or a hybrid PM/engineer) to build the AI Layer in a quiet investment period before rolling out org-wide. Cole pitches enterprise training, asks for the like + sub.

Atomic Insights

Lines worth screenshotting.

  • The harness matters as much as the model — the ecosystem built around Claude determines results more than benchmark scores.
  • CLAUDE.md files thousands of lines long hurt coding agent performance; studies confirm that overwhelming context degrades output quality.
  • Claude Code uses agentic search — no indexing, no RAG — navigating codebases the way an engineer would with grep and directory inspection.
  • Subdirectory CLAUDE.md files load automatically when Claude edits files in that folder, giving you layered conventions without bloating the root context.
  • Initializing Claude Code inside a subdirectory restricts its scope by default, keeping it focused on the relevant slice of the codebase.
  • A stop hook running a headless Claude session after every turn can propose CLAUDE.md updates while the context is still fresh.
  • Skills scoped to specific file paths only activate when Claude is working in the relevant directory — a way to enforce workflow conventions at the file-system level.
  • Path-scoped skills distinguish workflows from conventions: CLAUDE.md carries the rules, skills carry the repeatable processes for each task type.
  • Grep alone becomes slow and token-inefficient in codebases over six figures in lines; an LSP-backed MCP server enables symbol-level search instead.
  • Dispatching exploration to sub-agents keeps the primary context window clean — summaries come back, not hundreds of thousands of tokens of raw analysis.
  • A start hook can pull team-specific documentation from Confluence at session open, giving every developer the right context without manual setup.
  • The AI layer is now a third structural component of every codebase, alongside code and tests — teams that skip it get inconsistent results.
  • Building out a shared AI layer before broad rollout prevents the pattern where every developer evolves a separate, incompatible set of conventions.
  • An LLM performs best when it has enough starting context to know where to look — the whole AI layer is really about curating that context upfront.
  • Stale CLAUDE.md files that don't evolve with the codebase are a real failure mode, not a theoretical one — the stop hook exists specifically to prevent this.
  • The plugin marketplace in Claude Code lets you install a full AI layer — hooks, skills, LSP MCP, explorer sub-agents — into any existing repo in two commands.
Takeaway

Build the Harness, Not Just the Prompt

The AI Layer

The harness matters as much as the model — a structured AI layer of rules, hooks, skills, and search tools is what separates functional Claude Code use in large codebases from failure.

01AI Coding in Large Codebases
  • Agentic search via grep and folder walking works best when Claude starts with curated context about where to look.
02What We are Covering
  • Seven AI Layer components map one-to-one with Anthropic strategies and concrete implementation demos.
03How Claude Code Navigates Today
  • Claude uses agentic grep-based search with no embedding index, so starting context quality determines navigation quality.
04The AI Layer
  • The harness matters as much as the model — every codebase now has three components: code, tests, and the AI layer.
  • The AI layer includes global rules, hooks, skills, MCP servers, LSP, plugins, and subagents.
05Lean and Layered Global Rules
  • Long CLAUDE.md files degrade performance; keep them to core conventions, tech stack overview, and key commands.
  • Subdirectory CLAUDE.md files load progressively as Claude moves into folders, scoping rules to where they matter.
  • Initializing Claude inside a subdirectory locks its working tree to that area and loads only relevant rules.
06Sponsor: JetBrains Academy
  • JetBrains Academy skill paths let you code in PyCharm and deploy to real AWS sandboxes without needing your own account.
07Self-Improving Hooks
  • A Stop hook runs a separate headless Claude session at end-of-turn to propose CLAUDE.md updates while context is fresh.
  • A SessionStart hook can pull per-developer context like git state and team-specific docs before the session begins.
  • Treating hooks as continuous improvement tools rather than just guardrails keeps your AI layer from going stale.
08Path-Scoped Skills
  • Skills scoped to specific file paths only activate when Claude touches matching files, avoiding irrelevant context load.
  • Global rules are conventions you must follow; skills are workflows you sometimes run — the distinction keeps both lean.
09LSP and MCP for Symbol Search
  • Wrap a language server as an MCP server so Claude can search by symbol definition and reference, not just string grep.
  • Once a repo passes roughly 100K lines, grep becomes slow and token-inefficient — symbol-level search is the fix.
10Subagents for Exploration
  • Send exploration and research tasks to subagents with their own context windows to keep the primary session lean.
  • Dispatch tasks like web research or codebase mapping to subagents and bring back only the summary you need.
11Claude Plugin and Getting Started
  • The plugin bundles a stop hook, explorer subagent, codebase-search MCP, and a scoped skill into two install commands.
12AI Layer Ownership
  • Assign a small champion team or hybrid PM/engineer to build the AI layer in a quiet period before org-wide rollout.
  • Standardizing the AI layer prevents developers from building inconsistent setups and prevents early disappointment with the tool.
Glossary

Terms worth knowing.

Agent harness
The ecosystem of rules, tools, and context built around an AI coding model that shapes how it navigates and edits a codebase. The harness is distinct from the model itself and often has more influence on output quality.
AI layer
A third structural layer added to a codebase alongside code and tests, consisting of global rules, skills, hooks, MCP servers, sub-agents, and an LSP — everything that gives a coding agent the context and tools it needs to operate effectively.
CLAUDE.md
A markdown configuration file placed at the root or in subdirectories of a codebase that loads instructions and conventions into a Claude Code session. Subdirectory files are loaded automatically when Claude works in that part of the project.
Agentic search
The method Claude Code uses by default to navigate a codebase — using command-line tools like grep and directory inspection rather than pre-built semantic indexes or embeddings.
RAG (Retrieval-Augmented Generation)
A technique where relevant documents or code snippets are retrieved from an index and injected into a model's context before it generates a response. Claude Code's default agentic search is deliberately different from this approach.
Progressive disclosure
A design principle where information or capabilities are loaded only when needed rather than all at once. Applied in AI layers by scoping rules and skills to relevant subdirectories instead of loading everything into every session.
Stop hook
A script that runs automatically when Claude Code finishes a session. It can trigger a separate background process — such as reviewing what changed and proposing updates to the global rules file.
Start hook
A script that runs when a Claude Code session begins, used to inject dynamic context such as recent git history, team-specific documentation, or environment details before the coding agent starts work.
Headless mode
Running an AI agent or CLI tool without a visible interactive interface, typically automated as a subprocess or background job. Used here for the stop hook spawning a separate Claude session to review changes silently.
Skill (Claude Code)
A reusable prompt or workflow definition stored as a markdown file that can be invoked inside a Claude Code session to handle a specific task type, such as adding an API route. Skills can be scoped to activate only in relevant codebase directories.
LSP (Language Server Protocol)
A standard protocol that powers IDE features like jump-to-definition, symbol search, and type hints. Exposing an LSP to Claude Code via an MCP server gives it the same code-navigation capabilities a developer has in their editor.
MCP server
A local or remote server that exposes custom tools to Claude Code via the Model Context Protocol. Used here to wrap an LSP and provide intelligent symbol-level code search beyond basic grep.
Sub-agent
A separate Claude Code instance dispatched from a primary session to handle a bounded task — such as exploring the codebase or researching a topic — and return only a summary, keeping the main session's context window from bloating.
Context window
The total amount of text (code, instructions, conversation history) an AI model can process in a single session. Large exploration tasks that inflate the context window early can degrade the quality of later editing steps.
Claude Code plugin
A packaged set of AI layer components (hooks, skills, MCP server) that can be installed into any codebase with two commands via the slash plugin marketplace, providing a baseline harness without manual setup.
Resources Mentioned

Things they pointed at.

Quotables

Lines you could clip.

00:22
Claude and AI coding tutorials are a dime a dozen, but what people are not really covering nearly enough is how to use these tools to work in large codebases.
tight hook, identifies a market gap in 1 lineTikTok hook↗ Tweet quote
03:16
The harness matters as much as the model.
thesis line, repeated 3x in the video — the whole essay collapses to thisIG reel cold open↗ Tweet quote
03:50
I like to call it the AI Layer. I think that's more descriptive.
the renaming move — Cole's framework lives herenewsletter pull-quote↗ Tweet quote
10:42
Most teams think of hooks as scripts that prevent Claude from doing something wrong. But their more valuable use is continuous improvement.
reframe of a misused primitiveTikTok hook↗ Tweet quote
17:43
Global rules are your conventions. Your skills are the workflows.
perfect distinction phrase, fits in a tweetnewsletter pull-quote↗ Tweet quote
21:02
Once you get like into the six digits for lines of code, you need something like this because grep by itself is gonna be slow and really token inefficient.
concrete threshold — gives the LSP/MCP advice a triggernewsletter pull-quote↗ Tweet quote
The Script

Word for word.

metaphor
00:00Claude and AI coding tutorials are a dime a dozen these days, but what people are not really covering nearly enough is how to use these tools to work in large code bases. That's what I wanna cover with you right now because you probably already have a complex code base or two or three. You've got the apps and platforms that you're building, your second brain.
00:21You have these code bases that are tens or even hundreds of thousands of lines long, and it could be tough to get these coding agents to navigate those larger code bases and work in them effectively. And even if you don't have a complex code base yet, you'll get there, my friend.
00:36You start with a simple idea, a simple code base, but as you evolve that code base, the coding agent strategies that worked before, they fall flat on their face. That's why I'm excited to get into this. Synthropic put out this article just a few days ago, how do you use Claude code to work in large code bases.
00:54And really these ideas apply no matter the coding agent that you are using. And there's a lot of gold in this blog post. So I wanna get into all of this.
01:02They do stay pretty high level in the blog post though. And so I also took all of their strategies and I built them into a demo code base for this video.
01:11So not only are we covering the article, but we're also gonna see concrete examples of all the strategies in action. And I even have a Claude plugin that makes it super easy for you in two commands to take a lot of the strategies that we're covering here and immediately bring them into any code base that you are working on.
01:30And so we'll get to that, but I wanna start pretty high level, share these strategies, and and let's see them in action as well. So Anthropic starts by talking about all of the pretty impressive places where Claude code is currently being used at an enterprise level across multi million line model repos, decades old legacy systems, distributed architecture spanning dozens of repositories.
01:50Basically, they're just making the point here that if you think your code base is too complex for Cloud Code, you are wrong. And then they go into how Cloud Code navigates a code base, at least before we have more of an AI layer. So the tool out of the box, it uses something called a gentic search.
02:08So we're not performing traditional rag or semantic search. There's no code base indexing with Claude code. Instead, it's going to navigate a code base more as an engineer would with command line tools like grep, just looking at the folder structure, using all of the command line tools at its disposal to identify the places for especially a larger code base to pay attention to and where it needs to edit.
02:31And so this is really powerful because then there's no index that you have to keep in sync, but the trade off is that Claude works best when it has enough starting context to know where to look. And so this really gets us into a lot of the strategies that we'll cover here. It's all about how do we curate that context upfront so Claude can navigate a more complex code base effectively, knowing where to actually look based on the request that we have for it.
02:57So that then brings us to the main point of this blog post that really sets the stage for all the strategies. The harness matters as much as the model. A lot of people get really hyper fixated on model benchmarks and they think that tools like Claude Coding Codex, the power really comes from how good the underlying large language model is.
03:16And yes, that matters, but honestly what matters even more is the ecosystem built around the model, the harness. And I like to call it the AI layer. I think that's more descriptive.
03:25It's really everything that they lay out right here with quite a few paragraphs. I also have a nice diagram to make this even simpler. The AI layer is the set of context and tools that you give your coding agent to work on a code base.
03:38And so traditionally, a code base would have two main parts. It would have the code and then it would have the tests.
03:44And so now with the AI layer, we have a third component of every code base introduced. This is everything like your global rules, your skills, your MCP servers and sub agents.
03:56Really every single individual feature of Claude code that gives tools or context, that is a part of your AI layer. And so there's seven things that we have here. Couple you might not be as familiar with like LSP and hooks, but we'll talk about all of that because really each of these seven map to one of the strategies that Claude code covers.
04:16This is where I have a concrete example for each of them. So let's get into this. So the initial strategies that Anthropic covers are all about making it as easy as possible for Claude code to navigate your code base at scale.
04:28And a lot of it centers around the first and maybe even most important part of your entire AI layer, which is your global rules. So take a look at this. They have this visual representation for how often the each part of the AI layer is used throughout a Claude code session.
04:46You can see that most of them are sporadic, like your hooks and skills and the LSP for navigation. We'll talk about all these as well. But your global rules as your foundation, it is dictating the behavior of clog code the entire time.
04:59So you better spend a good amount of time strategizing around your context curation here. And so their first tip is to keep your global rules lean and layered.
05:09Something that I see a lot of people do unfortunately is create these global rule files that are thousands of lines long. That is not a good idea. There are actually studies out there that prove that that can hurt your coding agent performance even if you think that being really specific and comprehensive helps.
05:24You're just gonna overwhelm your LLM with context. You just need core information. What is the code base about?
05:29Give it a little bit of an idea of the tech stack or architecture, for example. I mean, this is just an example that I have in this repo.
05:36Um, then your general conventions and gotchas like what I have right here, commands to run for things like testing and getting the dev server spun up, like that's all you really need. So keeping it lean. And what Anthropic means by layered is you can actually have claw dot m d files in sub directories.
05:54And so I have the main claw dot m d at the root of my repository here. That means that whenever I start a Claude session like this, it is always going to have these rules loaded. But then as soon as I navigate and start editing files in one of these subdirectories, it's also gonna load in that claw dot m d automatically.
06:15So if I start working in the API service for example, I'm gonna load in my core rules or I should say those are already loaded, but then I'm also going to load in the API service rules that I have in this separate claude.md. So I'm building up the list of conventions based on where I'm actually operating in the code base.
06:33It's like the idea of progressive disclosure that we have with Claude code skills. This is really powerful because if you have a massive code base, you're gonna have a ton of conventions, but most of them are gonna be specific to certain slices of the code base.
06:46So let's just load in the conventions we need depending on where we're working. Because whenever you have some kind of GitHub issue or Jira ticket or whatever, hopefully it's scoped to a very specific part of your code base.
06:58And then another thing you can do if you're really confident where you need to work in a code base is you can actually initialize clog code in that sub directory. So if I know for example that based on a Jira ticket or GitHub issue, I'm only gonna be working in the API service, then I can, you know, right click in Versus code, copy my path, and then within here, just for the sake of example, I guess I'm already there, but I can change my directory to that path and then I can open up Claude here.
07:25And the power of this is now this is the current working directory for Claude code. So unless I tell it to, it's really gonna stick to editing files in just this directory. So it'll load the claw dot m d here and then it still will load the root claw dot m d.
07:40So you can see that it does automatically walk up the directory tree and load every claw dot m d. So the root context isn't lost, but we're just honing Claude code in on that part of the code base. And so basically, you're doing the navigation here.
07:54So the rest of their strategies are like, you know, how can you help Claude navigate things effectively? But most of the time, especially if you are an engineer, you know where to start.
08:04Now, you don't know where to start, that's where this strategy comes in. Building up some kind of code based map when the directory structure doesn't do the work. And this usually I put in my global rules.
08:15So I don't have it in this example here. But often what I'll do is I'll have a section that outlines the directory structure, like all the subdirectories, maybe like a brief description of each of them.
08:24That way Claude can help me do the discovery, help me figure out what slice of the larger code base to focus on based on the work that I have. So usually it comes down to Claude's gonna help you figure that out or you're just going to immediately know and initialize Claude code there. The sponsor of today's video is JetBrains Academy.
08:43Now, I've tried a lot of AI courses in the past and most of them have this problem. The way that I'd put it is that the course ends where the real work actually begins. And what I mean by that is you'll go through some material and some really basic exercises, but then you don't get to really deploy anything.
09:00And JetBrains Academy is different with their skill paths. Here, when you learn a concept, you get to apply it to a real project immediately. And so you do your work and go through the lessons in the IDE, and then you get to right away deploy what you've built in AWS sandboxes.
09:17So you start by picking a path. Let's say we wanna do build and deploy custom LLMs with Python and AWS. This seems very relevant right now.
09:25And so we have the course layout here. This is the syllabus, and you can see that each of the sections, it'll open the course in your PyCharm IDE. So we get to go through the material where we're doing all of our coding already.
09:37The AI assistance is built right into the IDE. I can navigate through the lessons and go through all the material right here really easily. And then as I'm doing my exercises, it's just right here in the IDE.
09:47So I get to code as I normally do. And then when it comes time to run and deploy things like the fine tune model that we have in this lesson, we get to do it in an AWS sandbox. This is not a mock.
09:59It is running in the cloud, but it's fully prepaid. You don't need an AWS account. This is what I wish I had when I was learning how to build and fine tune models.
10:08So when you finish a skill path, you have real projects deployed live that you can host on GitHub, talk about interviews, and get hired for. And you have certificates both from JetBrains and AWS to back it up. So if you're looking to build proficiency and credibility with generative AI and LLM engineering, I would highly recommend checking out JetBrain Academy's skill pads.
10:27I'll have a link to them in the description. Cool. So there are some more strategies to cover here like scoping your tests and link commands per subdirectory, ignoring certain files like build artifacts, your coding agent never reads them.
10:39But I wanna move on now to talk about the next part of the AI layer and that is hooks. And you'll see in a second why I wanna cover this right after global rules. So you can use hooks to make your entire AI layer, your entire setup self improving.
10:55This is really really cool. This is part of the goal that I was talking about. So most teams think of hooks as scripts that prevent Claude from doing something wrong.
11:03So a lot of people use hooks like a pre tool use hook to stop Claude from editing in certain directories, removing files or folders, that kind of thing. But their more valuable use is continuous improvement. And so take a look at this.
11:16A stop hook can reflect on what happened during a session and propose claw dot md updates while the context is fresh. Right?
11:25So the the hook runs at the end of the session. And I have a live demo of this. I'll show you.
11:30I actually built out both of these hooks here. And then a start hook can load team specific context dynamically. So every dev gets the right setup without manual configuration.
11:40So based on the role or the part of the code base they're editing, we can have a hook that will even go out to confluence for example and pull documentation for that team, that function, that part of the code base, whatever. So I have actually a pretty basic example of that here.
11:55And so I have a hook and so you can see in my settings dot JSON, this is where I have the start and end hooks defined. So propose Claude dot MD updates for the stop hook and then the session start context for the start hook. And so what this hook does, this is just more of a basic example, is it's going to load context around git.
12:15And so any kind of unstaged changes that I have, like a change to this file here, looking at the git history as well. So take a look at this. If I go into Claude and I start a new session and then I say, what did the start session hook tell you about this session?
12:29Obviously, it's a little cheesy, but just to show you that it loaded the context, we have this orientation here. The working tree is clean. Here are our recent commits.
12:38Right? And so like this is just giving it some context going into like here is what we're currently working on and here is what we worked on recently. And you could extend this, like I said, to pull things from confluence based on the developer that is starting Cloud Code.
12:50There's a lot that you can do here. And then take a look at this. To demo the stop hook for you, I'm going to give a really simple request for something that I wanna change.
13:00Obviously, if I was doing work for real, I go through a more extensive process of planning and implementing and validating. But here I'm just asking it to make a simple change so that I have something to then propose a change to the global rules. Because something really important that you need to do, and you can see that the process actually ran here in order to propose some changes.
13:20Uh, something that's really important to do is as you're evolving your code base, you need to make sure that your rules are evolving as well. It's really, really bad when your claw.md goes stale because you made some changes in the code base where the it kinda, you know, dictates something needs to be added to the global rules or something has to be updated.
13:39And so that's why it's really powerful to have this kind of process that automatically proposes these changes. So take a look at this. This hook runs whenever Claude stops.
13:49So whenever it's done with its turn. So you saw that terminal pop up for a little bit. It runs a separate Claude session in headless mode to look at these changes, look at the global rules, and propose if anything needs to be tweaked.
14:02And so it outputs that in a markdown document. Take a look at this. I have my Claude markdown review.
14:08And so we have the reflection that just ran right now. Are the two areas that were touched. So it's gonna look at those subdirectory global rules as well.
14:16And here it decided no changes needed. Adding a trial enum value follows the existing model only convention. So the thing that we really care about at a high level still holds up based on these changes.
14:26And so maybe it's not the best example because it didn't decide to change anything, but I think it's also really powerful because usually we don't need to change our Claude code or claude.md conventions. That's especially why we keep these files so lean. But maybe for example, I could say, you know, make a change that would require updating the claud.md.
14:45So I'll come back and see what it does with this. And so there we go. We had to change something bigger in the billing service and now in our markdown review, it is recommending making an update to the second bullet in the claude.md for our billing service subdirectory.
15:00Pretty neat. So now we can take these recommendations and we can action on it ourselves.
15:04We can have a conversation with a separate Claude session to make these changes. It's up to you how you want to take this forward. The power I'm just trying to show you here is we can have this self reflection process constantly running in the background, making these suggestions that we can, uh, you know, just action on when we're actually ready to.
15:22So the next part of the AI layer that Anthropic focuses on here is skills. And you probably know what a skill is. They've been blowing up all over the Internet the past few months.
15:31It's really like the main way to extend the Claude code right now with new workflows and capabilities. And so, like, this is an example of a skill right here for adding API routes in this code base. Really a skill is some kind of set of steps, some kind of process reusable prompt that you have for Claude code.
15:50And these are really important in large code bases because you're gonna have dozens or maybe even hundreds of task types. Like this would apply to a task type of building an API endpoint. And so not all expertise needs to be present in every session, which is the same reason why we have different clon dot m d files in subdirectories, which there is definitely some overlap here that I'll talk about in a second.
16:12And so skill solve this through progressive disclosure. So we're offloading specialized workflows and domain knowledge and we load it when we actually need it.
16:21So that way we're not bringing in prompting and workflows for things that don't apply to the current task at hand. And so when we define a skill, we have the name and the description. The description is what is given to the coding agent right away.
16:35And if it decides like, okay, based on the description, I should use the skill, then it'll read the full skill dot m d file. I've talked about skills a lot on my channel already. But the parameter that most people don't know about, and this is what Anthropic talks about right here, we can make it so that skills can be scoped to specific paths so they only activate in relevant parts of the code base.
16:58Like we know that this process for adding API routes that we want to be very repeatable, it only applies when we're gonna be reading and editing files in the API services directory. And so we can scope it there. Really, really powerful.
17:11It's a way to basically enforce it like when we touch this part of the code base, we're going to bring this convention, this workflow into this session context. And so like I said, there is a little bit of overlap here with that and the subdirectory claw dot m d files. Right?
17:26Like we're loading this in only when we work here. Same thing when we operate in here. We're also going to read this claw dot m d.
17:34The distinction that I'd like to make is that global rules are your conventions. It's the rules that you need to follow. Like, every route is registered here, for example.
17:43Your skills are the workflows. So we have rules and we have workflows.
17:48So that distinguishment kinda helps me understand the overlap, but really for a lot of these sorts of conventions, you can kinda do it as a skill or a clon dot m d.
17:57The more important thing here is we just wanna scope these conventions and rules to the part of the code base where they actually matter so we're not overwhelming our coding agent with context it doesn't care about. So Anthropic talks about plug ins next, but I'm gonna cover that at the end because I'll show you how to use my plug in to incorporate all these ideas in your own code base.
18:16So let's move on to talk about language server protocols. I'm excited for this because I just started incorporating this into my own Claude code ecosystem. It's really powerful.
18:27Essentially, you give Claude the same navigation that a developer has in their IDE. And And a lot of bigger companies especially build own custom LSPs to really help Claude navigate through their code base effectively.
18:39And so an LSP is something that is really built into any IDE by default. It's the kind of thing that allows you to know like in Versus Code, I can control click here to immediately navigate to the definition for the class that I used in this other file.
18:53So that kind of like type hinting and navigation and highlighting like all that is in LSP. And so essentially with an MCP server, we can give Cloud Code this exact functionality that we as the engineers have in our IDE to make it so that we have better search capabilities than just GREP by itself or can complement some of the tools like grep that are built into cloud code natively just through the CLI commands that it has.
19:21And so what I built here, I'm actually kind of knocking two birds with one stone because they talk about LSP and then talk about MCP servers as a way to extend everything is I built a local MCP server that comes with this code base. It comes with the plug in that I'll cover in a little bit as well that gives Claude code some new code base search capabilities.
19:41And so take a look at this. I'm gonna go into a new Claude session here. If I do slash m c p, you can see that I have the code based search enabled.
19:49There are three tools here to complement the search capabilities that I already have. And so I'm going to paste in a prompt, find every place that monthly total sense is referenced in this repo. And I know that's like oddly specific, but that's the point is we need something very specific to search for here.
20:04And I'm telling it not to use grep just for the sake of the demo. I'm telling it to use a symbol level approach and that's going to key in that it needs to leverage the MCP server that I built here that leverages the language server protocol.
20:17So it's able to do more intelligent searches that it might figure out it needs to if I don't tell it to not use grep or you could just, you know, build in some instructions in your global rules for how you want to use these searches. We can see here that it used my whereas and find references tools in my custom MCP server.
20:34And so here are the results. We have one definition and two references. Pretty cool.
20:39So I I know that like I'm talking about complex code bases here but my demo is kinda simple in the end but I kinda have to have that balance there of like a somewhat complicated code base but still it has to be easy to like parse through and show the results here. But that's an example of using an MCP server to expose a language server protocol.
20:59And really for massive code bases, once you get like into the six digits for lines of code, you need something like this because Grep by itself is gonna be slow and really token inefficient as you're trying to navigate through a code base. This is a lot more of a directed search looking for things like the definitions and references for things like classes and variables.
21:21So that's a quick overview of LSP and MCP and how I use them together. You gotta have some kind of harness to give better search capability to Claude code when you're working in larger code bases. And really, they operate like skills, just use sporadically throughout your session.
21:37So like with skills, we're loading in instructions when we need those conventions or workflows, whatever. LSP, whenever we need to perform those searches to find definitions, references, things like that, we'll call upon the tools. MCP, pretty similar.
21:49Right? Like we need to perform a search, take some kind of external action. We call upon one or multiple tools for an MCP server at that time.
21:58Now the last part of the AI layer that we still have to cover is sub agents. But this one's nice and simple. The the advice that Anthropic has here is simple but still really powerful.
22:06We want to use sub agents to split exploration from editing. So the idea with a sub agent is that we send in a task, like we want to search the web for, you know, best practices for this kind of architecture or maybe to do some kind of code based exploration to find the part of the code base to focus on.
22:26We send in a task and it runs with its own context window. It does all the analysis it needs to and then it returns a summary back to our primary cloud code session to reason about an action on. And these kind of exploration tasks that we wanna give to a sub agent, you can imagine them getting to hundreds of thousands of tokens.
22:47So if we're not using a sub agent and we have our primary Cloud Code session do that web research or code based exploration, by the time we get to the actual editing, we're already gonna have this extremely bloated context window. That's why we want to dispatch the work to sub agents, especially because with exploration, usually all we need is that summary back.
23:06Right? Like, here are the recommendations for the tech stack. Here's a part of the code base we're gonna have to address based on this Jira ticket.
23:12Like, that's the kind of thing that you task a sub agent with. And so I don't actually have that much of a demo here for sub agents because I use them liberally, like, all the time. Especially at start of the conversation, I'll say something like, I want you to spin up three sub agents here.
23:26One to research the database, one the back end, one the front end. Help me figure out how I can add in authentication. I don't know.
23:33I'm just kinda throwing off something off the cuff here, but you have sub agents built into a lot of these coding agents now like Cloud Code and Codex. And so you don't even have to define your own custom sub agents like a lot of people did before. You just send off a request like this and now it's just gonna use the explorer sub agent that we have built into Cloud Code.
23:50And so it takes care of that whole, dispatch, getting the summary back, and everything. Alright. So the rest of the article that we haven't covered yet is really covering a lot of the strategies that I already hit on, like running LSP servers so Claude can search by symbol not by a string, talking about actively maintaining the Claude dot MD files.
24:07So this is where the stop hook comes in to make those recommendations as we're operating with Claude code. The other thing that I wanna hit on here is the plugin that I have for you. So if you go to the read me for this demo repo that I'll link to in the description, I have instructions for taking this to your own code base.
24:26Now obviously some of the things like the claw.md's and the subdirectories are specific to me, But this plugin is going to give you the self improving stop hook, the explorer sub agents, there's more of like a custom sub agent that I built that you can use.
24:38And it's gonna give you the code based search MCP server with that LSP. So you have that whole searching harness. And then I'm going to give you a more generic skill that you can use in a as an example that shows what it looks like to use that path parameter to scope a skill to a certain subdirectory.
24:55So just kinda consider this plugin a starting point. If you wanna like really quickly pull in these things to experiment on your own code base, you can install this plug in on any code base, even one that you already have built out with its own AI layer already. So all you have to do is slash in cloud code slash plug in marketplace ad and then give the path to the repository.
25:15So you still have to clone this repo locally because I don't have this hosted in NPM. So you give the path and then make sure you add the tooling folder at the end. And then you just do plug in install helpline AI layer at helpline tooling.
25:27Then you go through the whole installation process here and then boom, it'll install all these things for you to start playing around with. So that's one way to do it. I just wanted to add a plugin to make it really convenient.
25:37The other way to get started with a lot of the ideas that I have here aside from, you know, reading the anthropic blog post is just to clone this repository, point your Claude code at it, you know, like copy this directory, you know, right click copy path, give this to Claude code and say, hey, these are a bunch of cool strategies Cole shared with me for working with complex code bases.
25:56Help me understand how they work and how I can incorporate it for my code base. That's always the easiest way to really take any repo these days is just give it to Claude code and have it, uh, help you understand it and apply it. So that'd be my recommendation for getting started here.
26:11So I hope that you found these strategies really useful. You can apply them right away to your larger code bases. Even if you had some of these things incorporated already, I hope there were some good golden nuggets for you.
26:22And so the last thing that I wanna end on is talking about some really good advice that Anthropic also gives at the bottom of their article here. It's all about assigning ownership for clon code management and adoption.
26:34And I've been around a lot of companies as I've done my consulting and trainings. I know this is really good advice. Essentially, what they're saying here is you have a an individual or more likely a smaller team to champion the initial build out of the AI layer for your organization.
26:50And so what that looks like is you start with a quiet investment period. You have a couple of people that build out the the rules and skills and the LSP and the MCP servers, the whole AI layer for the organization, and then roll it out to people over time.
27:05And the power of this is you get to create something that's really foundational for everyone to adopt together and then people can get more consistent results with Claude code or whatever coding agent faster so they're not disappointed when they first use the tool. You wanna avoid people being really disappointed when they first use it because they don't have an AI layer and you want to avoid everyone evolving their own separate AI layers when really you want a standard for the organization.
27:30So really, really good advice that they have here. This is also something that I help with. And so I do offer enterprise trainings where I help you build up the AI layer, understand the core methodologies for AI coding and create that standard for your adoption of coding agent tools like Cloud Code.
27:47So definitely, got my email in my bio. Reach out to me if you're interested in that. Otherwise, I hope that these strategies were useful for you.
27:55I appreciate you going through everything here. Let me know if you have any questions in the comments below. Otherwise, if you appreciate this video and you're looking forward to more things on AI coding and Claude code, I would really appreciate a like and a subscribe.
28:07And with that, I will see you in the next video.
The Hook

The bait, then the rug-pull.

Anthropic published a high-level playbook for making Claude Code work in massive codebases. It names seven components but never shows you one. Cole built the whole thing — and renamed Anthropic's "harness" to the AI Layer, the third leg of every codebase next to code and tests.

Frameworks

Named ideas worth stealing.

03:00list

The AI Layer (7 components)

  1. CLAUDE.md hierarchy (lean & layered)
  2. Hooks (self-improving)
  3. Skills (path-scoped, progressive disclosure)
  4. Plugins (bundle distribution)
  5. LSP (symbol-level navigation)
  6. MCP servers (extension)
  7. Subagents (exploration + editing split)

Cole's rename of Anthropic's 'harness' — the third leg of a codebase next to code and tests. Every component maps 1:1 to an Anthropic strategy.

Steal forany AI-coding skill or product positioning
17:50concept

Rules vs Workflows

Clean distinction for the perennial 'is it a CLAUDE.md or a skill?' question. Global rules are conventions you MUST follow; skills are workflows you sometimes RUN. Same scoping mechanic, different purpose.

Steal forany internal taxonomy doc where two tools overlap
04:30concept

Sporadic vs Always-On

Anthropic's diagram shows CLAUDE.md as the only always-on component; everything else fires sporadically. Justifies ruthless trimming of CLAUDE.md and aggressive scoping of everything else.

Steal forcontext-budget framing in any prompt-engineering content
26:05list

Three Phases of Claude Code Rollout

  1. Quiet investment (champion team builds the AI Layer)
  2. First rollout lands (early adopters)
  3. Adoption spreads (org-wide standards)

Anthropic's org-adoption advice — small team builds the harness in quiet before rollout, to avoid both 'disappointed on day one' and 'everyone evolving their own separate AI Layers'.

Steal forany enterprise-AI-adoption sales deck
CTA Breakdown

How they asked for the click.

27:40subscribe
If you appreciate this video and you're looking forward to more things on AI coding and Claude code, I would really appreciate a like and a subscribe.

Soft. Real CTA is buried — 'I do offer enterprise trainings... got my email in my bio' lands at ~26:30 before the like+sub close. No mid-roll CTA. Two soft hooks for the GitHub repo throughout.

Storyboard

Visual structure at a glance.

open — Anthropic post
hookopen — Anthropic post00:00
TOC — what we're covering
promiseTOC — what we're covering01:05
AI Layer diagram
valueAI Layer diagram03:20
harness diagram
valueharness diagram05:27
sporadic vs always-on
valuesporadic vs always-on11:53
stop hook running headless
valuestop hook running headless13:54
CLAUDE.md review markdown
valueCLAUDE.md review markdown15:38
path-scoped skill (skill.md)
valuepath-scoped skill (skill.md)17:25
MCP slash command + prompt
valueMCP slash command + prompt20:14
plugin install in terminal
valueplugin install in terminal25:10
three phases of rollout
ctathree phases of rollout27:17
Frame Gallery

Visual moments.