Anthropic just released a master class on coat. So I spent seven hours going through the entire course and compiled everything into this one video. I also included lessons I learned from spending well over five hundred hours inside of cloth coat. So if you really watch this video until the end, you will be ahead of 99% of people. Now everything we're going to cover in this video is from the official Anthropic course. So this isn't some random vibe code from Twitter. This is the advice from the experts who actually created cloth code. So here is a quick introduction to the entire course. It's organized into four sections. First off, what is a coding assistant? Then why cloth code? Then how to work with cloth code as your partner? And then how to get the most out of cloth code? And each section builds on top of the last. So if you really watch until the end, you'll have a better understanding of clothed code than 99%
of developers. First, let's clarify what is a coding assistant. Now, yes, obviously, it's a tool that writes code, but Anthropic goes a lot deeper here. They explain the actual behind the scenes of how a coding assistant works. And you can see that on the top right. The coding assistant includes a language model, which has access to a set of tools, and the language model then has these three steps. First, it needs to gather context. Second is to formulate a plan, and third is to take an action, and then repeat these until the task is done. Now if you look at steps one and three, gather context and take an action, these cannot be done just by the language model reasoning or thinking. The coding agent needs to interact with the outside world, also known as the environment, with what we call tools. So to gather context, maybe it uses a read file tool to read some files. To take an action, maybe it uses edit file tools to edit the code of the files. But either way, it cannot do this just by thinking, just by answering. No. It needs relevant useful tools to execute these actions. This means that to have a strong coding assistant, you need both a powerful LLM, a strong AI model, and also lots of powerful tools that the AI model can use. And here are just some of the tools that Clothco has. You can see that agent can launch a subagent to handle a task. Bash, run shop command, edit, edit the file, and so on and so forth. It has lots of built in tools, which is what makes Clothcode very, very powerful. And here are a few examples to show you just how powerful Clothecode really is. First, we have this optimization task that Clothecode was tasked to do with the following prompt. Run benchmarks for the Chalk library. For any result that looks slow, find the root cause and fix it. Keep in mind that this is a super popular library with nearly 400,000,000
weekly downloads. So you would think that this is already very optimized, but Clothcode actually managed to find serious improvements. For one specific use case, it even managed to find a 3.9 x improvement in speed in a library that literally tens of millions of applications use. The second example is a data analysis task. In this situation, Clothecord was given a bunch of data structured like this CSV file, and this is a user streaming platform, so maybe something like Netflix. And the task was do an analysis on the data in the streaming CSV file. And even more, it was tasked to do this inside of a Jupyter notebook to produce results like this. So it didn't just give you answer like, here is how many users there Here is the typical avatar. No. It created visual graphs,
charts, and different data analysis to spot where there is a churn and what the data actually looks like. The third example of just how powerful Clothcode is is this UI styling task. So it is what the original prompt was. Improve the design of this app, focus on the chat interface and the header. And then it was given display right MCP server. So if you're not sure with Playwright, it's a end to end testing framework developed by Microsoft, and it was given an MCP tool that allows Cloud to control the browser, take screenshots, and do different actions like a front end developer could. So Cloud Code managed to run-in one site and open the local host, so it opened the website on the other side. And actually, thanks to the Playwright MCP, see what it's like and improve the UI just like a human developer would, making sure that each change it made, it's tested it, took a screenshot again, and made sure that it actually looks good. Not just the code is correct, but that the design feels good. Oh, yeah. And not to mention, you can also use Clothcode in your CICD pipeline to automatically review every single pull request on GitHub. So, yeah, Clothcode is very, very powerful, and learning how to use it can be one of the best investments for your software career. Alright. So let me show you how to actually set up Cloth Code. First, type in Cloth Code into Google. Click on the official link from anthropicclaw.com,
and then we need to copy this curl command. So copy that. Boom. Type in terminal. Open any terminal in your computer. Paste it in and hit enter. This will install the latest version of Cloth Code on your machine. And there we go. Cloth code successfully installed, version two point one point twelve. But if you're watching this later, you might have even newer version. So now to launch it, all you have to do is type in Cloth into any terminal on your computer, and this launches Cloth code. First, it asks you if I wanna trust this folder, So I do yes. And just like that, it's open, and this is Cloud Code. We can literally start using it just like this. So you don't need anything else. You don't need an IDE. You don't need any fancy UI. You can just use it in a terminal, and the user interface is very, very friendly. Guys, you can type in plain English. You don't need to be a developer. You don't need to be a DevOps expert. You can type in plain English and use Cloud Code. This is why it's the most popular coding tool in the world right now. Now, usually, it's a good idea to run Cloud Code in a specific folder. So I'm gonna c d into the folder of Vectel by startup slash code slash startup. Boom. There we go. And if I do l s, you can see that this is correct file. I have a back end, front end, a bunch of other stuff, so I'm in the right folder. And now I can type in cloth, and this is smart because now I'm not afraid of cloth messing stuff up in other directories
on my machine. Instead, everything only happens inside of this directory right here. I So would highly recommend you create a specific folder for Clothcode and run it in that folder. Now the next thing that Anthropic teaches us in this course is the Clothcode setup. So after you install Clothcode, the very first thing you wanna do in any project is run the slash init command, and especially if it's a existing codebase. This will have Cloth analyze your entire codebase and create a Cloth dot m d file, which will act as the system prompt for your Clothcode and includes a summary of your architecture, key files, conventions, and anything else that is relevant Clothecode performing well. Now the best part about Clothecode. M is that it's included in every request. So you don't have to copy paste it or anything like that. Clothecode will always know what project it's working with. So let me show you. I'm gonna switch back to the terminal, and I'm gonna do slash in it. This is a prebuilt command that will initialize the new Cloth dot m d file. So let's hit enter. And now Clothecord will begin analyzing my entire codebase and see what's happening, see what's inside, what type of files we have, what the structure is, what the tech stack is, what features this app has, and it will put everything relevant into a single concise markdown file. And as you can see, Clothecore is using lots of different tools. Like, wow. In the first ten seconds, it's, like, fifteen,
twenty different tools. Very impressive. And it does this to get the necessary context to actually create a useful CloDotMD file. And, this is running just in my terminal. You don't need to install Crustr, Versus Code, or anything else. You just need to open a terminal, which every single computer has. So now it's asking for permission to create a file CloDotMD because this is a more of a risky operation than just reading files. You know, creating files can actually be dangerous at at times, so I'm gonna approve it. I'm gonna hit enter and do yes, and there it is. It wrote 111 lines to ClawDotMD
to create this system prompt of a file, and all of that in less than a minute. If we wanna see what this file actually looks like, we can open any text editor and just load it up. Boom. And here is the 111
lines that ClothCode wrote. The file provides a guidance to ClothCode when working with this code in its repository about Vectl. So, yes, Vectl is AI powered task management productivity app. Correct. It's a tech stack, essential commands, architecture.
Yeah. I mean, maybe I shouldn't be showing you all these guys, hey. Yeah. I'm I'm not gonna show you the last section on environment variables, but the rest you can see. So, yeah, it analyzed the entire code base and created a very comprehensive
100 line summary of it that any AI agent can read and will instantly know what this code base is all about. Real quick, if you're enjoying this video, please consider subscribing. It's completely free, and it will cause more videos about AI coding to be recommended to you. So if you want to be serious about AI in 2026, please take the two seconds, go blow the video, and click subscribe.
Appreciate it. Alright. The next thing Anthropic teaches us in this course is adding context with at and hashtag. So you can use at to mention specific files you want to add into the context window of Cloud Code, such as add schema dot Prisma, which would include the schema or add package dot JSON, which would include the entire JSON file. But you can also use hashtag to to create memories, and these are usually saved at the end of your ClotMD file. So maybe you're doing something with the front end, and cloth code keeps using JavaScript. But you wanna use TypeScript, so you would type in hashtag, remember to always use TypeScript.
And this would get appended
to the cloth dot m d file at the very end so that all future instances of cloth code working on this project actually remember this. Now here's a pro tip. Make sure to mention and reference any critical files about your codebase or project inside of your Clothecode MD so that every single Clothecode instance is aware of them. Right? So maybe you have, like, your supabase schema file where is the whole documentation of your super base, which, again, that's not in the code base. So make sure to mention that file exists inside of the Clot dot m d. So Clot code knows, hey. This file has everything about the database. If you're making any database related changes, read that file first. So let me show you the context engineering in action. I can say read at Supabase setup. There we go. This is a markdown file. And tell me one table we could remove. Answer in short. Boom. Now Clothecore uses a tool to read the entire file. As you can see, it's 716
lines. And at first, only 100 lines got pasted in, so it made sure to read the whole thing. And then it suggests
the one table that we could remove. So anytime you're doing anything specific,
make sure to tag the files relevant to that operation. But the next thing I wanna show you is the hashtag. Right? So say, remember to answer in short. Boom. Alright. Slight correction. The hashtag convention doesn't seem to work anymore, but there's this slash memory command, and you can either edit the project memory or the user memory. So I'm gonna do the project memory, and it opens the file, you can append it and add anything there. So, if you want Clothcode to remember something, just add it to your Clothcode. M d file. That's a safe bet. Now so far, what we did with Clothcode was pretty basic, but let me give you just a taste of what's coming later in the video where I show you how to give cloth code the power to use MCPs
and how to create custom cloth code hooks. So here, I literally set a plain English prompt to build me a full n eight and automation for analyzing the user's calendar and creating a separate Google Doc for every sales call that is booked there, matching the data from the leads in the user's air table. And I told it to build everything end to end. So as you can see, it used the n eight and m c p to do a bunch of tool calls to learn about the structure of those notes, and then it wrote a three hundred twenty nine JSON file, which includes the full n a 10 automation. So if we then go into n a 10, we can go in top right, click the three dots, import from file, select this JSON, and you can see that, boom, the full anything automation was built by Clothecode from a single prompt.
Plain English, nothing crazy. This is the power of Clothecode when you give it the right MCP tools. So all that remains with this automation, because Cloudco has built it all, is to connect my credentials, so it runs with my actual accounts, and then to host it somewhere. Because what's the point of building an AI automation or an AI agent if it's not running twenty four seven, saving you time every single day? Now the simplest way to host your n a 10 agents is with Hostinger. And this is what me and my team use to host all of our AI agents because of how simple and affordable Hostinger is. They literally created a one click n a 10 deployment for their VPS. Now they offer multiple different options, but personally, I recommend the k v m two plan. This is what I use as well. So click on choose plan, which will take you to the Hostinger card. Now as you can see, Hostinger currently has a very generous new year sale. So if you've ever considered starting your own n a 10 automations or agents, now is the perfect time. So here, choose either twelve months or twenty four months. That way, you get the best deal possible. I mean, look how affordable it is. $7 a month for your own dedicated VPS.
Insane. But as a bonus, if you use the coupon code david,
you get additional 10% off. There you go. The coupon code has been applied, and you can see that it drops to just $6.29
a month for your old VPS that can host hundreds of AI agents like this one. So all that's left is to select the server location.
Terminate is fine. Operating system n a 10 is already selected. Boom. And click continue. This will take you to the checkout where all that remains is just filling out your billing info and your credit card. Once you complete the purchase, you'll be taken to the Hostinger panel where you can manage your VPS, see all the statistics about it, and access the NA ten portal where all of your automations and agents are hosted. So, again, Hostinger is amazing. They completely revolutionized how easy it is to deploy your NA ten automations,
it's and the most simple and affordable option on the market. So if you wanna try it yourself, click the link below the video, use the code david, and get started with Hostinger today. Thank you, Hostinger, for sponsoring this video. Alright. Back to the Anthropy course. Next lesson they had is about making changes. So it's very useful to give cloth code screenshots, and you can do it by control v on macOS, not command v. And this will paste the screenshot directly into the cloth code CLI. This is super useful. It allows cloth to see exactly what you're looking at. That way, you can modify those specific UI elements and make changes like a great designer would and not just guess how things look like based on only the code. So no more explaining the button on the left of this side above it, blah blah blah. You just screenshot it, and it will see what you see. Another thing that Anthropic teaches is the difference between the plan mode and the thinking mode. So the plan mode handles breath.
With shift tab, you can toggle between different modes. So for example, here, we can do shift tab, and you can see that we're in the auto accept mode, the purple one, or I can do shift tab to go into the plan mode or the default one. Right? So when you switch to plan mode, cloth code researchers
more files, puts more effort into reasoning planning,
and doesn't touch anything. It doesn't do any code changes. It just plans. Now thinking mode is something else, it could be complementary. This handles depth. There is four different strengths, think, think hard, think harder, and ultra think. So if you want cloth codes to use the maximum reasoning effort, you would add ultra think somewhere in your prompt. So let's say this is your prompt. Right? Then you could add ultra think at the end. However, this does no longer do anything. So Anthropics
official course is outdated in this regard. Right? This goes to show how fast the AI field is moving. In the past, you would see this, like, highlighted by Renbow,
but not anymore. Now the thinking budget is always maxed by default. So no longer you have to do tricks like think or think harder, stuff like that, or adding ultra think at the end of your prompts.
This doesn't work anymore because cloth code now always ultra thinks by default. I mean, just to show you how crazy this is, before I record it with my previous cloth code version, this still worked. This was still a thing. But AI is moving so fast that as I updated the cloth core version, at the start of this video, the thinking mode no longer works and it's always set to ultra think. So make sure to use the latest cloth core version because updates are happening nearly every day. The next section of the Anthropic course is about controlling the context. So when you press escape, it can stop clot mid response. That way you can interrupt it when it's going in the wrong direction or when you wanna provide more context and have it go again. Now when you press escape twice, you can see your previous messages and rewind at an earlier point of the conversation. So let me show you right here. I'm gonna do escape. If I say, like, write a detailed summary of what you did, I can press escape once to interrupt it. You can see it shows interrupted, but I can press escape twice to jump into the rewind mode where I can switch between the previous messages,
go to any previous point of the conversation, and go from there. So maybe if, you know, you worked on a new feature and, you know, it didn't go anywhere and you were, like, 10 prompts deep, you can go back, go back to the prompt number four, and resume from there. So a lot of people don't know that double escape opens this rewind menu, and you can jump back to any previous point of the conversation. Super useful. Another context
controlling,
context engineering thing is the slash compact command. So when you type in slash compact into Cloud Code, it summarizes the entire conversation while preserving as much of the learned knowledge as possible. And this is perfect for long sessions. So when you notice that there's a lot of, you know, anesthetic context and you wanna free up the context window so that you're burning less of your rate limit and Cloud responds faster and all the benefits of not having a full context window, all you need to do is just type in slash compact.
So notice the slash command in Cloud Code opens any of the commands. Some of them I have a custom, like, pull request,
but most of them here are prebuilt by Anthropic,
and the compact command is one of them. So you just do slash compact, and it will compact the entire conversation to free up context so that you never hit the token limit of cloth context window. Now as I mentioned, you can create custom commands for cloth code, and this can be done by creating markdown files in the dot cloth slash commands folder. So let me show you how that actually looks like. I'm gonna open
cursor and any file editor doesn't matter.
And
inside of my folder structure, you can see I have the dot cloth folder and then commands. Right? So let me show you how that looks like for a new directory. So I'm gonna open an empty folder right here. Let's create a new folder project.
Boom. Open.
Close all these sidebars. They keep opening.
Alright. So you can see zero files, nothing, but if we create a new folder dot cloth
slash
commands,
and in here we can create a new file, say, uh, testing dot m d, and say,
this is just a test command
respond
with an unfunny joke to the user. Okay? So, obviously, this is a useless command, but I just wanna show you how easy it is to create your own custom commands for cloth code because so many people are not doing it. And this is one of the best ways to improve your productivity because if you find yourself repeating the same prompt over and over and over again, just turn it into a slash command, and you never have to repeat yourself,
and you just have it on your hand. Let me show you. So I'm gonna type in cloth to launch cloth code. Yes. I wanna allow it access
to this folder.
So here it is, and I can do slash testing,
and it runs my new testing command.
Why did the the programmer quit his job? Because he didn't get a raise.
Anyways,
you can see that it's told an unfunny joke, and it works. And I literally created a new custom Cloud Code command in, ten seconds, while most of you have never created one, which means you're not on the cutting edge of AI. So log in, start using custom Cloud Code commands. So easy to create, but boost your productivity instantly. Oh, and one more thing related to custom commands,
you can use dollar sign arguments
to give a topic. So say,
make it about this theme.
And say,
plus sign arguments,
then
well, let me restart Clothecode because we need to make sure it loads the new commands.
Say testing,
and then you put the argument, say the theme could be, I don't know,
car racing. Okay?
So this is gonna be inserted into
this variable arguments, this parameter.
As you can see, it answers even though this is in
the middle of the prong. Right? So very useful when you're asking to, for example, review specific PR or to create a spec for a specific feature, and you just need the variable to be somewhere in the prompt. When using the custom
slash command, just use the dollar sign arguments, and then whatever you put after the slash will be inserted in here as if it was replaced in a parameter. So as I promised, let's talk about MCP servers. Now this is a great way to extend the power of Cloth code and give it way more tools. So MCP servers, though a lot of people don't understand them, again, it's might sound intimidating,
but all they do is add new capabilities to ClothCode. They can run either locally or remotely,
and they give Cloth access to new tools. So for example, to Playwright MCP, let's Cloth controller browser. It can navigate, click, screenshot, test your UI,
anything that the Playwright framework could do. Or a second example is the n a 10 MCP I showed you earlier, where it gives Cloud Code to the up to date documentation for all of the nodes inside of n a 10. Another thing that Anthropic teaches in this course is the GitHub integration. And you can do this with typing slash install GitHub app. There we go. Cloud Code also has a Slack app. But when you do this, it's gonna check the repository. So use current repository. Okay. So it's asking to use the current repository. So, obviously, this is for Vectal, my startup. Let's hit enter.
Gonna open GitHub, and it's gonna ask for permissions. And this gives you two default actions. First,
doing at
mentioning it inside of pull requests or issues to assign Claude call different tasks or to have it review the pull request or to just answer a simple question. But once you do this GitHub integration, Claude can even push comments, open new PRs,
and respond to review comments all from the Cloth code CLI. So you don't have to switch to your browser or anything. You can just stay inside of Cloth code, talk to it in plain English, and it can do anything that a junior developer could do twenty four seven for a fraction of the cost. Now here's where it gets interesting. The next section of the course talks about hooks and the SDK. So this is for the people who are actually logged in. Hooks lets you run custom scripts before or after Claude uses a tool. So for example, a pretool hook would run before a tool call, and you can use it to prevent Claude code from doing things you don't want it to do, such as reading sensitive files like ENV, or maybe you don't want it to change a specific file, you would create a hook that runs before every tool call that checks
what Claude wanted to do. And if it is against that rule,
it doesn't let it do it. Now a post tool hook works the same way, but it runs after
the tool. Right? So maybe it makes a sound, maybe it can check for type errors,
anything that makes sense after a cloth code would use a specific tool. You can have a hook, which could be a short Python script to either notify you to review those changes or anything else that you want. Now here's something that a lot of people don't understand
about hooks in Clothecode, and that is absolute paths. And, actually, Anthropic themselves recommend using absolute paths for the hook scripts. But, of course, absolute paths are different on every machine, so you can't just commit your serix. Json to share them. Right? The absolute path to a certain file or to a certain directory depends on the file structure of your computer. So for example, here for my startup folder, if I do p w d, which is a terminal command, I can see the absolute path of where this folder is located on my computer. And this is what you want to use in your Clothecore hooks, the absolute path, not just, you know, path within the parent or some path in relation to another file. You wanna use the absolute path of where this directory is located on your machine. Now luckily, there's a simple fix. You can use dollar sign p w d placeholders
in the template file, and you can run a script that swaps those to the real path. So let's look at some useful hooks you should be using inside of Clothe Code. First off, a TypeScript
type checker hook, which simply runs t s c dash dash no emit after every single file edit. And this will allow Clothe Code to catch and fix any type errors automatically, whereas otherwise, you might have only called them when trying to deploy or when running npm run build. Another useful hook is duplicate code prevention. This can launch a second Cloth code instance to check if the new code already exists somewhere in the code base, and if so, prevent duplication. And these are just two examples of automated hooks that would catch some common mistakes that Cloth tends to do. But, honestly, as AI models keep getting better, there's less and less of these mistakes. Okay. Let's talk about the ClothCode SDK.
ClothCode has a programmatic interface. So ClothCode has a programmatic interface,
also known as the SDK, which includes the CLI as well as the TypeScript and Python libraries. Now an important point to clarify is that ClothCode
is not open source. Okay? This only includes a few hand selected bits and pieces of the code base. So if you wanna use a fully open source, fully private, and fully secured AI agent, make sure to use AgentZero, which not only is completely open source, but it's also free, unlike load code, and it can run locally on their machine. So I just made a full agent zero tutorial recently. I'm gonna link it below the video. But let's talk about the Clothcode SDK. It allows developers to build custom AI agents that can do things on a computer in a similar way like Clothcode can. So, basically, it gives you the same capabilities of Clothcode, but in your own specialized setup. So maybe if you're a lawyer, you make it all about legal actions, you know, analyzing legal contracts,
researching previous lawsuits,
whatever. Now the official name for the Clothcode SDK is the agent SDK,
and here is what the documentation looks like. And again, if you're not a developer, you might be scared of documentation, but that's a huge mistake because as you can see, it includes step by step instructions how to install SDK and how to build on top of it. So don't avoid reading documentation. In fact, this is made for people who are not familiar with the project. So the more of a beginner you are, the more documentation you should be reading. And, again, I'm gonna leave a link to this SDK documentation below the video so you can check it out yourself if you want to build on top of Cloud Code. Now this is a fun part. The Anthropic course actually ends with a quiz. So we're gonna do this, and we're gonna do it in YouTube comments. So, obviously, if you want, you can cheat and you can go to the end, but what's the point of that? What we're gonna do is we're gonna go through the questions one at a time. There's only eight questions. And what I need you to do is open a comment and start answering these. And again, this is for your own good so that you can actually solidify the learnings from this video. First question,
what is the fundamental limitation of language models that necessitates
the use of a tool system in coding assistance?
Option a,
option b, option c, and option d. Pause the video, read them, and type your answer below.
Question number two, what permission configuration is required when integrating MCB servers with Cloud Code in GitHub actions?
Option a,
option b, option c, and option d. Once again, add it to your comment, and let's go to the next question. Number three, what is the primary difference between plan mode and figuring mode in Cloud Code? And again, this one is a bit outdated, but still it's good to know the knowledge. Option a, option b, option c, option d. Pause it, read it, and update your comment.
Question number four, which of the following correctly describes the three types of claw dot m d files and their usage? Option a, option b, option c, and option d. Moving on. Question number five. How do you create a custom command in cloth code that accepts runtime parameters?
This one you should all get because I explained this a little well, at least I think so. Option a, option b, option c, and option d. Comment below.
Question number six, which type of hook can prevent a tool call from happening if certain conditions are met? Post tool hook, project hook, global hook, pre tool use hook. This one is pretty free. Question number seven, a developer wants to prevent Claude from reading sensitive NV files. Which type of hook should they set up and what tool names would they likely match?
Option a, b, c, and d. Last question. Question eight. What is the primary purpose of hooks in Claude code? A,
b, c, or d. Update your comment, hit enter
before I reveal the answers. You know what? Just to test my own knowledge, I'm gonna retake this quiz in real time to see if I'm locked in or not. So what's the fundamental limitation?
Yeah. So it's, uh, option d. They can only process text input, cannot interact with external system. Next question. What permissions is required? Alright. I think it's this one. I'm not sure here. Primary difference between play mode and thinking mode? Alright. This one for sure. Which of the following correctly describes? Alright. I think this one makes the most sense. Yes. For sure. Next question.
How to create custom commands,
arguments, include arguments,
runtime parameters,
which type of hook? Pretool use hook. So we need to use a pretool use hook, but which one?
Read. Okay. So read and grab for sure.
Primary purpose of hooks in cloth code to run commands before or after cloth executes a tool. Submit,
And I've passed eight out of eight. You can see that my answers were correct, so hopefully yours were as well. And, again, I'm gonna link the full official Anthropic course below the video so you can go for it. This was a condensed version of it. I covered, like, 90% of it, but if you wanna go through it again, feel free to do so. And hopefully, you found this video valuable. If you did, please make sure to subscribe. It takes two seconds, and it helps out a lot. With that being said, thank you guys for watching, I wish you a wonderful productive week. See you.