[00:00] (0.08s)
Cloud Code powered by the new Cloud 4
[00:02] (2.24s)
models produces the best AI code I've
[00:04] (4.40s)
seen yet, but it does run in the
[00:06] (6.32s)
terminal, which means it can be a bit
[00:07] (7.92s)
intimidating at first. There's also a
[00:09] (9.44s)
few quirks. So, in this video, I'll show
[00:11] (11.44s)
you the top 10 essential tips you need
[00:13] (13.68s)
to know to get the most out of Cloud
[00:15] (15.36s)
Code. Let's go.
[00:18] (18.96s)
So, I'm logged into Cloud Code, and if
[00:20] (20.56s)
you ever done software development
[00:21] (21.68s)
before, you're going to know that a
[00:23] (23.12s)
little bit of planning goes a long way.
[00:25] (25.12s)
And Claude has a secret way to do this.
[00:27] (27.44s)
So, if you go shift tab, you see in the
[00:30] (30.40s)
bottom there, it's going to switch to
[00:31] (31.52s)
auto edits, edits on. Do it one more
[00:34] (34.32s)
time. Now, it's going to go to planning
[00:35] (35.60s)
mode on. And what this mode does is it's
[00:38] (38.16s)
not going to update your code at all.
[00:39] (39.44s)
It's just going to do planning. So,
[00:41] (41.68s)
let's put in here plan to build a
[00:43] (43.12s)
Shopify application that enhances
[00:44] (44.72s)
merchants product descriptions with AI.
[00:46] (46.88s)
And in the planning mode, it's going to
[00:48] (48.24s)
start doing some web searches usually,
[00:50] (50.48s)
which is great cuz then you get latest
[00:52] (52.00s)
information on whatever you're trying to
[00:53] (53.44s)
plan to build. I notice it does much
[00:55] (55.76s)
more in the planning mode than it does
[00:57] (57.52s)
in normal mode. So that's a really good
[00:59] (59.84s)
reason to use it. And then at the end it
[01:02] (62.00s)
gives you a report when it's in planning
[01:03] (63.52s)
mode. So it's going to tell you the
[01:04] (64.88s)
project structure and technology stack
[01:06] (66.64s)
to use, what it recommends, core
[01:08] (68.64s)
features of this application,
[01:10] (70.00s)
implementation steps, all that kind of
[01:12] (72.16s)
good stuff. And then at the end it can
[01:13] (73.76s)
say where you like to proceed. You can
[01:15] (75.20s)
actually start building it or you can
[01:17] (77.28s)
say no, keep planning and you get it
[01:19] (79.68s)
right from there staying in planning
[01:21] (81.60s)
mode. This is also great for adding a
[01:23] (83.68s)
new feature to an application. And then
[01:25] (85.20s)
when you're ready to leave, just shift
[01:26] (86.80s)
tab again and you go back to back to
[01:29] (89.12s)
normal mode.
[01:32] (92.24s)
You can actually add images directly
[01:33] (93.92s)
into cloud code. It's a really powerful
[01:36] (96.00s)
feature, but there's a bit of a trick to
[01:37] (97.52s)
it. So, let's take this application I
[01:39] (99.04s)
have built here and say we want to get
[01:40] (100.56s)
cloud code to analyze it and maybe add a
[01:42] (102.32s)
feature. So I can just go take a
[01:44] (104.40s)
screenshot of it and now I have a copy
[01:46] (106.16s)
to my clipboard and then in cloud code
[01:48] (108.16s)
you'd think on a Mac it would just be
[01:50] (110.00s)
your normal command V.
[01:52] (112.72s)
Clicking that nothing happens. The trick
[01:55] (115.12s)
is you actually have to do a controlV
[01:58] (118.16s)
which is counterintuitive.
[02:01] (121.28s)
When I do that now image one comes up.
[02:03] (123.28s)
So it doesn't give you a preview or
[02:04] (124.40s)
anything but when you see like image
[02:05] (125.84s)
number one that's the image you just
[02:07] (127.76s)
copied from your clipboard. I haven't
[02:09] (129.12s)
tried it out on Windows yet. It might be
[02:10] (130.64s)
the same kind of trick. Maybe it's the
[02:12] (132.40s)
Windows key or something, but watch out
[02:14] (134.16s)
for that. But once you do get it in
[02:15] (135.68s)
here, it's very powerful. Let's just say
[02:17] (137.36s)
do an analysis of this application's UI
[02:19] (139.28s)
and then what enhancements would you
[02:20] (140.64s)
recommend. And I find this very useful
[02:22] (142.96s)
for just looking at bugs in a UI or just
[02:25] (145.52s)
adding a feature, adding a button
[02:26] (146.96s)
somewhere. It actually is very good at
[02:29] (149.20s)
reading the image. And there we go. It
[02:30] (150.64s)
gives us some functionality
[02:31] (151.60s)
enhancements. These are a couple things
[02:33] (153.68s)
actually thinking about into the
[02:34] (154.72s)
application. So it's good that I picked
[02:36] (156.64s)
this up like directions integration and
[02:38] (158.88s)
store hours, stuff like that. Definitely
[02:40] (160.64s)
check out how cloud code can read
[02:42] (162.32s)
images. It does a really good job.
[02:47] (167.04s)
One really powerful command that I think
[02:48] (168.80s)
is a bit misunderstood and overlooked is
[02:50] (170.96s)
the init command. So if you're in your
[02:53] (173.84s)
project and you go to init, what it's
[02:55] (175.60s)
going to do is look through all the
[02:57] (177.28s)
files in that project and write a
[02:59] (179.84s)
claw.md file or markdown file and it'll
[03:02] (182.48s)
give you a comprehensive look at your
[03:04] (184.64s)
whole project. It'll give you coding
[03:06] (186.40s)
standards, technologies used, etc. And
[03:09] (189.20s)
then we see it created the claw.md file
[03:11] (191.28s)
in this directory. And then like I said,
[03:13] (193.28s)
it gives you the core components, data
[03:14] (194.88s)
flow, all that kind of good stuff. And
[03:16] (196.48s)
I've been doing software development for
[03:17] (197.76s)
a long time. This is some of the best
[03:19] (199.44s)
kind of lightweight documentation you
[03:21] (201.04s)
can get, especially for a smaller
[03:22] (202.80s)
codebase. But the really interesting
[03:24] (204.72s)
thing is it takes this claw.md file and
[03:27] (207.76s)
every time you do a new chat or start a
[03:30] (210.64s)
new session with claude code, it puts
[03:32] (212.80s)
this into the context. So if you put
[03:34] (214.40s)
this project on the side for say 6
[03:36] (216.00s)
months came back to cloud code later it
[03:38] (218.64s)
would actually bring in all this and
[03:40] (220.24s)
remember all this as context which is a
[03:42] (222.80s)
nice head start but also you can add on
[03:44] (224.64s)
to this yourself. So if there's things
[03:46] (226.32s)
you want cloud code to know when it
[03:48] (228.24s)
launches up for this project this is the
[03:50] (230.56s)
place to do it. This is kind of like
[03:51] (231.76s)
cursor rules basically.
[03:55] (235.36s)
If you're used to doing your coding in a
[03:56] (236.72s)
code editor one thing that will really
[03:58] (238.64s)
help is if you integrate a code editor
[04:00] (240.40s)
with cloud code so you're not always in
[04:02] (242.08s)
the terminal. It's really easy to do
[04:04] (244.00s)
once you install cloud code and it
[04:05] (245.44s)
detects you have an IDE. It actually
[04:07] (247.04s)
automatically installs it. There's also
[04:08] (248.56s)
an ID command you can run and that'll
[04:11] (251.52s)
tell you what IDs you have and connect
[04:13] (253.20s)
to it from there. Once you have it
[04:14] (254.88s)
connected, it's going to tell you what
[04:16] (256.48s)
file you're in and then has two-way
[04:18] (258.08s)
communication. So, if I highlight some
[04:19] (259.60s)
code, it's going to say 12 lines
[04:22] (262.00s)
selected. So, it's just targeting that
[04:23] (263.60s)
code to make changes on. It also lets
[04:25] (265.20s)
you visually see the differences between
[04:27] (267.20s)
a code change you're making.
[04:31] (271.04s)
So once you have cloud code hooked up
[04:33] (273.12s)
with your IDE, in this case I have
[04:34] (274.88s)
cursor, the next tip is to actually keep
[04:37] (277.44s)
cloud code and cursor or VS code,
[04:40] (280.48s)
whatever you're using for your IDE in a
[04:42] (282.40s)
separate window. It's going to make it
[04:43] (283.84s)
such a nice experience to code in. And
[04:45] (285.68s)
to do that, all you have to do is just
[04:46] (286.96s)
when you have Claude Code up, you can
[04:48] (288.40s)
just right click on that terminal and
[04:49] (289.84s)
say move into new window. And now you
[04:51] (291.60s)
just move that to your second monitor
[04:52] (292.88s)
and really do some vibe coding.
[04:56] (296.80s)
as well as using the built-in commands
[04:58] (298.40s)
in cloud code, you can actually create
[05:00] (300.08s)
your own and they can do whatever you
[05:01] (301.84s)
want and they're very useful. So to do
[05:03] (303.44s)
that, we'll create a new directory. So
[05:04] (304.80s)
you do a make directory under doclaude
[05:07] (307.68s)
and then call it commands and then you
[05:09] (309.44s)
create the commands by just simply
[05:11] (311.20s)
creating markdown files. So this one I'm
[05:12] (312.72s)
going to call doc.md
[05:14] (314.88s)
and then inside of it you can put your
[05:16] (316.80s)
arguments. So I'm going to say create
[05:18] (318.40s)
clear thorough documentation for the
[05:20] (320.08s)
arguments. So that's going be the files
[05:21] (321.44s)
we pass in and then include a
[05:23] (323.52s)
description usage examples and important
[05:26] (326.08s)
notes for developers. And once that's
[05:27] (327.76s)
created, you can just do / project colon
[05:30] (330.56s)
and then the name of the command. So in
[05:31] (331.92s)
this case, doc and then pass in your
[05:33] (333.28s)
arguments. So we'll pass in
[05:34] (334.48s)
storelocator.html.
[05:36] (336.00s)
So now it's reading that input
[05:38] (338.08s)
parameter. So you can make many
[05:39] (339.52s)
arguments for whatever you think you can
[05:41] (341.36s)
make up in terms of a command that's
[05:42] (342.88s)
useful to you. So it's going to read
[05:44] (344.80s)
through that and then it just gives you
[05:47] (347.68s)
what you asked for basically in the
[05:49] (349.36s)
prompt. So in this case is a really nice
[05:51] (351.04s)
piece of documentation describing this
[05:53] (353.28s)
particular file. I mean the sky's is the
[05:54] (354.88s)
limit what you can do with these custom
[05:56] (356.16s)
commands and they're going to save you a
[05:57] (357.52s)
lot of time.
[06:00] (360.56s)
Cloud code actually has some keywords
[06:02] (362.40s)
that tell it how much to think and they
[06:04] (364.96s)
all have the word think in them. So if
[06:06] (366.88s)
you say think it's actually going to
[06:08] (368.56s)
reason more, spend more time chew more
[06:11] (371.44s)
tokens all the way up to ultra think
[06:14] (374.32s)
which if it sees that word it's really
[06:15] (375.84s)
going to grind away and try to give you
[06:17] (377.44s)
the very best answer. Let's try it.
[06:19] (379.12s)
Let's just say Ultraink. The best way to
[06:21] (381.04s)
package this Shopify application that
[06:23] (383.20s)
merchants can deploy it. And there it
[06:24] (384.72s)
came back with the answer. But you'll
[06:26] (386.08s)
notice in this case the gray text is all
[06:28] (388.32s)
the thinking tokens it used along the
[06:30] (390.48s)
way. Definitely very useful to know in
[06:32] (392.24s)
certain situations. If you're into AI
[06:33] (393.84s)
software development like me, make sure
[06:35] (395.60s)
you subscribe to my newsletter, the AI
[06:37] (397.36s)
unleash news. It's the first link in the
[06:39] (399.36s)
description and I hope to see you there.
[06:43] (403.36s)
I think most people know that if Claw's
[06:45] (405.28s)
going in the wrong direction, like it's
[06:47] (407.68s)
not really following the prompt or you
[06:49] (409.04s)
can just see right away it's kind of
[06:50] (410.40s)
doing the wrong thing. If you just hit
[06:52] (412.56s)
the escape key in the middle at any
[06:54] (414.48s)
time, you can interrupt it. But what you
[06:57] (417.04s)
can also do, which is very useful, is if
[06:58] (418.80s)
you hit the escape key twice, it's going
[07:01] (421.28s)
to give you all the previous messages
[07:02] (422.80s)
you had. And now you can go back to the
[07:05] (425.68s)
one they interrupted say and it's going
[07:08] (428.08s)
to clear the history and go back to that
[07:09] (429.92s)
prompt which is a nice clean way
[07:11] (431.60s)
basically to fork the conversation get
[07:13] (433.28s)
it back on track to what you actually
[07:14] (434.80s)
want it to be. One thing to keep in mind
[07:16] (436.40s)
though is if you do do auto edits and
[07:18] (438.56s)
the and they were accepted already and
[07:20] (440.72s)
then you press the escape key and then
[07:22] (442.24s)
you go back it's not going to revoke
[07:24] (444.48s)
those and go back to this break point
[07:26] (446.56s)
but it will take the conversation to
[07:28] (448.16s)
this point.
[07:31] (451.36s)
Client code can look at websites and do
[07:33] (453.44s)
web searches. It just doesn't do it very
[07:35] (455.04s)
often, I've noticed. The exception to
[07:37] (457.04s)
that is when you go into planning mode,
[07:38] (458.56s)
but say you're just doing coding, you
[07:40] (460.48s)
can actually just put in URLs and it
[07:42] (462.24s)
will go and look at them. So, I'm going
[07:43] (463.52s)
to say make this application conform to
[07:45] (465.44s)
these style guides. I'm going to paste
[07:47] (467.04s)
in the Shopify application design
[07:48] (468.80s)
guidelines. And now it's going to go out
[07:50] (470.56s)
and actually fetch all the content from
[07:52] (472.16s)
that website. So, this is a great way to
[07:54] (474.16s)
just bring in documentation, latest
[07:55] (475.76s)
documentation
[07:57] (477.28s)
you have into cloud code. Now I see has
[07:59] (479.92s)
gone out to that website come back with
[08:01] (481.84s)
very specific things to do to make it
[08:03] (483.68s)
conform with the style guidelines like
[08:05] (485.60s)
for example updating the typography to
[08:07] (487.28s)
match the Shopify admin interface. So
[08:09] (489.76s)
it's really got all the great
[08:10] (490.80s)
information we need here. Now it's going
[08:12] (492.24s)
to update the code.
[08:15] (495.60s)
All right, we're down to the last one
[08:17] (497.04s)
and I find this one so useful. I use it
[08:19] (499.04s)
all the time. You can actually run
[08:20] (500.64s)
claude code in headless mode which means
[08:23] (503.20s)
it doesn't actually load up the UI or
[08:24] (504.96s)
anything. So check it out. You can just
[08:26] (506.64s)
say claude in any terminal. We say
[08:28] (508.56s)
claude-p for headless. That's the
[08:30] (510.80s)
headless mode switch. Let's ask the
[08:32] (512.64s)
question, what is the capital of
[08:33] (513.76s)
Slovakia, which is going to return the
[08:35] (515.92s)
response to me in the command line. And
[08:38] (518.40s)
so what this means, we can use it all
[08:39] (519.76s)
kinds of different places, pipe it to
[08:41] (521.28s)
different files, use it to look at
[08:43] (523.60s)
images, all kinds of useful
[08:45] (525.52s)
functionality just by using the claw-p
[08:47] (527.68s)
command. So check out this much more
[08:49] (529.12s)
useful example. If I run an npm audit,
[08:51] (531.68s)
which is going to tell me all the
[08:52] (532.96s)
vulnerabilities with all the packers I
[08:54] (534.72s)
have in my application, then take the
[08:56] (536.72s)
results of that, pass them to claude, so
[08:59] (539.04s)
I can do the cla again for the headless
[09:01] (541.36s)
mode, and then ask it to prioritize the
[09:03] (543.28s)
security vulnerabilities and describe
[09:04] (544.80s)
them what's critical fixes needed, and
[09:06] (546.56s)
then pipe all that to
[09:07] (547.84s)
vulnerabilities.md, which should be a
[09:09] (549.36s)
markdown file, which will have all that
[09:10] (550.96s)
information. Now, it generated this
[09:12] (552.96s)
vulnerabilities file, which gives me all
[09:14] (554.80s)
the critical things I need to do like
[09:16] (556.48s)
right away. For example, this one is an
[09:18] (558.16s)
next.js JS authorization bypass
[09:19] (559.84s)
vulnerability. So I have to get that
[09:21] (561.28s)
figured out right away and then it lists
[09:23] (563.20s)
the high priority and low priority from
[09:24] (564.72s)
there. So I'm sure your head spinning
[09:26] (566.00s)
all the different places you could use
[09:27] (567.20s)
cloud code in headless mode. It's such a
[09:29] (569.60s)
powerful tool to add any script, any
[09:32] (572.24s)
kind of workflow. I hope you learned a
[09:33] (573.84s)
thing or two. Cloud code is great and
[09:35] (575.68s)
I'm going to do lots of videos on it
[09:36] (576.96s)
coming up as well as everything else
[09:38] (578.40s)
around AI software development. So if
[09:40] (580.24s)
you're into that, make sure you
[09:41] (581.28s)
subscribe to the channel and I hope you
[09:42] (582.88s)
have an amazing day. I'll talk to you in
[09:44] (584.56s)
the next one.