How I use Claude Code (Meta Staff Engineer Tips)
By John Kim
Summary
Topics Covered
- Validation Loops Unlock AI Self-Improvement
- Plan Mode Prevents Bloated Context
- Fresh Context Beats Bloated Context
- Juggling Instances Enables Parallel Development
- Context Engineering Drives AI Coding Mastery
Full Transcript
Hello. Hello there. How's it going everybody? Today we're going to go over
everybody? Today we're going to go over my 50 cloud code tips. I've been working with cloud code basically every day for about 6 months now. And I feel like I've
learned a ton of things. And yes, I am one of those engineers that are basically not writing code anymore. I'm
still in cloud code like 12 hours a day actively pair programming with cloud code basically and reviewing a ton of code. I still read every single line of
code. I still read every single line of code. That's actually my biggest
code. That's actually my biggest bottleneck right now, the reviewing of the code. But I thought it would be
the code. But I thought it would be great to show you kind of the best tips that I've learned along the way. And
these are kind of tips that I wish I knew when I was first getting started.
We're going to start off with some foundation stuff like setting up very quick setup stuff, a little bit about like cloud.md rules, like what you
like cloud.md rules, like what you should put in, what you should think about, and kind of some of the advanced stuff for later. But without further ado, let's dive into 50 cloud code tips.
So, I got my terminal here and I just have some slides behind to uh tell you guys what I'm doing. So, here is the foundations that I mentioned. We're
going to cover getting started, keyboard shortcuts, some essential like slash commands, and a little bit of a deep dive into the claw.md. So, let's get
started. All right. So, for tip number
started. All right. So, for tip number one, you want to run cloud code in your root directory of whatever project you're working on. So, for example, I have this Pomodoro app that I'm like
kind of been working on. So, I'll type in like claude here. And that's
essentially how you get started. And you
really want to do this because uh later we'll talk about this, but if you have rule files or any kind of setup, the initial root directory is where Claude is going to zip up the context into that
first token. So, if you ever wonder why
first token. So, if you ever wonder why you had a bunch of tokens used even though you just opened up Cloud, this is probably the reason why. is because
Claude's getting your project ready. All
right. So, one of the first things that you want to do is run slashinit like that. And what this does is claude
like that. And what this does is claude will go and look at your codebase and do an analysis of your codebase and then create that initial claw.md file in the
cloud directory of your codebase. Now,
there is like different directories that you could source from like you could have a global one or like this one. But
yeah, at a high level, what this is doing right now is just it's just looking at the codebase, looking for the architecture and then basically it's creating that claw.md. All right, so it
just finished. It does take some time
just finished. It does take some time and as you can see, it's kind of going and saying, oh, this is this is like a nextjs 15 app. It's like a portfolio
site. Yeah, it's just going over
site. Yeah, it's just going over highlevel things about this particular project. uh and then you could just
project. uh and then you could just essentially hit yes to commit that to your doclaw. So this is like really
your doclaw. So this is like really important for new projects. So I highly recommend you to run it. All right. So
the tip number two is that claw.md file
that we just created. It kind of runs on a hierarchy. So if you go to
a hierarchy. So if you go to memory/memory, you could kind of see right here that there is a checked in memory which is the current root directory and then there's a user memory. This is like your
global one. So that's like in your
global one. So that's like in your tilda.claw. claude/cloud.
tilda.claw. claude/cloud.
So you could kind of choose between it, but it's it's really there so you can know what the core rule that the cloud code is operating on right now. Looking
at the cloud.md that claw just created like this is a pretty good one to get started, right? It it just has like you
started, right? It it just has like you you don't want it to be too large. It's
like very small, right? I I think around 300 lines is about a decent place that you want to aim for. And to be honest, going larger is fine, but just remember
that every time you increase that initial context window, you're going to use more tokens first of all, but also the more bloat you have in your context, the less likely the AI will do exactly
what you're trying to do. All right, so for structure and what you should be thinking about putting into your cloud.
MD, I just opened another project. This
one is my anime Pomodoro. This is an iOS app. So I wanted to show you a little
app. So I wanted to show you a little bit more examples but basically the things I like to put is like highle technical architecture and the requirements you know like what is the
project like that's kind of important and then you want to give it like some domain context right like oh it's using swift UI and I probably would add highle architecture and like kind of the file
path and things like that and just some of the highle design patterns like you'll see like all of that should go in here and And then one of the important
thing is kind of having your build flow like your validation flow. And this is like kind of where my build and validation is. So you can see that I'll
validation is. So you can see that I'll like build the Xcode and then build the project, make sure things compile. Just
having this loop of validation is so amazing because the AI will just be able to self-improve and keep going until it fixes itself. So like if you were ever
fixes itself. So like if you were ever in a situation where you just like ask cursor to do something or ask some AI code agent to do something and it just
doesn't work a lot of that gets resolved when you fix the validation. And
validation, I think as a side tip, is probably one of the most important topics that you should really think about when you're thinking about trying to build good AI agentic like coding
systems or any workflows is really what is the validation loop because that will dramatically improve how good your AI will be. All right, so let's go to some
will be. All right, so let's go to some keyboard shortcuts. And the reason why I
keyboard shortcuts. And the reason why I even have this entire section for this is because if you're going to be in cloud code all day every day, like if
you're an engineer, you're just going to be on this workhorse for quite a while.
So you should learn how to actually use most useful hotkeys. And there's
essentially shift tab toggle modes is pretty useful. And that's just like
pretty useful. And that's just like hitting shift and tab. And then you can see right here that we're switching from accept edits to plan mode. I actually
use plan mode quite heavily. I I think I use plan mode almost exclusively whenever I start a new feature. It's
rare that I start in edit mode. I always
just want to verify and double check that my assumptions about the codebase that I'm working on and the the direction that I'm trying to go with is the best option. So, I usually start in
plan mode and I spend a decent amount of time before I go to accept and just like start execution. All right, escape
start execution. All right, escape interrupts. Let me just get something
interrupts. Let me just get something started here. Tell me a good way to plan
started here. Tell me a good way to plan a live activity for when I background the app. Okay, so I'm going to let this
the app. Okay, so I'm going to let this go to show you guys what escaping the interrupts is. But you can see that
interrupts is. But you can see that Claude is like thinking here and it's like going through and doing things.
Sometimes if especially during plan mode, you want to kind of like look at this and look at the thinking and see if it's going off track. If it is, you just hit escape and then it interrupts. Now,
a lot of people might be like kind of like scared to interrupt it, but you can just like hit up and then go right back to where you're doing or you could just interrupt it and tell it something else.
The whole point is Claude Code has a really good way of like dduping and entering prompts in a nice queue. it
like it logically knows what to do. So
you don't have to be so scared to like enter more than one prompt and also like escaping early and interrupting and changing course like it's actually recommended to do that. Tip number eight
is if you ever had something like really big or you copy pasted something and you're like oh I don't want to delete everything. A handy shortcut here is
everything. A handy shortcut here is just double tap escape and it'll clear the input. There's also a vim mode if
the input. There's also a vim mode if you're into that, but I use this all the time. Another thing is when you're on a
time. Another thing is when you're on a empty input, if you double tap escape, you'll see that you can rewind to like a previous point uh and then restore that
context point. This is kind of common
context point. This is kind of common with clock code, but a lot of the tools I feel like is really built to manage your context and context engineering.
And then there's just like an agent that is wrapped around the orchestration. But
a lot of the like slash commands and stuff that we'll be going over, I feel like it's it's really to manage that context window. All right, screenshots
context window. All right, screenshots is obviously a pretty common thing to do. There's a lot of ways to do it, but
do. There's a lot of ways to do it, but you can essentially take a screenshot and then drag it over and just drop it in. And then obviously another good tip
in. And then obviously another good tip is to add context. This is a cool picture of the Clock mascot. Do
something with it. I don't know. But
yeah, so that's a really good example of like taking a screenshot and bringing it over. If you are doing any kind of UI
over. If you are doing any kind of UI work, you'll definitely use this workflow. I also highly recommend
workflow. I also highly recommend finding like a Figma MCP or some form of MCP that works really good with the specific validation that you're trying
to do. All right, moving on to essential
to do. All right, moving on to essential commands and this is slash commands.
Before I end on the keyboard shortcuts, there's a lot more keyboard shortcuts, things that I don't use all the time.
And if you just go to like /help, you'll be able to see a bunch of them. But the
ones that I covered, I use all the time every day. So definitely just memorize
every day. So definitely just memorize it. I think it'll be really useful. Now,
it. I think it'll be really useful. Now,
essential commands is like the slash commands that I think you should know about. There's way more slash commands
about. There's way more slash commands and you could like make your own slash commands, but these are the ones that I think is useful. All right, so slashcle
is basically a way to clear the context.
Now, you could actually do this by just creating another instance of Claude, right? That's basically the same thing.
right? That's basically the same thing.
But if you don't want to like do that, you could just clear the context. And
this is really good if you want to start a new feature and you're completely done with the old task and you don't want the old context to blow up the new context and influence the new project that
you're doing. All right, so I just
you're doing. All right, so I just loaded some stuff. Let's uh go into slashcontext.
What this does is it will give you like a visual representation of the current context that cloud code is operating in.
Now why is this useful? So the main reason why this is useful is because it gives you an opportunity to reason about the context that cloud code is making
assumptions on on your codebase. Now, I
always say context is best served fresh and condensed. And you really want to
and condensed. And you really want to take a look at this from time to time.
If you ever felt like cloud code has regressed and like things are not working the way it is or your like cost and usage like bill is going up, you really want to look at this and then see
which are like the most biggest offenders, right? You just want to like
offenders, right? You just want to like audit it. Like MCPs are one of those
audit it. Like MCPs are one of those very common things that blows up your tokens. I mean like look at all of this
tokens. I mean like look at all of this Xcode related MCPS and every time it runs it like I mean these are not a lot because I haven't been doing that much in this particular workflow but you
could just imagine that once I start doing those iteration cycles this like usage will like blow up but yeah so if you look at this and you're like oh this MCP is using so much then you could
remove it or just disable it for this directory. So slash context is something
directory. So slash context is something that you probably should not ignore.
Again, I think cloud code, all of the tools is really there to manage a lot of the context and doing really good context engineering. So, this is a good
context engineering. So, this is a good uh slash command. All right. So, in
terms of compaction, like if you use cloud code at all, if you had a long session, it will start autoco compacting at some point. All auto compaction does is just takes your current context
window like context that you created and then it will just summarize it and then it does a pretty good job. For my
projects, I usually just let the autoco compaction work. But if you really want
compaction work. But if you really want to compact what you have right now, you could just compact. But I I rarely use this. The only time I use this is if I
this. The only time I use this is if I want to save some version of my context into like my local like second brain. If
you haven't seen that video, go and check it out. But I have this second brain concept when I work on projects and that's where that goes. So for
slashmodels, this is like very useful. I
think if you have unlimited tokens, like if you're doing this at work, for me, I usually just uh default it to Opus 4.5, but if you're very like cost sensitive
and you know certain workflows work well in Sonnet or like I coup, then you could just go and change that. Um, keeping at default is fine too, but I would try to
use Opus as much as possible. All right,
so slashresentally like lost your instance. Let's say you created another one and then you accidentally killed it or something like that, right? Oh, you killed the wrong
that, right? Oh, you killed the wrong one or something. Then when you go back into claw code, you could do slash resume like so. And then it'll give you kind of
like so. And then it'll give you kind of the old context and then you could like recover your context so that you don't lose the all the work that you did in
building up that context window. All
right. slashmcp is really about um showing the MCPS that you have installed. If I have to be honest, I try
installed. If I have to be honest, I try very very hard to not use MCPS because I think they blow up your context window.
So I only install ones that are needed for that very specific project and I try to just leverage cloud code and write scripts and like these kind of things
manually like myself to do the validations and things like that. But
some projects you just do need MCPs like this Xcode one, you kind of need it. And
for other projects like my Nex.js apps, I have like a whole set of MCPS for that. But just be careful with MCPS. But
that. But just be careful with MCPS. But
it's a really fantastic way to teach Claude how to do certain things, especially with like third-party software and things like that. You know,
it's a protocol, right? Model context
protocol. So, it's basically used everywhere, but again, it's known to blow up your token usage and your context window. So just be careful. All
context window. So just be careful. All
right. So slashhelp is the last thing I'm going to teach you. You know, teach a man how to fish. So this like little wizard here will just teach you what they are and give you like descriptions of everything. So just go ahead and like
of everything. So just go ahead and like try these out and just take a look and you know explore. All right. So the next thing is around git. So you could ask cloud code to manage your git. I think
there's a bunch of like skills you could download to cloud code to manage all your git. And I think that's something
your git. And I think that's something that you should do. Like I write a lot of my summaries and test plans all using like cloud code. Now obviously I have my own templates that I wrote. So claude
kind of sounds more like me and is not too verbose and things like that. So I
highly recommend you to use git as a safety net. There is actually a rewind
safety net. There is actually a rewind feature like I think I told you where you could restore the code and the conversation but this is a little confusing to me like git is just better.
I use this as like a last resort if I didn't have git for a certain checkpoint. So now that you know how to
checkpoint. So now that you know how to just navigate around cloud code and things like that and just kind of highlevel important like commands and things like that, I think it's a good
time to deep dive into the claw.md file.
I think for most people, most users, like 80% of users, if you just have a really good claw.md file for your
project, you could get really, really far without learning like all the advanced stuff. Just having a really
advanced stuff. Just having a really good rules file will save you a lot of headaches. Let's kind of dive a little
headaches. Let's kind of dive a little bit deep into this. Okay. So, one of the most important things in the claw.md
files is first of all, it's like it actually reads top to bottom and it keeps the priority from top to bottom. I
think that's like a very small nuance.
I'm pretty sure that's true. I think I read that somewhere, but it Yeah. So,
you want to go top to bottom as like important to least important. And you
want to add things that are like never do something, but always do this. and
then have like clear snippets of examples I think is really good and I don't have that many on this particular project because it's stock swift UI but the context here is that you should
really think about how unique is your project how many things about your project is like homegrown and essentially like the AI may have never seen like remember a lot of this code is
like basically a lot of the AI like coding is basically just an accumulation of like the s code that the AI is
trained on. So, it might not know your
trained on. So, it might not know your like super special DSL language that you created or like some random archaic patterns that your company has. And
that's where you'll be like, "Oh, why is the AI never doing this?" So, whenever you run into something like that, you want to fix it manually and then you just update your claw.md rules so that
it never does that mistake again. Think
of it as like lint files kind of. And
then when you ask claw to update the rules, you shouldn't ever do it manually. You should just go here into
manually. You should just go here into claw and and say, "Hey, can you update that rule for me so we never do it again?" Something like that. Like as
again?" Something like that. Like as
simple as that will go and update your claw.md files. You see how it's trying
claw.md files. You see how it's trying to do it? Obviously, there's nothing that I just did. So, this has nothing to add, but yeah. Okay. it it added something that I thought but you get the
point. All right, so this next one is
point. All right, so this next one is really around using like keywords to trigger your skills. So basically I have these like build commands inside of my
rules. So when I say hey use my Xcode
rules. So when I say hey use my Xcode MCP to build it will try to build the app for example. Use my Xcode MCP to build the app.
Okay, my whisper stuff is like failing a little bit, but maybe it'll get the gist of it from build the app. And as you can see, it's it's asking if I can use the
XCO build MCP. So that's kind of the high level of like using skills and like trigger words to be able to trigger certain behavior. This next one is
certain behavior. This next one is something called like compound engineering. That's like kind of a new
engineering. That's like kind of a new term that is being discussed, but it's essentially to take your claw.md and
start like committing it into the codebase. Now, obviously, you need to
codebase. Now, obviously, you need to get rid of anything that's like generic for your code like file path and things like that. And you also want to be
like that. And you also want to be mindful of how large this file becomes, right? Because like I said, every time
right? Because like I said, every time someone hits claude in that directory or claude is trying to read that directory, it will load that claw.md file. So you
don't want to blow up other people's context windows. So you really want to
context windows. So you really want to be have this be like a high bar when you're committing it. But the nice thing is once that's in, you essentially make that AI coding experience better for
your teammates. But you just need to
your teammates. But you just need to make sure that whatever you're landing is actually helping. There's a lot of school of thoughts around this right now. I don't think it's like completely
now. I don't think it's like completely solved, but there's got to be some form of evaluations here. And a lot of people are just using like vibes. So, you just like test it for like a few weeks and
then you just try to land it and then ask for feedback essentially. So,
dangerously skip is essentially like claw code in yolo mode. Um, you know, like just basically if you use claw code, it will ask you to accept a bunch of stuff. It could get really annoying.
of stuff. It could get really annoying.
So a lot of people they use you know claude and then dash dangerously skip.
Okay. So it's dash dangerously skip permissions. And when you run this cloud
permissions. And when you run this cloud code will no longer ask you essentially to accept that. I think it will completely just ignore it except for like anything you put into your slash
permissions which we'll talk about. But
you only really want to do this in in environments that you can kind of throw away and you're doing specific work that is not like super dangerous. Like if
you're going to start touching the OS and stuff like that, you could really mess it up. I've messed up some of my Linux machines because I was just going too aggressive and I was just testing it out and I was trying to set up some of
my Linux stuff using claw code and then like I had to reflash the entire thing.
Like I said, you can use slashpermissions here to kind of like uh tell which ones are like you still want
to accept. So it does, you know, like
to accept. So it does, you know, like rm-rf or something like don't do that or Yeah, just like mutations like just be careful with mutations like deletion
mutations, right? Um, all right. The
mutations, right? Um, all right. The
next big one I think now that we talked a little bit about the cloudmd rule files, I think we should talk about workflows because I have a very specific
way I like to work and I've actually refactored my entire work so that it's works with cloud code. You know, I used to use cursor or like Android Studios
mostly and VS Code to do a lot of coding and stuff like that. But I dropped basically all of that and I use just iTerms. Now, um, some people use
obviously Vim, but I think iTerms is fine. So, I'm going to show you guys a
fine. So, I'm going to show you guys a few things. So,
few things. So, like I said, I always start with plan mode. Let's go and like plan like a
mode. Let's go and like plan like a little feature for this Pomodoro app that I've been like kind of working on.
I don't know. I actually need to remove a bunch of audio stuff. So, let's just say audit my codebase and make sure that we're removing all of the audio playback
and references to the audio of part of the Pomodoro app. I'll always start with plan mode and I'm like iterating with Claude code. I'm arguing with it. I'm
Claude code. I'm arguing with it. I'm
having a conversation with it. You know,
Cloud Code, you're so beautiful. You're
so amazing.
No, but like I'm really treating it as like another like just good engineer that I'm like working with and I never just like purely accept the first answers that it gives to me. I always
kind of challenging it and I spend a lot of time and put a lot of effort at this stage of the development because I feel like once cloud code builds up that
context and have good execution specs, the generation of the code is actually the easy part. And I I do want to take a moment and talk about like kind of the
news cycle about people saying, "Oh, like people are no longer writing code."
I think like the creator of NO.js said like the era of like people writing code by hand is essentially over. And I
actually truly believe that. And the
thing is I love like being in the zone and writing code. At least I used to.
The thing is it's really hard to get back into that mode. It's like very different levels of abstractions of the way you're working. And right now I'm just doing one instance of it. But you
could imagine um just having like multiple clawed instances like this and and and then you're just actively working on a bunch of different things
at the same time because you have this like new superpower. The new next level of engineering is really like jumping between clawed instances and and really
context engineering that instance and then getting it good enough to start executing. And I keep talking about this
executing. And I keep talking about this like context, right? And this tip is really around like fresh context beats like bloated context. I think I kind of
cover this throughout this, but that's why you want to start with plan mode.
make sure it's good and then just go and execute instead of like having a bunch of like try this and then try that and then try this and then try that. Like
that will just bloat that context and then the AI will get really confused at some point because it it can't remember what what part of what was good and not
good. So that's why you want to spend
good. So that's why you want to spend the time in the beginning building up the good context. have a good plan dog.
So, it always has something that initially was good to reference and then it builds little by little. All right.
So, this next one is really around um persisting that context. Uh I have a full video on this about like the second brain concept. So, I'll link it here.
brain concept. So, I'll link it here.
But the idea here is that let's say you finished something, you could just say save this to my local claw.md in my projects directory. Save the work that
projects directory. Save the work that we just did. So you you could say something like that and then um I I essentially have a full workflow for
this to manage this. But yeah, you could do that load my context from my local projects. So once you have that second
projects. So once you have that second brain concept, you could say a command like this and it will pull that context and then load it for your new session.
So here's a good example. I like to do a lot of my todos inside of cloud code itself. These are kind of the highle
itself. These are kind of the highle things that I still need to do for this next feature that I'm working on. So I'm
like working on a widget for this Pomodoro app and I have like a live activity for example and I'm also like deleting all the music stuff because I don't think it adds value. So I have a
bunch of stuff that I'm tracking but because I keep all the to-dos in my local index like that I'm lazy loading.
I don't always load it. I only lazy load it when I ask for it. It allows me to like context switch from project to project without like carrying around like complex I don't know a sauna boards or whatever. I just keep it all in here
or whatever. I just keep it all in here and it's this is this works because it's my own project. But you can technically do this with like an MCP with a sauna or I don't know Jira or whatever as long as
you can whatever project management that you can think of. All right. So, I think we covered this a little bit, but really think about the build cycle. Like,
obviously, if you're mobile, think about Xcode, building the Xcode, but there's a lot of other workflows that you could think of. Like, for example, you could
think of. Like, for example, you could ask Cloud Code to like let's say you're debugging something that's like kind of tricky, has like race conditions or things like that. You could ask Cloud
Code to like add debug logs for example, and then run the app and then have Cloud Code control the emulator. You could
just ask it to do that and then like do the actions that you're trying to do and then read the logs through a tail log or something and then debug that way. Or
you could use like peretto or something like that. So for kind of performance
like that. So for kind of performance things you could hook into peretto mcps do a run and then have it read the traces and then see if it can find jenk just from like the timings, right?
There's just so many validation loops that you could think of. Like for web, you could do like puppeteer and have claude navigate it using a /chrome command and then just actually do the
navigation or have it write just test or have like integration end to end integration test. You know, there's
integration test. You know, there's there's a lot of things that clock could do and it really is up to your imagination, but it's the single most important thing in my opinion if you
want to have a more automated loop that like generates good code on like the first try. So going back to the
first try. So going back to the slashmodels really just consider using Opus if you can afford it. It's just the best way. All of these are a little bit
best way. All of these are a little bit slower but because the way I work is I have multiple cloud instances. Obviously
it's like very small right in here but I have multiple cloud instances running at all times and then the way I work is basically just juggling these cloud
instances. So even if one of them takes
instances. So even if one of them takes a long time, it doesn't matter because I'm like I gave the command and I go to the next one. I'm building the context.
I give a command and I go to the other one and then I give a command. So So
like you end up like still can get into the zone, but it's like a different style. So, I talked a little bit about
style. So, I talked a little bit about interrupting earlier, but you really want to like look out for like assumptions or the key words are like,
"Oh, I'm not really sure." Or you'll see like errors happening. I'm having a hard time like getting it to do this in this
example, but um just just know that like when you go and look for the best ways to delete an app. I don't know.
I I'm just giving it a random prompt to try to make it go off course. But if you see it going and making assumptions about certain things, okay, this time it didn't even really because it's just
new. But you should just interrupt it
new. But you should just interrupt it like that, you know, and then and then just course correct it. So don't worry about course correcting. Okay, so the next section is around power users. I I
don't really like to say power users, but most people that I've talked to don't really know like the differences between a slash command or a skill.
They're they're kind of interchangeable now. And MCPs, sub aents, you know, post
now. And MCPs, sub aents, you know, post hooks, pre- hooks, like these kind of primitives that cloud code is like known for and kind of like invented. And we're
going to cover some of that and and how this these are all like composable in nature. Okay, so I call it the
nature. Okay, so I call it the composability framework, but it's I just really wanted to highlight that these are composable more than anything. But
there's four primitive like composable things. All the slash commands are
things. All the slash commands are technically composable with each other, not directly each other, but anyways, so we're going to just go over the fact that like how these are composable.
Okay, so let's first talk about skills.
All a skill is is like you do a workflow. So let's say that um I tell
workflow. So let's say that um I tell claude go and fetch hacker news for latest iOS news.
So let's say I tell it to go and fetch hacker news for the latest iOS news and then and then I tell it to save that.
Okay. and then save um a summary to my local uh claude.md
uh claude.md claw directory.
Okay, I misspelled that. But basically,
let's say that it went and found some and then it's save it into my local directory. Let's say I wanted to build a
directory. Let's say I wanted to build a skill around that. So, you just saw me do two things. One is fetch something from a source like hackernews and then
save that thing to my local directory.
That's technically a workflow. So all
you have to say do is save what we just did into a new skill called fetch hackernews. And that's basically it to
hackernews. And that's basically it to create a skill. It's basically a recurring workflow that you can just tell Claude to remember. And behind the
scenes, it's actually just an MD file as you can see right here. Oops. And as you can see here, it's literally just a system prompt. It's an MD file, but
system prompt. It's an MD file, but Claude has specific directories that is looking for skills and will be able to infer this next time I say go fetch
something from hackernews or use my hackernew skill to fetch articles. Yeah.
And then commands is basically now interchangeable. It's it's a pretty
interchangeable. It's it's a pretty recent change, but you can see that um skills is written into the skills documentary and it there's also now a slash command called slashfetch
hackernews. This is a very recent change
hackernews. This is a very recent change from anthropic where they kind of like combined uh commands and skills. But
yeah, so now you can just do slhacker news and then now it'll rerun that system prompt. For example, it added
system prompt. For example, it added like an additional like assumption thing. That's pretty cool. It's not
thing. That's pretty cool. It's not
exactly what I did, but it kind of inferred that I would probably want that. So, those are the little cool
that. So, those are the little cool things. And the thing is you could
things. And the thing is you could update these anytime you want. You know,
you could just ask clot to do do something else.
All right. So, like I said, you never want to manually create these kind of stuff. You want to get in the habit of
stuff. You want to get in the habit of asking Claude to update and manage these skills. So we could say why don't you
skills. So we could say why don't you extend this fetch hacker news to fetch Twitter or Apple news for example. Now
sometimes it won't work 100% exactly right. Okay. So you see this it doesn't
right. Okay. So you see this it doesn't have Twitter authentication access. So
it's trying to just do some other ways.
Yeah. Multiple sources. So you can see how it's all updating that system problem that we wrote, right? and then
fetch hacker news and so forth. You you
get the idea. All right. So, MCPs, I think we covered it a little bit during the the rules, but basically MCPs, you
just want to find MCPS like this, right?
Like they're just model contextes. But
kind of a hack is like you don't actually need to search the web for an MCP. You could just be like, "Find me a
MCP. You could just be like, "Find me a good Figma MCP." you could just ask Claude to find it for you and then most of the time it does a good job. The only
thing is like uh sometimes it's outdated so it'll it'll like know of one that's like was popular a little while ago rather than doing a web search. So you
just have to be mindful and that's why I'm saying like for certain actions you want to read how what it's doing and look at the thinking and then cancel it if you want to. And you could have
Claude also install the MCP. So you
don't have to like manage like the configs and stuff yourself like you had to with cursor. Yeah. So you could ask Claude to install the MCPS. So like
right here it says go and do this, right? But instead I could just be like
right? But instead I could just be like why don't you just install this for me for example? And then it will just go
for example? And then it will just go and install it for you. All right. So in
terms of sub agents, I don't know if I have one for this. I might have like an iOS I might have one like an iOS like
context scattering or like architecture agent. Let me try it. So spawn a iOS
agent. Let me try it. So spawn a iOS architecture agent sub agent and do some investigation on and on my codebase and
see if it's actually good or not.
Um, so you can build sub agents just like you can with uh slash commands and skills. All you do is just ask it to
skills. All you do is just ask it to make a sub agent after you do the work once. The main reason why you want to
once. The main reason why you want to create a sub agent is really to do parallel work, but also it's to protect
your context window. So like I said, one of the key features of cloud code is to manage your context and do context engineering. And sub agent is a huge
engineering. And sub agent is a huge way. And I think a lot of people are
way. And I think a lot of people are using sub aents incorrectly because they do things like this where you have like an iOS sub agent, right? By the way, it's not triggering the sub agent. I'll
just make one after it creates it and show you guys what it looks like. It
like highlights it in like a different color. But a lot of them have this like
color. But a lot of them have this like workflow where they'll tell it to go do something that does the context gathering and then they ask to like
bring it back but that part that portion of the context that's bring brings back from the sub agent it's only like the output it's not like how it got there so it doesn't have the full context. So for
those kind of works I usually just keep it within the context window because those are the things that are really good. use what we just did to create a
good. use what we just did to create a iOS architecture sub agent. But yeah, so so often times people mistake that you
want to like have a validator agent, you want to have like a testing agent and all these kind of things. But I try to keep the all the things that need that
context to do its work within the same cloud code session because like a good testing agent needs to know about the code that it wrote most of the time. in
my opinion. Of course, sometimes things could live in isolation. So, what are really good things for sub agents is really just like things that are atomic
in nature that you want to just have it run as side effects and just go and do.
But yeah, so that's what I use sub agents for. I don't use sub agents that
agents for. I don't use sub agents that often. I know some people like love
often. I know some people like love using them, but one of the most common like clowny kind of use cases that I've seen is like CEO agent, product agent, design agent, and stuff like that. And I
don't really believe in that particular workflow. Like you really want to have
workflow. Like you really want to have this concept of bringing the work to the context rather than trying to spread out the context that's gets created. All
right. So, and this kind of ties into it like you want to avoid like having a lot of instructions and overloading the context all the time. You want to keep
your context condensed and fresh. So
that watch my video on the second brain and you like that's it'll teach you a lot about like lazy loading and then having this like ongoing project domain thing that builds over time and you want
to essentially use that as your rag system to build like a good context and then be able to just have fresh and good context all the time for your AI to
execute on. All right. So, here is some
execute on. All right. So, here is some interesting like advanced workflows. And
I really think that the big game changer in my opinion for cloud code and why I think cloud code is just so amazing is that you can do a lot of parallel
development. This is why I had to like
development. This is why I had to like fully change how I work using like terminal and stuff because you could run multiple instances. And I already kind
multiple instances. And I already kind of showed you guys this, but you could just swap between these and just have like multiple things running at the same
time. So I could say start working on my
time. So I could say start working on my live activities feature. So I could just have that. Obviously I would do it in
have that. Obviously I would do it in plan mode, but I'm just showing you guys. And then over here I could just
guys. And then over here I could just say all right let's test out this iOS architecture and and then just spawn a sub agent. So as you can see I'm doing
sub agent. So as you can see I'm doing some investigation on one side and then I'm doing live code editing. But the
thing is I could always just create another one go to like a different project like this and then now I could be saying hey I want to work on a new newsletter
for example. So I could be doing a bunch
for example. So I could be doing a bunch of stuff all at the same time. So that's
like a really so understanding how to juggle this and doing it effectively I think is like the next step function change and I just want to kind of shout
out it terms I think it's like really good um because you know you could do command D to create new instances like this right and then you could juggle
between uh the terminals using command um uh the left bracket and right bracket like ignore this like slash it's like I'm just saying, oh, it's left bracket
or right bracket like slash, right? But
yeah, so and you could do that. You
could also, if you have multiple tabs like this, you can actually swap between it. And at work, what I do is I rename
it. And at work, what I do is I rename like what I'm doing in here. Like I'll
say local and maybe here I'll say like remote SSH or something like that. And
then from the remote SSH, I could have claude like running like this. And I
could spawn a more, you know, and then and then I could just be going back and forth here. So, it really feels like I'm
forth here. So, it really feels like I'm playing Starcraft to some degree, right?
And all of these I'm just doing with uh my keyboard. And when I'm home, I'll
my keyboard. And when I'm home, I'll just like be in Whisper using Whisper, which is like this voice little thing that you see right here. And it just translates speech to text really
quickly. Sometimes it's not that
quickly. Sometimes it's not that accurate, but so I'm just like switching switching and I'm just basically talking to it, you know, just literally working as in multiple projects all at the same
time. I think my bottleneck right now is
time. I think my bottleneck right now is really how much context switching I can do in my head. So yeah, another thing is enabling notifications. You could tell
enabling notifications. You could tell clock code to change the notifications, right? Uh you could just say change the
right? Uh you could just say change the notification to ring a little sound when you finish execution, for example. And
then when is now it will basically ring like a little notification and you could do a lot of things. At one point I had like um text to speech where it like
reads a summary of uh one of wherever it finish it will read a summary. So I
could be like okay I got to go back to tab two and then go do something. Um but
that was too much so I disabled it. Gig
work trees is another way to do multiple code execution. So, one of the
code execution. So, one of the bottlenecks that you'll see is if you have these kind of like bunch of multiple instances, you'll soon realize if you're doing local development, you won't be able to make code edits the
same project unless you use git work trees. And I'll add some descriptions on
trees. And I'll add some descriptions on how to use git work trees. But
basically, it's it's a way to like clone multiple instances of your codebase and have like different forking branches.
So, you could have like you could work on like code like executions in the same project. Uh, slashchrome is actually a
project. Uh, slashchrome is actually a really cool tool in my opinion. So, the
way you get to it is by just doing slashchrome like this and then it'll go to like /chrome and then it'll open this thing. You can't see it here, but
thing. You can't see it here, but there's like a little button and it just opens it and you could actually navigate
the browser. So, go to tip number 46.
the browser. So, go to tip number 46.
So what it does is it will look at the website and and you could approve the plan. You could allow the action. So
plan. You could allow the action. So
basically it will create the plan and then it will like do it. Okay. It
doesn't it doesn't really know how to do it. So um I'll say
it. So um I'll say hit let's just try YouTube. I think
YouTube might be easier.
Okay. So we'll we'll open YouTube and it'll say find a video on cooking for example.
Yep.
So you can see that it like takes a screenshot. It will like click it'll
screenshot. It will like click it'll type cooking and then it will like find cooking videos for example. And then so I use this whenever I don't have API
access to certain things but I can get there via my web and and because you could control it via slashchrome you can have it as part like I mentioned that
all of these are composable so you could have a command that goes to Chrome scrapes a bunch of stuff and comes back to you with the data. Okay, so moving on. Like I mentioned, it's really good
on. Like I mentioned, it's really good for powerful like debugging, right? You
can navigate the web with it. Uh that's
also part of the validation thing that I was talking about. You can fill out forms and stuff. All right, hooks and automation is really just like kind of the cherry on top. And this is very
similar to like GitHub's pre hooks and GitHubs like post like commit stuff like recommit stuff. So basically these are
recommit stuff. So basically these are hooks and as you can tell it's just like something to do before you start executing or after executing and after
executing fails. Like there's all these
executing fails. Like there's all these things that you can do and you shouldn't manually do this. You should just ask claude to like add these for you. You
know like go back to that principle that you're no longer m manually maintaining your work environment. And a good example on what to put here for the post
uh tool use is like you know things like uh our like linting and and formatting your code and things like that. And I'm
not really using this yet but basically uh this is really good if you want to block like removing your entire like database or something like that. It's
just like good good to prevent very destructive things. I haven't really set
destructive things. I haven't really set it up because you know I have like remote backups and also this is like side projects but for real work you probably want something. And finally
with that I think you got the vast majority of like the best tips that I know for clock code. Um the last thing I'll leave it with you is to explore the
like the plug-in ecosystem. All a
plug-in is is a just a combination of any of these composable things that I talked about like a skill that triggers an MCP that triggers like sub agents or something like that or maybe there's
like a bash script that's attached to a skill that can all be turned into a plugin and then a lot of people share their plugins online. So this is like a really good example. You know, Anthropic
has their own like plugins like structure and they have a bunch of plugins here that you could download.
for example, um like colon ISP and things like that. So that's basically it. And the last thing I want to say is
it. And the last thing I want to say is context is king. You got to keep it fresh, keep it relevant. You essentially
need to give Claude the context that it needs and nothing more.
But yeah, so go and build something amazing. I hope this was valuable to
amazing. I hope this was valuable to you. I hope you learned something. go
you. I hope you learned something. go
and build something amazing. And if
you're interested in this kind of video on cog code, I did a whole video on like kind of the highle thought process of like AI coding and and also talked a
little bit about my second brain thing.
Those two videos are right here. So go
and check it out. But yeah, until I see you guys on the next video. Bye.
Loading video analysis...