WEBVTT

00:00:00.000 --> 00:01:01.220
Hey, everyone. If you're new to Cloud Code, you might feel overwhelmed by all the commands available and wonder what they all do. So in this video, I'll walk you through all the commands that Cloud Code has and show you what they do and how to use them effectively. I'm going to assume you already have ClawdCode installed. Let's get started. The first command is the bug command. Since ClawdCode is still a relatively new tool, the team at Anthropic is actively building and improving it. And like any evolving product, that means bugs can pop up. If you come across a bug while coding, you can use the slash bug command to report it directly to the team. It's a simple way to contribute and just improve the platform. What's really cool is that Anthropic also maintains a public GitHub page for Claude code, and this is a page where you can see all the current issues that are being tracked as well as feature request and any bugs. It's very active, and you'll often see the actual Cloud Code developers engaging with users here, talking through issues, bugs, and features.

00:01:01.300 --> 00:01:06.020
So if you're interested in the development of Cloud Code, this is a great place to get involved in.

00:01:07.635 --> 00:01:20.355
Next up is the clear command, and it's probably the most important command in Claude code. So if there's one command to know, it's this one. What clear does is that it clears out your entire current chat conversation,

00:01:20.670 --> 00:01:24.030
all the context, and starts a brand new conversation.

00:01:24.190 --> 00:01:29.150
So why is this such a big deal? It's because large language models are stateless.

00:01:29.310 --> 00:01:34.325
That means they don't actually remember past messages between chats. Instead,

00:01:34.325 --> 00:01:39.365
every time you send a message in the same conversation window, Claude reprocesses

00:01:39.365 --> 00:02:00.825
the entire conversation history to understand the context. So let's just break this down with a simplified example. Let's say you send message one, which costs a thousand tokens, then you send message two, which on its own costs 500 tokens. You would think message two would only cost 500 tokens, but that's not how it works. Because LLMs are stateless,

00:02:00.825 --> 00:02:38.075
the model doesn't remember anything you sent in message one. And because you are still in the same chat window, the model assumes that every message you sent before is still relevant. So what the model will do is that it will send all of message one again plus message two. So in reality, message two actually costs a thousand 500 tokens. So if you send message three, the actual token cost is going to be message one plus message two plus message three. So you can see that with every follow-up message you send within the same chat window, each message is going to cost more and more tokens,

00:02:38.235 --> 00:02:47.360
which means if you have the super long chat windows with Claude, you will quickly use up all your tokens, and that's where this clear command comes in.

00:02:48.000 --> 00:02:53.920
So in this example, I have a long conversation going on. It's just pages and pages and pages.

00:02:54.080 --> 00:03:04.445
So every new message you send in here is also gonna send all of this as part of the input, and you don't want that. So when you run slash clear,

00:03:04.525 --> 00:03:25.835
what this is going to do is that it's gonna clear up all this context and start a brand new chat. So now you can see that once I ran it, there's no more context. Right? So if I scroll up, there's nothing left. All that context has been cleared up, and now we have a brand new chat. So now your next message you send will be sent without the entire previous context, and this helps reduce unnecessary

00:03:25.835 --> 00:03:26.875
token usage.

00:03:27.515 --> 00:03:45.980
So when should you use this clear command? You want to use this command as often as possible. A good rule of thumb is to run it whenever you finish a task. You don't want multiple unrelated tasks piling up in the same chat because that's just gonna blow it up your token count and make responses less focused.

00:03:46.140 --> 00:04:00.825
And just a quick note, this is a simplified example, and I do have a video that goes into more depth on how to optimize your token usage and how Cloudco calculates all of it. So if you're interested, go check it out. I'll link it in the description below.

00:04:02.360 --> 00:04:07.160
Next up is the compact command. The compact command is one of ClaudeCode's

00:04:07.160 --> 00:04:09.320
tools for managing token usage,

00:04:09.400 --> 00:04:12.120
similar to clear but with a different approach.

00:04:12.280 --> 00:04:31.830
While clear wipes out your chat history completely and starts from scratch, compact helps you reduce token usage by summarizing your conversation and starting a new chat with that summary. It's a way to keep important context without carrying every message forward. And this is how it works. When you run slash compact,

00:04:31.830 --> 00:04:39.910
Claude takes your entire current conversation and creates a summary of it and starts a new chat window with that summary preloaded.

00:04:39.990 --> 00:04:41.350
Now by default,

00:04:41.430 --> 00:04:43.750
if you were just to run slash compact,

00:04:44.065 --> 00:04:48.785
what this is gonna do is it's going to create a summary of your entire

00:04:48.785 --> 00:04:59.450
conversation. So everything you have in your current conversation, it's gonna take that entire thing and summarize it. And just another thing to note here, when Claude code reaches 95%

00:04:59.450 --> 00:05:00.330
capacity,

00:05:00.330 --> 00:05:08.730
so when this thing right here says there's only 5% left, it's going to auto compact your conversation. So this is Claude code's way to help you out.

00:05:09.130 --> 00:05:23.365
Now this default way of compacting is fine in many cases, but sometimes it's not what you want. You can actually customize what Claude summarizes by adding specific instructions. So for example, if I was just to do slash compact,

00:05:23.365 --> 00:05:26.325
you can see that I have this optional custom summarization

00:05:26.325 --> 00:05:29.250
instruction. So I can say things like summarize

00:05:29.250 --> 00:05:32.450
just the to do items, and this will summarize

00:05:32.450 --> 00:05:38.210
all the to do items I have within my current conversation. And I can maybe say summarize

00:05:38.290 --> 00:05:39.810
only the last

00:05:40.050 --> 00:06:04.840
conversation because maybe that's the only thing that's relevant. So Claude code is just gonna go through here, find my last conversation, and just summarize it. Or I can say something like, keep the summary to a max of 500 words or something, and this is gonna further limit what Claude code summarizes. So there's a lot of different ways to provide what summary you want to Claude. So let's just say for this example, I just wanna say summarize

00:06:04.920 --> 00:06:06.840
the last conversation.

00:06:07.000 --> 00:06:28.280
So what this is gonna do is Claude's gonna read my last conversation, provide a summary of it, open it up, and then preload it. So just give it a few seconds, and let's see what happens. Okay. So it looks like Claude code has finished summarizing my conversation. And you can see right here, this is that summary. So this is my previous conversation compacted. Right? It read through a bunch stuff, and it provide a summary.

00:06:28.440 --> 00:06:41.720
So if I was just to hit control r, this will show me what it summarized. So this is the summary. So now when I continue this conversation, this is the only thing that's going to be part of my context. It's no longer going to be the entire

00:06:42.015 --> 00:06:49.775
previous conversation. And what's even better is I have a summary of my previous conversation so I can just quickly pick up where I left off.

00:06:50.735 --> 00:07:04.690
Next up is the config command. So this command lets you customize Claude code's behavior to fit how you like to work. Let's walk through each option and show you what it does. So let's go to Claude code and write slash config.

00:07:04.690 --> 00:07:09.570
And in here, this is where you will find all your settings. So the first item is this auto compact.

00:07:09.925 --> 00:07:13.365
This setting controls whether ClaudeCode will automatically

00:07:13.365 --> 00:07:15.045
compact your conversation

00:07:15.045 --> 00:07:16.885
once it reaches 95%

00:07:16.885 --> 00:07:17.685
capacity.

00:07:17.685 --> 00:07:21.125
So remember in the compact command that we saw previously,

00:07:21.205 --> 00:07:26.480
we had that little status indicator at the bottom. So when that status indicator reaches 5%,

00:07:26.480 --> 00:07:37.360
ClawdCode will auto compact, and this is the setting that determines if you want it on or off. Now I recommend you leaving this on so you don't have to worry about hitting your limit and having everything just break.

00:07:38.045 --> 00:07:51.190
Next up is the use to do setting. This is one of the key reasons ClaudeCode feels more focused and effective compared to other AI coding tools. When you ask ClaudeCode to build a new feature, ClaudeCode

00:07:51.190 --> 00:07:52.070
automatically

00:07:52.070 --> 00:08:00.790
creates a internal to do list and follows that list step by step. This helps it stay on track even as the task gets complex.

00:08:01.030 --> 00:08:03.590
This is important because LLMs

00:08:03.590 --> 00:08:05.910
tend to lose focus in long conversations.

00:08:06.285 --> 00:08:12.845
But with a to do list, Claude code keeps its objectives clear and avoids getting lost in the details.

00:08:13.005 --> 00:08:14.925
So I 100%

00:08:14.925 --> 00:08:17.885
recommend you keep this setting as true.

00:08:18.045 --> 00:08:24.160
So let me show you what I mean with this to do list. I'm just gonna exit out of here. I am in this anal fax directory,

00:08:24.160 --> 00:08:27.600
and I am just going to ask ClaudeCode to create

00:08:27.840 --> 00:08:32.800
a new feature to allow users to add multiple

00:08:33.040 --> 00:08:34.880
animals via a endpoint.

00:08:37.395 --> 00:08:40.275
So I'm just gonna let this run and show you that to do list.

00:08:40.995 --> 00:09:03.850
Okay. So now that it finished running, let me show you Claude Code's thinking process. So if I scroll to the top, this is the request that I ask Cloud Code to do just to create a new API endpoint. So this right here is a to do list that Cloud Code is creating internally. Now remember, I did not ask Cloud Code to create any to do list. This is simply something that Cloud Code has created internally.

00:09:04.105 --> 00:09:56.580
And this is just saying, hey. The first thing that we should do is explore the code base, then the second thing to do is design the new endpoints and so on and so on. So the first step is to explore the code base. So you can see here, it does that right here. Let's explore the code structure. Structure. So it goes through here. It reads a bunch of files. Right? So now that it finished reading, it finished that first item. So now it's gonna update that to do list. You can see in this update to do list, that first item is now complete. So what's the next step? Well, the next step is to design that new endpoint. Okay? So what is it gonna do? Well, I am going to create a new schema for it because that's designing it. Right? So now it is here, and this is gonna ask it to make some edits to the animal dot p y file that I have. So you can see that Claude code is following this to do list, and it's a really cool way for Claude code to keep focus on what it needs to do. So going back to the config,

00:09:56.580 --> 00:09:58.100
I 100%

00:09:58.100 --> 00:10:00.340
recommend you keep this as true.

00:10:01.315 --> 00:10:56.950
Next is the verbose output. If you enable this, it's going to show you all of Claude's thinking process, like what files it's searching through, what functions it's reading, and so on. This is great if you are someone who wants full visibility into the model's decision making. But a heads up, if you enable this, it will literally output you the entire file's content in your chat window. So if your file content is a thousand lines of code, it is literally gonna print out a thousand lines of code for you. So what I recommend you do is to keep the setting as false, which is the default setting. And if you need to dig into its thinking process, you can actually click control r, and that will toggle the verbose view on and off whenever you need it. So the next one is theme. This one is simple. Just choose between light mode or dark mode. So just click on it, and you can choose all the different types of modes you want. I'm just gonna keep mine on light mode. Next is notification.

00:10:57.030 --> 00:10:58.710
Just keep this as auto.

00:10:58.710 --> 00:11:07.355
Next is this editor mode so you have normal and Vim. If you know what Vim is and want to use Vim style key binding inside ClaudeCode,

00:11:07.355 --> 00:11:10.715
you can switch to Vim here. Otherwise, don't worry about it.

00:11:11.195 --> 00:11:55.390
And the last setting is model. This setting lets you choose which model ClaudeCode is going to use. So by default, ClaudeCode is going to use this setting, and that means that ClaudeCode is gonna use Opus four and automatically switch to Sonnet four when needed. But if you want, you can specify a model you want here manually. For example, if you want to only use Opus four, then just click on this. If you only wanna use Sonnet four, just click on this. So this is just a way to switch models. And just a note here, OPUS four is only available for max plan users. So if you are a pro plan user, you won't have this option, and the default option actually defaults to SONNET four. So let's just say I wanna use SONNET four. Hit this, and it's going back to SONNET. And that's it for the config command.

00:11:57.125 --> 00:12:24.450
The next command is the cost command. So this command shows you how much you have spent using Claude code, but this is only if you are using the API version. If you're on the Macs or the Pro plan, this command won't return any data since those plans don't track cost the same way. But if you're using the API version, if you just do slash cost, this is just gonna tell you how much you have used so far in your session. So it's a pretty good way just to keep track of all your cost.

00:12:25.255 --> 00:12:34.135
The next command is the doctor command, and it's a simple diagnostic tool. It checks whether your ClaudeCode installation is working properly.

00:12:34.295 --> 00:12:36.455
So if we type slash doctor,

00:12:36.535 --> 00:12:39.255
this is mostly just gonna tell us whether ClaudeCode

00:12:39.255 --> 00:12:48.430
has the necessary NPM permissions to function properly. This is just a quick way to confirm everything's configured correctly, especially if you are troubleshooting.

00:12:48.750 --> 00:13:01.915
The help command is exactly what it sounds like. So if we just do slash help, it gives you a full list of all the available commands in Claude code along with a short description of what each one does.

00:13:02.235 --> 00:13:12.890
So if you scroll up, we could kinda see that these are all the commands that are available to us along with description of what they do. And if you're just getting started, definitely make use of it.

00:13:13.370 --> 00:13:40.300
The init command is your project starting point in Claude code. When you run it, Claude scans your entire code base reading every single file and generates a file called Claude dot m d. So let's do that right now for the code base I'm in. So right now, I'm in Claude code, and I am in this animal fax directory. So let's just run slash init and see what happens. And this command is going to take a while because it's gonna read through every single file.

00:13:41.340 --> 00:13:53.525
Okay. So now that it finished, you can see that this is that file that it's going to generate for you. So let's just hit yes, and it's gonna create that clawed m p file. So just hit yes, and it's gonna write that file to your code base.

00:13:54.085 --> 00:14:08.970
Okay. So now that it finished, let me open up Versus Code, and this right here is that new file that just got created. And within this file, you will find a high level summary of your project. So what it does, how it's structured, key components,

00:14:08.970 --> 00:14:21.315
important functions, and so on. So if we look at this cloth. M d file that was created in my case, I can see that we have some stuff in terms of our development commands. We have stuff on our architecture overview,

00:14:21.315 --> 00:14:23.155
how the project is structured,

00:14:23.315 --> 00:14:33.250
what key components there are. So there's a lot of high level summary within this file, and it's very helpful for the user as well as clawed code. So this file

00:14:33.330 --> 00:14:38.370
essentially acts as a memory for your codebase. Now, by default,

00:14:38.370 --> 00:14:49.945
large language models like Claude are stateless, which means they don't remember anything from one chat to the next. Every new conversation starts with a blank slate unless you give it context.

00:14:49.945 --> 00:14:59.400
And that's where this Claw. Md file comes in. When you run slash init, ClawdCode builds this file as a persistent summary of your project.

00:14:59.720 --> 00:15:02.040
Then when you start a new conversation,

00:15:02.200 --> 00:15:05.240
Claude automatically reads this file first.

00:15:05.480 --> 00:15:48.995
That way, it already understands the context of your project before you ask it to do anything. So even though the model itself can't retain memory, this claw dot m d file gives it a way to simulate memory. And, yes, this is the same file used by the memory command, which we will cover in more details later. You should always run slash init when using clawed code on a project for the first time, and this is something Anthropic actually recommends you do. Also, keep in mind that you can edit the cloth. Md file manually if you ever want to clarify or update the summary as your codebase evolves. So this is just a text file, you can just write and add stuff as needed.

00:15:50.115 --> 00:16:17.465
The log in command is pretty straight straightforward. It lets you log in to Cloud Code. The one important thing to note here is that when you log in, there's two methods. You can either log in with the subscription plan, which is for those on the pro plan or the max plan, and there's also a login through the API plan. So just make sure you choose the correct one. The logout command is also pretty straightforward. It logs you out of clogged code. But here's a useful feature.

00:16:17.705 --> 00:16:34.540
When you log out of Claude code, it actually gives you a summary of your session so you can see how much that session cost, how long it ran for, and what type of models that session used. So it's a great way to track your usage and get a quick snapshot of what Claude did behind the scenes.

00:16:35.635 --> 00:16:42.035
The MCP command allows you to connect Claude code with external MCP servers.

00:16:42.115 --> 00:16:43.155
Now MCP

00:16:43.155 --> 00:16:45.555
stands for model context protocol,

00:16:45.635 --> 00:16:53.450
and at a high level, it's a protocol that standardizes how large language models like Claude interact with external tools,

00:16:53.610 --> 00:16:55.130
systems, and applications.

00:16:55.450 --> 00:17:12.135
Now this is a big topic and can get very technical, so in this video, I'll stick to a high level explanation of what MCP is and why it's useful. I won't cover how to install it or how to set up a MCP server here since it's a more involved process,

00:17:12.295 --> 00:17:24.420
and the installation differs depending on what servers you want installed. But don't worry. I'll have dedicated videos on SCP soon. The easiest way to understand MCP is through a example.

00:17:24.580 --> 00:17:31.220
So by default, LLMs like Claude only understand text, some images, and maybe PDFs.

00:17:31.220 --> 00:17:46.715
They can't directly interact with things like a Postgres database. So if you ask Claude, hey. What does database x y z do? It won't know how to access it. It won't know how to read the tables or even understand its structure. That's because LLMs

00:17:46.715 --> 00:17:53.870
can't natively connect to or operate external systems. They need everything in a textual format.

00:17:54.110 --> 00:18:01.070
So this is exactly where MCP comes in. A MCP server, for example, one built for Postgres,

00:18:01.150 --> 00:18:07.485
acts as a kind of translator or interface layer. It exposes the structure, functionality,

00:18:07.565 --> 00:18:09.405
and data of the database

00:18:09.405 --> 00:18:14.765
in a way that Claude can understand and interact with using natural language.

00:18:15.005 --> 00:18:17.005
So with a MCP connection,

00:18:17.165 --> 00:18:30.130
Claude can reason about, query, or even help modify things like a Postgres database because it now has a structured way to interact with through a MCP layer. So this is a powerful concept

00:18:30.210 --> 00:18:35.615
with a lot of potential and definitely something I will cover more deeply in future videos.

00:18:35.775 --> 00:18:45.295
But if you're interested, go to the site here and read through this page. It has a lot of good information on what MCP is, how to configure MCP servers,

00:18:45.910 --> 00:18:49.750
how to understand the different scoping levels for MCP servers,

00:18:49.990 --> 00:18:52.150
how to set up authentication.

00:18:52.550 --> 00:19:02.505
And even here, it has a example on how to connect to a Postgres MCP server. So there's a lot of information on this site, so definitely go here and give it a read if you're interested.

00:19:03.225 --> 00:19:11.785
The memory command builds directly on what we discussed earlier with the slash init command. To quickly recap, when you run slash init,

00:19:12.160 --> 00:19:24.080
Claude co scans your project and creates a file called Claude dot m d. So this is that file right here. This is that Claude dot m d file that is within my codebase called AnimalFacts.

00:19:24.385 --> 00:19:28.305
So this file acts as the memory of your codebase,

00:19:28.385 --> 00:19:31.265
storing a summary of your project structure,

00:19:31.425 --> 00:19:32.225
components,

00:19:32.225 --> 00:19:33.425
and key behaviors.

00:19:33.505 --> 00:19:35.745
Since Claude itself is stateless,

00:19:35.745 --> 00:19:38.625
meaning it doesn't retain memory between chats,

00:19:38.625 --> 00:19:41.760
this file gives it a persistent reusable

00:19:41.760 --> 00:19:43.920
context for future conversations.

00:19:44.160 --> 00:19:49.760
Now memory in Claude code is a deep topic and also very subjective.

00:19:49.840 --> 00:20:03.255
How you use it will vary depending on your workflow and preferences. So in this video, I'll just give you a high level overview of what memory is and how to use it. And in a future video, we'll deep dive into it further.

00:20:04.135 --> 00:20:13.720
Okay. So at a high level, ClaudeCode supports three types of memories. There's project memory, there's user memory, and then there's this project memory local.

00:20:13.800 --> 00:20:21.160
So just ignore this one for now because it's no longer being used. So we'll just focus on these two here. Now as a FYI,

00:20:21.320 --> 00:20:30.705
all the memory files that gets created are all named claw dot m d, so it can be a bit confusing. So the first one is this project memory.

00:20:30.785 --> 00:20:53.515
So this is the claw dot m d file that gets created in your current project directory when you run slash init. So this is that file right here. So this is the project that I have, and this is that file right there within the root folder. So when I run slash init, this is gonna get all populated, and it's just a summary of what this codebait does. So every time you work within this directory,

00:20:53.595 --> 00:20:56.475
Claude will reference this file for context.

00:20:56.555 --> 00:21:10.360
So in this file, this is where you can store things like a high level architectural description, which is what gets auto populated when you run slash init. You can also have things like coding standards specific to this project. So let's just say that here,

00:21:10.840 --> 00:21:19.320
I want to have a section for coding standards. So I can have this little section right here. So maybe for this project, I wanna use four spaces for indentation.

00:21:19.480 --> 00:21:21.640
I wanna have a max length of 80 characters.

00:21:22.225 --> 00:21:34.545
I wanna make sure that there's specific schemas for data models and so forth. So there's just a lot of things you could do here. You could have whatever coding standards you want. Now just keep in mind, this project memory

00:21:34.625 --> 00:21:42.970
should include things relevant to the whole code base. So the things you'll write here should not be specific to one file or subfolder.

00:21:43.450 --> 00:21:46.810
Okay. Now let's look at the second one, user memory.

00:21:46.890 --> 00:22:03.945
This is a global memory file, which means it applies across all your projects. So whatever project you do within Claude code, this user memory file will always be called. So let's see how we can actually create it. So let's just go into Claude code, and I'm just gonna write slash memory.

00:22:04.105 --> 00:22:37.060
And here, this is just gonna tell me what type of memories I So you can see here that I have one project memory, and it's that claw dot m d file that we looked at earlier. And here, we have the three levels of memory. So we have the project memory with the local one. Ignore this one, and then this is that user memory. So right now, we have zero memories in here. So if we click on this, this is gonna open up a new file, and this new file is the user memory file. This is where you wanna store personal preferences that apply across all your projects. So, for example,

00:22:37.220 --> 00:23:06.610
this is where you can have things like user preferences. For example, you want ClaudeCode to call you a certain name, you could put it here. If you want ClaudeCode to keep your responses short and concise, you could mention it here. And you can also have ClaudeCode avoid certain phrases. So with Sonnet four, it really likes to use phrases like you're absolutely correct and this is perfect. So if you don't like that, you could tell ClaudeCode to avoid that. You can tell Clarcode to always respond in markdown format, use bullet points instead of paragraphs.

00:23:06.610 --> 00:23:08.450
And for coding style preferences,

00:23:08.450 --> 00:23:25.325
you can say that you like to use snake case. You can tell Clarcode to avoid short variable names like x and temp. So there's a lot of things you can include in this user memory file, and the things I have here is just a quick example, and you can quickly adapt this to your own personal preferences.

00:23:26.205 --> 00:23:36.250
Okay. Now let's look at how to import custom files into memories. Okay. Now let's look at how to import custom files into memories. So with ClawdCode,

00:23:36.250 --> 00:23:48.245
they also give you the ability to import custom files that can act as your own memory. So let's go back to our code base memory file. So that's this one right here. So this is the ClawdCode to know

00:24:00.110 --> 00:24:17.645
that I want ClawdCode to know in in terms terms of how to write a git commit message. So instead of having all of this within here, I can write that instruction here. And then within this memory file here, I can simply just say, hey. Reference this file in this location.

00:24:17.725 --> 00:24:37.360
And ClaudeCode is smart enough to know that if it sees this at sign, it's going to look into this file and pull in the necessary information and make it as part of the memory. So the ability to import custom files into this memory file is very nice, and it just keeps your memory file short and organized.

00:24:37.520 --> 00:24:53.155
Okay. Now let's look at a quick way to add something to memory with the memory hashtag sign. So if I am in Claude code and I want to add something to memory directly without having to go to my Claude dot m d file, what I can do is I can just do hashtag,

00:24:53.155 --> 00:24:58.380
and this will tell me to add a memory. So let's say that I wanna add a memory of prefer

00:24:58.380 --> 00:25:00.300
map and filter

00:25:00.540 --> 00:25:02.300
over for loops.

00:25:02.620 --> 00:25:03.900
And if I hit enter,

00:25:04.060 --> 00:25:10.555
now this is gonna tell me where I wanna save it. So let's say that I wanna save this memory into our project memory.

00:25:10.715 --> 00:25:14.075
So let's just hit enter, and this is gonna save it into that memory.

00:25:14.315 --> 00:25:32.870
So now that it finished, let's go look at that memory. So if we open up our project memory. Right? So we are in our Claw dot m d within our animal facts file. This is that exact memory that we ask claud code to create for us, and it's stored right here. Okay. Now let's go look at some best practices when it comes to claud memories.

00:25:32.950 --> 00:26:15.075
So when it comes to best practices, you always wanna be specific, and that makes sense. You always wanna be as descriptive as possible. So you don't wanna have general instructions like use comments and functions. That's not very helpful. Instead, you want to say all functions must include a multiline comment with a short description, parameter list, dependencies, and return type. That is much more specific, and Clarica will have a better idea of what to do with it. And the second is you always want to use structure to organize. So that means you want to kinda format each individual memory as a bullet point within a group. So in my case here, I have a group for coding standards. I have a group for local development.

00:26:15.315 --> 00:26:21.720
So you just don't want to have these things scattered throughout the memory file. You wanna kinda put these into logical groupings.

00:26:21.880 --> 00:26:27.800
So memory is a very powerful tool, and it can easily get overwhelming.

00:26:28.040 --> 00:26:30.120
Now my personal recommendation

00:26:30.120 --> 00:26:41.875
is that if you are just starting with Claude code, don't worry too much about memory at first. So just use Claude code for a while and just see what type of patterns and preferences come up naturally,

00:26:42.115 --> 00:26:50.510
and then slowly start to add those to your memory over time. Also, another important thing to note here is do not go overboard.

00:26:50.510 --> 00:26:59.710
I have seen users with thousands of memory entries, and that usually ends up confusing both the user and the model. So keep your memory files lean.

00:27:00.695 --> 00:27:08.535
The model command lets you choose exactly which Claude model you want Claude code to use when processing your request.

00:27:08.855 --> 00:27:10.775
So if I go to slash model,

00:27:10.775 --> 00:27:17.950
by default, if you're on the max plan, Clogcode will use Opus four until you reach 20%

00:27:17.950 --> 00:27:20.110
of your session's usage limits,

00:27:20.190 --> 00:27:42.870
then it will switch to Sonnet four. If you're on the pro plan, it will just default to Sonnet four. Now if you don't like this default option, you can specify which model you want Claude Co. To use. So in this case, I can decide if I wanna use Opus four or Sonnet four. Now if you wanna use a model that's not Opus four or Sonnet four, for example, let's say you wanna use SONNET 3.7

00:27:42.870 --> 00:27:44.470
or even 3.5,

00:27:44.470 --> 00:28:00.015
what you can do is you can go to this website here. So this is just Anthropix models website. So if you go here and scroll down, there is a list of all the models that Claude Co. Currently has. And let's just say that you want to use Claude Sonnet 3.5.

00:28:00.015 --> 00:28:13.830
So what you're gonna do is just copy this name here. Now it's important if you're using Claude Co. To copy the name from this column here. So copy from this first column. Copy this name, go back to here, exit out, and just write slash model,

00:28:13.830 --> 00:28:25.625
and then just paste in that name. And now if you hit enter, this is gonna set Claudcode to using that specific model. And that's it. The permissions command lets you control which tools ClaudeCode

00:28:25.625 --> 00:28:27.625
can and cannot automatically

00:28:27.625 --> 00:28:33.145
run-in your codebase. If you have used ClaudeCode before, you have probably run into this situation.

00:28:33.590 --> 00:28:54.655
Claw tries to run a command, then pauses to ask for your approval, runs a bit more, then stops again, waiting again for your approval for the next action, and so on and so on. So this is helpful for safety, but when it comes to development speed, it can really slow you down. That's where the permissions command comes in. Once you are comfortable with Claude's tools,

00:28:54.815 --> 00:29:02.335
you can specify which commands it's allowed to run without asking you and which one should still require manual approval.

00:29:02.670 --> 00:29:03.310
So

00:29:03.550 --> 00:29:12.510
code supports four types of permission rules. So Claude code supports four types of permission rules. You have bash, you have read and edit,

00:29:12.670 --> 00:29:15.310
you have web fetch, and then you have MCP.

00:29:15.470 --> 00:29:30.655
So let's break each one down. The first is the bash commands. So for those new to the terminal or Linux, which is what Mac is based off, so this also applies to Mac users as well, bash commands are terminal instructions like running scripts,

00:29:31.030 --> 00:29:38.070
searching and editing text files, installing packages, and so on. And when it comes to permissions for bash commands,

00:29:38.150 --> 00:29:43.110
you can allow specific bash commands using exact matches or wildcards.

00:29:43.185 --> 00:29:49.185
Okay. So now let's look at this in Claude code. So if I go to Claude code and write slash permissions,

00:29:49.345 --> 00:29:52.545
you can see that there's three tabs. I have the allow,

00:29:52.705 --> 00:30:15.525
I have the deny, and I have the workspace tab. So let's just say, for example, that you do a lot of Node. Js projects, and you want Cloud Code to always be able to run NPM run build without having you to always approve it in any projects. So if I go to this allowed tab and I hit enter on here so in here, if I write bash n p m run build,

00:30:15.605 --> 00:31:04.010
this is now going to let Cloud Code run this command without having you to ever approve it again. And another cool thing is that Cloud Code also supports wildcards for these bash commands. So let's take a look at this example right here. So for this example, I have n p m run test wildcard. So this is kinda saying that anytime Cloud Code encounters a command that starts with n p m run test, it will always approve it. So let's say that you have n p m run test coverage, that is going to be auto approved because you have this here. So that's the first type bash. Now let's look at the read and write. So these permissions control which files ClaudeCode can read and edit, and they also follow the git ignore filters if you're familiar with git. Okay. Let's go take a look at a example.

00:31:04.170 --> 00:31:06.170
So I'm just gonna open up Versus Code,

00:31:06.330 --> 00:31:15.595
and I have this hello dot p y file. Now, currently, if I go to Claude code and I just type out this statement of add a print

00:31:15.595 --> 00:31:17.435
dot hi statement

00:31:18.075 --> 00:31:39.395
to the holo dot py file, what's gonna happen is that Claude code is going to need my approval first before it can edit this file. So let's just give it a few seconds, and see right here, it's gonna ask me for approval to add this file. But let's say that I don't want this. I want ClawdCode to auto approve this. How can I do this? So to do that, let me just exit out of this. Let me just go to permissions.

00:31:39.395 --> 00:31:45.635
And in here, within my allowed tab, what I'm gonna do is I'm gonna add a new rule. So I'm gonna hit enter,

00:31:45.795 --> 00:31:54.080
and then here, I am going to add a rule of edit. Now remember, this is how it looks like. This is how it looks like for edit. So I'm gonna go to edit

00:31:54.160 --> 00:32:00.080
hello dot p y, and then just hit save, and I'm gonna save it into my project setting.

00:32:00.400 --> 00:32:01.280
Hit enter.

00:32:01.760 --> 00:32:16.055
And then now I have this new rule that allows me to edit into this hello dot p y file. So now I'm gonna exit out this, and what you need to do is you actually have to exit first in order for a ClawCode to refresh. So I'm gonna exit this, reenter ClawCode,

00:32:16.215 --> 00:32:34.260
and now I'm gonna ask that exact same command. So I'm gonna ask this exact same command and see what happens. Now hit enter, and then it says it's gonna add it. And then there, it's done. Now it says this file now contains that statement. So let's go take a look. If I open this file, and there it is. So that's the second type, read and edit.

00:32:34.820 --> 00:32:49.985
Now let's look at web fetch. So Cloud Code can also fetch information from the web, but normally, it'll ask you before doing so. So if you want Cloud Code to always be able to search a specific site, you can add a rule by first going to permissions again,

00:32:50.145 --> 00:32:56.120
going to allow, add a new rule, and here, I'm just gonna add a new rule of web fetch.

00:32:56.280 --> 00:33:00.600
And then here, just enter the website that I want. So I'm gonna say google.com.

00:33:00.840 --> 00:33:01.720
Hit enter,

00:33:02.040 --> 00:33:03.880
and just hit my project settings.

00:33:04.120 --> 00:33:06.120
And then now if I just refresh,

00:33:06.200 --> 00:33:10.705
let's exit this. Go Claude, and let's just say search

00:33:10.945 --> 00:33:16.225
Google to see what time it is in New York City.

00:33:16.465 --> 00:33:26.460
Hit enter, and then now it should be able to search Google without having me to approve. And there it is. It just says what time it is. Okay. Now let's look at MCP. So for MCP,

00:33:26.780 --> 00:33:47.335
these permissions control which server tools you can allow. So you can allow or restrict certain tools within a MCP server. So for example, here, this is saying that this allows you to use any tools within the Puppeteer server. But if you wanna get more specific, you can say to allow or deny a specific tool within that server, such as to navigate.

00:33:47.655 --> 00:33:53.470
Now if you wanna delete a rule, it's really simple. All you gotta do is go into your permissions,

00:33:53.550 --> 00:33:59.950
find the rule that you want, hit on it, and just say if you wanna delete it or not, and that's it. Now here's something important.

00:34:00.110 --> 00:34:16.635
Be very careful with permissions. Don't just copy someone else's permission rules unless you understand exactly what each command does. Allowing Claude code to automatically run tools, especially ones that create or edit files, can cause major problems if misused.

00:34:17.500 --> 00:34:29.580
The pr comments command lets you view the comments from a GitHub pull request inside Cloud Code. And the review command allows Cloud Code to review a GitHub pull request for you.

00:34:30.745 --> 00:34:34.025
So the status command shows your working directory.

00:34:34.265 --> 00:35:01.555
It shows what account you're logged into. So if you have the Max or Pro plan, make sure you are actually logged into that and not the API version. It also shows you what type of memories you currently have as well as which model you're using. So this is a great command just to kinda get a overview of your entire code base. The terminal setup command allows you to use the option plus enter keyboard shortcut to enter new lines. And for the VIM command, if you are a VIM user,

00:35:01.715 --> 00:35:07.395
this command will put clogged code into VIM mode, enabling VIM style keybinds.

00:35:07.395 --> 00:35:12.835
So if you're not familiar with VIM, don't worry about it. Personally, I don't use VIM, so I skipped this one.

00:35:14.310 --> 00:35:22.710
And that's it. This is a full overview of all the commands Claude code has to offer and how they work and how to use them effectively.

00:35:22.710 --> 00:35:24.950
I know this was a lot of information,

00:35:25.030 --> 00:35:27.110
and some topics like MCP

00:35:27.110 --> 00:35:47.664
go much deeper than what we covered here. But don't worry, I'll be making more videos on those topics soon. And I hope this was helpful and cleared up some confusions around some of the commands that Cloud Code has. If you have any questions or want me to cover something specific in a future video, feel free to drop a comment below. Thanks for watching. See you all in the next one.
