Every Claude Code Concept Explained In 21 Minutes

English

Transcript

00:00:00It feels like there's a million and one things you need to learn in order to master clod code.
00:00:04But in today's video, I'm going to narrow it down to 10 that actually matter.
00:00:08We'll start with the foundations and we'll end with some of the heavy hitters,
00:00:11things like loop engineering and dynamic workflow.
00:00:14So no matter where you are in your clod code journey,
00:00:16we're going to touch on something important to you.
00:00:18But first, let's start with concept number one, models and effort level.
00:00:22So when it comes to models and effort level,
00:00:24it's important to understand that bigger isn't always better.
00:00:27You're just going to pay more.
00:00:29And this is illustrated very well here in this DeepSuite benchmark.
00:00:33DeepSuite is a benchmark that's all about long running agentic tasks.
00:00:36So think complicated projects where clod would have to run hours and hours to complete.
00:00:40And we see a similar trend across all the models.
00:00:43As I go from low to medium to high, I am getting better outputs.
00:00:48And the cost is pretty linear as well.
00:00:50At low, I'm at $3.76 on clod fable high.
00:00:54And at high, I'm now at $9.18.
00:00:58I'm now doing 69% in terms of completion, up from 60%.
00:01:03So it kind of makes sense.
00:01:05However, as I go from high to extra high, I only go up 1% in terms of my output.
00:01:10Yet the cost has gone from $9.18 to $13.
00:01:14And from extra high to max, I'm going up $9.
00:01:18Yet I'm still getting the same output.
00:01:20And we see that same sort of trend with Opus as well as Sonnet.
00:01:23So should we always just be on the high setting?
00:01:26Not necessarily.
00:01:27This is for DeepSuite tasks.
00:01:28These are complicated tasks.
00:01:29You probably aren't doing something this complicated.
00:01:31So rule of thumb, I suggest staying on Fable 5 Medium for most of your tasks.
00:01:37And if you're running into usage limits when it comes to Fable, I would switch to Opus 5 Medium.
00:01:42I've also found that Opus tends to be less verbose and complicated on a medium setting as well.
00:01:47So that's sort of a good rule of thumb to go forward with.
00:01:50And if you feel like you are running into more complicated tasks, you then have headroom to push up to high on either of these models.
00:01:56Generally, I would stay away from Sonnet 5.
00:01:58Now, before we move on to the next concept, a quick word from today's sponsor, me.
00:02:02I just released a brand new Cloud Code Masterclass.
00:02:06And it is the number one way to go from zero to AI dev, especially if you don't come from a technical background.
00:02:11So if what we're talking about here interests you and you want to go way deeper on real projects, this is for you.
00:02:17You can find it in the pinned comment inside of Chase AI+.
00:02:20Now, concept number two is prompting.
00:02:22And this is something everyone overcomplicates because there's really two things you need to do.
00:02:26One, you need to ask yourself, am I starting a new project?
00:02:30Well, if you are and you're about to begin something brand new, what I want you to do is go into plan mode.
00:02:33This is going to fix a lot of your issues because it's going to let you and Cloud Code get on the same page.
00:02:39And speaking of getting on the same page, the second part of prompting Cloud Code is what actually needs to go into the prompt.
00:02:45And it isn't anything big.
00:02:46The things that need to go into the prompt are one, the actual goal.
00:02:50What is the end state you are trying to achieve here?
00:02:53You don't need to tell Cloud Code, okay, I need you to act as a senior software engineer.
00:02:57You don't need to give it every single step.
00:02:59You don't even need to give it every single constraint.
00:03:01We need to, at the very least, just give it a goal.
00:03:03And secondly, you need to tell it to ask you questions.
00:03:08If you just do these two things, your prompting will be totally sufficient because by you telling
00:03:15Cloud Code to ask it questions, just as if we're in plan mode, it's going to start figuring out
00:03:19what your blind spots are, right?
00:03:21What are the constraints we need?
00:03:23What are the steps we need to take?
00:03:25Specifically, what is the end goal?
00:03:27And so instead of expecting Cloud Code or Cloud Code expecting you to show up with all those answers,
00:03:32if we have a back and forth with Cloud Code due to these questions, we will get to a pretty good place.
00:03:37And if you don't do this and you don't have it ask questions, what's going to happen is
00:03:41Cloud Code is just going to sort of revert to the mean, and that's how you just get generic outputs.
00:03:46So throw it in plan mode, tell it your goal, and tell it to ask you questions.
00:03:51And once you're on the same page and you're happy with what it's created, then you can begin executing.
00:03:56Now, concept number three is token in context management.
00:04:00What am I talking about here?
00:04:01Well, I'm talking about your context window.
00:04:03If you do forward slash context inside of Cloud Code, we'll bring this up.
00:04:06Or if you press the little button down here inside the desktop app, we will see this as well.
00:04:09It says context window, and it shows me 18% out of one million.
00:04:13What does all this mean and why should you care?
00:04:15So what is the context window?
00:04:16This is referencing that particular chat you're having with Cloud.
00:04:20And so in that particular one, I have used 183,000 tokens out of a one million token context window.
00:04:27So what are tokens?
00:04:29Well, tokens, to make this oversimplified, this isn't exactly how it works, but it works for the mental model.
00:04:34One word equals one token.
00:04:38Okay, so every single word you give Cloud Code and every single word you give back, think of that as a tokens.
00:04:43And so those accumulate over time.
00:04:44And so far, we have sent and been given cumulatively 183,000.
00:04:50And we have a budget of one million tokens to spend until its brain is essentially too full and needs to start over.
00:04:56Now, this is important for a few reasons.
00:04:58One, in terms of cost.
00:04:59The more this fills up, the more it's going to cost me to use Cloud Code in that particular session.
00:05:05Secondly, the more this context window fills up, the worse Cloud Code performs.
00:05:11There isn't a specific number, but a good rule of thumb is at about 30% or so of your token window, you can begin to see performance drop off somewhat linearly.
00:05:20So what does that mean for you?
00:05:21Well, that means anytime you're at about 30%, 40%, 50% of this context window, you need to start asking yourself, do I need to start a new chat?
00:05:29And to start a new chat, we can do forward slash clear.
00:05:32That will wipe everything we've talked about so far.
00:05:34I can also do forward slash compact, and that will create a summary of everything we talked about and begin a new chat session.
00:05:40Or you can also just open up a new window and begin there.
00:05:43Remember, if you've been working on some sort of project, it's created a bunch of code.
00:05:46At any time you start a new chat, Cloud Code can take a look at it.
00:05:48So it's not like you're starting completely from scratch.
00:05:51Now, concept number four is Cloud.MD and memory.
00:05:54So what is Cloud.MD?
00:05:56Remember, .MD just means markdown.
00:05:57We're just talking about a text document here.
00:06:00This is a document that Cloud Code is going to read at the beginning of every single session.
00:06:04So if you have a Cloud.MD file that says, I want all of your responses to rhyme, well, guess what?
00:06:10Every single time it gives you a response, it's going to make sure it rhymes.
00:06:13Stupid example, but the concept is this file includes any sort of instructions you always want Cloud to follow.
00:06:20And because it's injected inside of every single session, whatever you put in here better be important.
00:06:25I want you to think of it like it's invisibly added to every single prompt you give it.
00:06:30So do you need a very complicated, robust Cloud.MD?
00:06:33Like a lot of people have been talking about over the last few months.
00:06:36The answer is no.
00:06:38Less is more here.
00:06:39So be very careful about what goes into this file.
00:06:41Secondly, we have both a global Cloud.MD and a project Cloud.MD.
00:06:48So there is a Cloud.MD file that lives inside your actual Cloud Code folder that is always present.
00:06:55No matter where you use Cloud Code, no matter what project, no matter what file, this is being read.
00:06:59So even more important that we don't fill this up with garbage.
00:07:02But also on the project level, so let's say you created a new folder and you're working on your website,
00:07:07that also, that individual project also has a Cloud.MD.
00:07:10So let's say you did have specific instructions you always want injected into all of your prompts for that particular project.
00:07:16Well, this makes sense.
00:07:18But understand this global one also goes through all of these projects.
00:07:22So be very wary about what you put in here.
00:07:25Less is more.
00:07:26And if you're not sure if your Cloud.MD makes a lot of sense, well, Claude recently released an updated version of Ford slash Doctor.
00:07:35So if I just run Ford slash Doctor, Claude is going to take a look at all of your Claude.MDs and see if they're bloated and offer some suggestions.
00:07:43Now, concept number five is skills.
00:07:45And this is one of the most important of the 10 we're going to talk about today.
00:07:47Because it allows Cloud Code to do certain things in certain ways, usually improving its capability in some particular domain.
00:07:55For example, front-end design.
00:07:57This is the front-end design skill from Anthropic themselves.
00:08:01And it's just a giant prompt telling Claude code how to go about doing front-end design.
00:08:07It's just a prompt at its most base level.
00:08:09Skills are just prompts.
00:08:10Some can get a little bit more complicated than that.
00:08:13But this is the same thing as if I copied this whole thing.
00:08:16I jumped in the Claude code and I pasted it in there.
00:08:19I could do that every single time I wanted it to create some sort of front-end design.
00:08:24Or I can turn that into a skill.
00:08:27Instead, just do something like forward slash front-end design.
00:08:31And it's now invoked or used the skill.
00:08:33So doing forward slash front-end design, same exact thing.
00:08:36It's pasting that whole thing in there.
00:08:38And so the first type of skill are these sort of skills like front-end design.
00:08:40It makes Claude code better at something it usually kind of sucks at.
00:08:43The second type of skill are kind of like automations.
00:08:45It's where we tell Claude to do a series of things in a specific order.
00:08:49For example, I have a skill called my morning Intel skill.
00:08:54And what this skill does is it tells Claude code, hey, what I want you to do is I want
00:08:58you to go ahead and check YouTube for the latest videos over the last 24 hours, Twitter, Reddit,
00:09:03and my Gmail.
00:09:04I'm looking for stuff related to AI news over here.
00:09:07I just want to know what's going on in my inbox.
00:09:09And I want you to synthesize all this information and turn it into a report.
00:09:12Well, instead of literally spelling that out every single time verbatim, I've done it once.
00:09:17I've done it a handful of times manually.
00:09:19And then I told Claude code, let's turn that into a skill.
00:09:23And because it's now codified, I know that it's going to do everything in the exact sequence I want it to.
00:09:28And I don't have to worry about getting something weird at the end.
00:09:30Now, there are a million one skills out there that you can use and download and point Claude code at,
00:09:35and it can start integrating it into your workflows.
00:09:37But the most powerful thing to do is create your own custom skills based on how you actually work.
00:09:41The easiest way to do this is to invoke the skill creator skill, which comes with Claude code.
00:09:46If for whatever reason you don't see that, just tell Claude code, hey, I want to download the skill creator skill.
00:09:50And then all you have to do is tell it to take a look at what you've been doing over the last 30, 60, 90 days with Claude.
00:09:56It has all your logs.
00:09:58And tell it to create some skills based on the things you already do.
00:10:02Because it can take a look at how you actually work inside of Claude code and start turning those into skills you can easily use.
00:10:07That's one of the easiest, most powerful ways to use this feature.
00:10:10Now, concept number six is all about plugins.
00:10:12I'm talking MCPs, CLIs.
00:10:14I'm talking about giving Claude code the ability to interact with outside applications, whether that's something like Gmail, Notion.
00:10:20Whatever, I want to have Claude code to be able to talk to these things, operate them.
00:10:24And I just sit there in front of Claude code and it does all the work for me.
00:10:27Now, inside of the Claude code desktop app, you will often see these referred to as connectors and plugins.
00:10:31And I also mentioned MCPs and CLIs, so it can get kind of confusing.
00:10:35But really, they're all kind of the same thing.
00:10:38Underneath the hood, when it comes to plugins and connectors, it usually is either an MCP or a CLI.
00:10:43So don't get too sort of like spun up or confused when it comes to the terminology.
00:10:48All you need to know is that for virtually every single major piece of software out there these days,
00:10:52there is a Claude code connector that allows Claude to actually use it.
00:10:56And if you can't find it in the connectors directory, you can probably find it on GitHub by searching for MCP or CLI.
00:11:02For example, if I wanted to get my hands on the Playwright CLI and I just Google Playwright CLI, it will take me to this page.
00:11:08It tells me how to install it, but it's really as simple as me copying the URL, hopping inside of Claude code, pasting the URL and saying, install this CLI.
00:11:18Now, the question then becomes, how do I know which CLIs and MCPs exist and how do I know which ones make sense for my project?
00:11:25Well, guess what?
00:11:27Claude will tell you.
00:11:28So when you are about to work on some sort of project, and this kind of goes back to our concept of prompting, one of the questions you probably want to ask,
00:11:35and you better tell Claude to figure it out for you is, are there MCPs or CLIs or connectors that make sense for this project and will make it easier for me to work?
00:11:44It can go out on the web.
00:11:45It can do a web search.
00:11:46It can install for you.
00:11:48And frankly, at this point in Claude code's lifespan, there's essentially no reason where you should be taking outputs from Claude code and like copying and pasting them somewhere else or going through all the steps yourself.
00:11:58There's probably a CLI or MCP for that.
00:12:00So when in doubt, simply ask Claude if it exists.
00:12:03So concept number seven is hooks, and this is sort of leaning into an automation piece.
00:12:07Hooks are just rules that Claude follows where anytime X happens, Y happens.
00:12:12So for example, I have a hook where anytime Claude completes a task, so I'm just, I prompted to do something in it.
00:12:18It finishes it.
00:12:18It plays a noise.
00:12:19So if I'm in the terminal and I tell to do A, B, and C, I get an actual audible noise anytime it is done.
00:12:25This is great for me because oftentimes I'm tabbed out and it lets me know, hey, you need to get back to work.
00:12:30Now to set up a hook is really just as simple as prompting it.
00:12:32So you can literally say something like, can you create a hook for the play noise every single time a task is completed?
00:12:39And then it will set up that sort of hook for you.
00:12:41If you have no idea what hooks you should run, I suggest doing something similar to skills.
00:12:45Have Claude Code take a look at what you've been doing the last 30, 60, 90 days and see if it can suggest any hooks that make sense for you.
00:12:51Now, concept number eight is automations.
00:12:53And this goes hand in hand with skills.
00:12:55Remember this skill, this morning report, this morning Intel thing, it checks social media, checks my email, synthesizes it and creates a report.
00:13:01Well, do I want to manually invoke this every single time I'm using Claude Code?
00:13:04Of course not.
00:13:05I want this to run automatically every single day.
00:13:09How do I do that?
00:13:10Well, we're inside the desktop app.
00:13:11It's actually really simple.
00:13:12If we just go up here to the left and go to routines, I then go to new routine.
00:13:17I have the option to do local or cloud.
00:13:19You're almost always going to want it to be local because if it's in the cloud, understand it's on Anthropics servers.
00:13:26So if you're using some sort of skill or running some sort of automation that needs to interact with things on your computer, that can be tough.
00:13:32And then you simply fill out this form.
00:13:33So that would just be like morning Intel or morning reports to description, my morning brief.
00:13:41And then for the instructions, we don't even really have to give an instruction because we've already codified this task into a skill.
00:13:47So it would just be like run, you know, slash morning brief.
00:13:52And that's it.
00:13:53That's sort of the power of skills because we do all the work there at the skill.
00:13:58Like we've actually manually, you know, made sure it works.
00:14:00Now we can automate it.
00:14:01And it's really this simple.
00:14:03From there, it's just like, hey, what do you want the settings to be?
00:14:06I suggest having it be auto.
00:14:07You can say what sort of model you want.
00:14:10Do you need Fable 5?
00:14:11Probably not.
00:14:12I think Opus Medium is sort of like a good middle ground.
00:14:14Select the folder and then you set the schedule and you hit create and that's it.
00:14:18In terms of routines, you can set up to, I believe, 15 every single day now.
00:14:22But you also have the ability to have Cloud Code essentially run a scheduler like on your computer.
00:14:27So your actual computer kicks it off if it's some sort of script versus routine.
00:14:32So understand you aren't necessarily limited to sort of that 15 routines a day.
00:14:35So for concept number nine, we're back here with our morning report.
00:14:39But this time we're talking about it in the context of loop engineering.
00:14:43So what is loop engineering?
00:14:45Well, it's just how we set up autonomous loops inside of Cloud Code that ideally are trying
00:14:51to reach some sort of specific success criteria.
00:14:53We have some sort of goal and it should be sort of self-improving in that regard.
00:14:58So when it comes to loop engineering, there's a few sort of things we need to keep in mind.
00:15:01One, every single loop needs some sort of trigger.
00:15:05Now, this can be a number of different things.
00:15:06This could be triggered based on a specific event or it can be time-based.
00:15:09In this case, it's time-based.
00:15:11Remember, we're setting this daily and we're going to say this runs every morning at 8 a.m.
00:15:14Number two, it needs to obviously be executing some sort of task.
00:15:18So what is the task this is doing?
00:15:20Well, it's scrapes YouTube, scrapes Twitter, scrapes Reddit, grabs emails, synthesizes, and
00:15:25creates a report.
00:15:26So that's pretty self-explanatory.
00:15:28It needs to do something.
00:15:29Number three, it needs some sort of success criteria.
00:15:34Now, this is where stuff gets tricky because what defines success here?
00:15:39Well, success is a report that is quote-unquote good.
00:15:44Well, what makes a good report a good report?
00:15:46Well, perhaps we want it to get a specific number of sources from YouTube.
00:15:50Maybe we want a specific set of insights from Twitter, so on and so forth.
00:15:55Like that's an objective measure.
00:15:56And maybe we also include something like a human review every single time where I can
00:16:01quickly grade it on a scale of one to 10.
00:16:03So if we are creating a loop where it's something like this, where it's very subjective as to
00:16:08what makes it good, loop engineering can get a little tougher.
00:16:12Now, imagine instead we had some sort of automation where we were creating some sort of Python
00:16:17application.
00:16:17And the success criteria, the ultimate goal was to make it as fast as possible.
00:16:21We wanted it to run in one second.
00:16:23Well, pretty easy for us to grade every single iteration of that application, right?
00:16:27Well, if the first time was at two seconds and the next time was at 1.9 seconds, clearly
00:16:31we're moving in the right direction and there's some things we can tinker with.
00:16:34Here, it's a little bit more difficult.
00:16:36And step number four is we need some way to log our data.
00:16:41That way we continue to make improvements.
00:16:43Remember with that Python thing?
00:16:44Well, if it continues to loop around over and over and I can see what I've changed to make
00:16:48it faster, well, every single time we loop, we can change something else.
00:16:52With something like this, right, it's still going to loop every single day, but two things
00:16:57need to happen here.
00:16:58One, we probably need to grade it, sort of that human grader, that human in the loop that
00:17:03scales it from one to 10.
00:17:04And then two, we need to log that.
00:17:07So when this thing runs again every single morning, before it creates the report, what
00:17:13I want it to do, sort of at this step, is, oh, let's take a look at the log.
00:17:17Let's see what the past reports have looked like.
00:17:19Let's see what's caused it to be graded in nine or a 10 and try to replicate that.
00:17:24That is sort of the big picture method when it comes to loop engineering.
00:17:28So we create something, we give it a trigger.
00:17:31It has a specific task.
00:17:33Most importantly, we need to define what success looks like, and then we log it.
00:17:37And so if it runs over and over and over again, as long as it can take a look at the ultimate
00:17:41goal and see what past iterations look like, you've essentially executed loop engineering.
00:17:46And this can be as complicated or as simple as you want it to be, but that is essentially
00:17:50the basis of self-improving loops.
00:17:53Last but not least, we have dynamic workflows and ultra code.
00:17:57So ultra code is an effort setting like you see here.
00:18:00And when ultra code is set, you're essentially giving cloud code permission to take whatever
00:18:04task you're giving it and turn it into a dynamic workflow.
00:18:07What exactly is a dynamic workflow?
00:18:09Well, a dynamic workflow is a JavaScript script that orchestrates sub-agents at scale.
00:18:15So this means using dynamic workflows.
00:18:17I'm not just spawning like five or 10 sub-agents.
00:18:20I'm potentially spawning hundreds of sub-agents and I'm doing it in a way that is customized to
00:18:26your particular problem.
00:18:27And here are six examples of potential dynamic workflow architectures.
00:18:31Number one is classifying act.
00:18:33We give it a task.
00:18:34We have a sub-agent that acts as the classifier.
00:18:36Perhaps we're giving it a ton of different tasks and it's going to push them off to different
00:18:40specialized agents, depending on how it's classified.
00:18:43For number two and three, we have fan out and synthesize and adversarial verification.
00:18:47Now, this is what the built-in deep research skill does.
00:18:52So you know what deep research is.
00:18:54You've done this before on the web app.
00:18:55Well, did you know it's actually a dynamic workflow inside of cloud code?
00:18:58This is something I can invoke at any time by simply doing forward slash deep research.
00:19:03And what it does is a combination of these two things.
00:19:05It's going to fan out and use 20, 30, 40, 50 sub-agents to find information on the web.
00:19:11And then it's going to combine that with adversarial verification to take a look at everything else,
00:19:17at everything that was collected in that fan out and synthesis and say,
00:19:20hey, this claim makes sense, this claim doesn't.
00:19:23And then after it's gone through the verification, then it gives you a final synthesized report.
00:19:29So something like deep research combines multiple types of architectures.
00:19:33This isn't an exhaustive list of what you can see, but just right there, we see how it combines them.
00:19:38Other things are like generate and filter or tournament style,
00:19:41where it does a series of attempts and then we have outside judges that take a look at what wins
00:19:45till you get a final winner or like loop until done,
00:19:48which, hey, looks very similar to loop engineering.
00:19:51Now, the thing with dynamic workflows in UltraCode is that it is very, very expensive.
00:19:55So if I'm running deep research and I'm on Fable,
00:19:58it's going to automatically spawn all those sub-agents, all 100 of them, as Fable agents,
00:20:03which can be very, very expensive.
00:20:04However, you aren't a slave to the default settings.
00:20:07Anytime I use one of these things, so if I do forward slash deep research,
00:20:11I can say only use Opus agents.
00:20:14I can say only use 20 agents max.
00:20:17So you do have some control here as to what gets spawned.
00:20:21But if you don't give it any sort of, you know, parameters, understand you could burn through
00:20:26and you will burn through millions and millions of tokens and just crush your usage.
00:20:30So use this sparingly.
00:20:33In general, I think deep research is a great tool.
00:20:36Even if you use something like Fable, it's probably going to use on the $200 a month plan,
00:20:40somewhere between like 3% to 5% of your total weekly usage.
00:20:44And if you just kind of want UltraCode to go crazy and create a custom workflow based on your problem,
00:20:49I would suggest maybe wait till the end of the week when usage is about to reset so you don't burn through everything right away.
00:20:55But it is a very powerful tool that is a great option if you're dealing with something very complex.
00:21:01So those are 10 of the most important Cloud Code concepts that you need to understand if you want to master this tool.
00:21:07As always, let me know what you thought about all this.
00:21:10Make sure to check out Chase AI Plus if you want to get your hands on my brand new Cloud Code masterclass.
00:21:15And besides that, I'll see you around.

Description

⚡Master Claude Code, Build Your Agency, Land Your First Client⚡ https://www.skool.com/chase-ai 🔥FREE community🔥 https://www.skool.com/chase-ai-community 💻 Need custom work? Book a consult 💻 https://chaseai.io Lets breakdown the Claude Code concepts that actually matter if you want to go from beginner to pro ⏰TIMESTAMPS: 0:00 - Intro 0:22 - Models + Effort 2:20 - Prompting 3:56 - Context Mgmt 5:51 - Claude.md 7:43 - Skills 10:10 - Plugins, CLIs, + MCPs 12:03 - Hooks 12:51 - Automations 14:37 - Loop Engineering 17:54 - Dynamic Workflows RESOURCES FROM THIS VIDEO: ➡️ Master Claude Code: https://www.skool.com/chase-ai ➡️ My Website: https://www.chaseai.io #claudecode

Community Posts

No posts yet. Be the first to write about this video!

Write about this video